What you need

  • A Telegram account.
  • A bot token from BotFather.
  • A chat ID for the private chat or group that should receive alerts.
  • Contact Form 7 on a WordPress site.

The free plugin is still in review at WordPress.org. You can prepare everything except the final plugin step now, so the setup takes five minutes on the day it is approved.

Step 1: create the bot

Open Telegram and search for @BotFather. Start a chat and send:

/newbot

Choose a display name, then a username that ends in bot. BotFather returns a token that looks like this:

123456789:AAExampleTokenDoNotShare

Treat the token like a password. Anyone with it can send messages as your bot. Do not paste it into a group chat, a screenshot, or a public issue. If it leaks, open BotFather and revoke it before creating a new one.

Step 2: get the chat ID

Send any message to your new bot. Then open this URL in a browser, replacing the token placeholder:

https://api.telegram.org/bot<TOKEN>/getUpdates

Look for "chat":{"id":...}. A private chat uses a positive number. A group uses a negative number, and the bot must be added to the group before the ID appears.

If the response is empty, send another message to the bot and reload the URL. The bot cannot read a chat it has never received a message from.

Step 3: test the token

Send one message with a simple request. Replace both placeholders:

curl -X POST "https://api.telegram.org/bot<TOKEN>/sendMessage" \
  -d "chat_id=<CHAT_ID>" \
  -d "text=Relay Notify test"

A successful response contains "ok":true and a message object. The message should arrive on the phone or in the group within a second or two.

If it works, save the token and chat ID in a password manager. You will paste them into WordPress after the plugin is approved.

Step 4: connect Contact Form 7 when Relay Notify is approved

  1. Install Relay Notify from WordPress.org after the listing is live. The plugin is free and GPLv2.
  2. Open Settings, then Relay Notify.
  3. Paste the bot token and the chat ID.
  4. Click Send test and confirm the message arrives.
  5. Submit the Contact Form 7 form once and check the notification log.

The plugin keeps the last 50 notifications with their status, so you can prove a message was sent when a client asks. Form data goes to Telegram and stays in the email copy that Contact Form 7 already sends. There is no separate dashboard.

Four errors and fixes

  1. 401 Unauthorized. The token was copied with a space or a line break. Copy it again and save.
  2. 400 Bad Request, chat not found. The bot was never started by the recipient, or the chat ID is wrong. Open the bot, press Start, then retry.
  3. 403 Forbidden from the host. Some hosts block outbound requests to api.telegram.org. Ask support to allow it, or test from the server with curl.
  4. The message arrives empty. A template lost its placeholders. Restore the default template and change one field at a time.

Security notes

  • The token belongs in the WordPress database, restricted to administrators.
  • Never put the token in JavaScript, a theme file, or a public repository.
  • If you uninstall the plugin, revoke the token with BotFather. A stale token is a live credential.
  • The plugin does not ask for a Telegram password, a phone number, or a session file.

While you wait

Join the launch note and I will send one email when Relay Notify is approved, with the install link and the five minute setup guide. No newsletter and no follow-up sequence.