Connections & routing
A connection is a routing rule: this form → this bot → these chats, optionally with a message template. Connections are where everything comes together.
Creating a connection
In CF7 Telegram → Connections, click Add connection and pick:
- Form — which Contact Form 7 form triggers the notification.
- Bot — which bot sends the message.
- Chats — one or more destinations. A single connection can notify any number of chats at once.
- Template (optional) — a custom message layout. Without one, a sensible default is used that lists the form title, site, date, and all submitted fields.
Connections can be enabled and disabled without deleting them — handy for pausing notifications during imports or testing.
Routing patterns
Because any form can connect to any bot and any set of chats, common setups are all just combinations of connections:
- One form → several chats — one connection with multiple chats, e.g. sales lead lands in the sales group and your private chat.
- Several forms → one chat — one connection per form, all pointing at the same chat.
- Different forms → different teams — support form to the support group, careers form to HR, each with its own template.
- Same form, different messages — two connections on the same form with different templates and chats (e.g. a full version for the team, a short ping for a channel).
Testing a connection
The Test action on a connection fires the entire pipeline with sample data: the template is rendered with placeholder field values and delivered to every chat in the connection. Use it to check formatting and routing before going live.
Activity log
The dashboard shows a log of recent delivery attempts — form title, target chat, success or failure, and the error message Telegram returned when something went wrong (for example, a bot removed from the group or a wrong thread ID).
The log keeps the 50 most recent entries by default; developers can change this with the b418_wp_tg_cf7_log_max_entries filter.
Reliability
Telegram delivery runs alongside normal CF7 processing, never inside it:
- CF7 mail is sent exactly as before — the plugin doesn't touch it.
- A Telegram outage or misconfigured chat never blocks or fails the form submission itself.
- Failures are recorded in the activity log so you can spot and fix them.