Description
This plugin lets you send Contact Form 7 messages to Telegram chats via a bot. Setup takes just a few steps:
- Create a Telegram bot (how to).
- Create a bot in the plugin UI.
- Paste the bot token into the bot form (PHP constants also available).
- Create a bridge in the plugin UI. A bridge links Contact Form 7 forms, a Telegram bot, and one or more Telegram recipients.
- Add users to the subscriber list by sending the
/cf7tg_startcommand to your bot. To add a group, first add the bot to the group, then send/cf7tg_startin that group. - Approve or decline subscription requests on the Contact Form 7 CF7 Telegram settings page.
- Configure the bridge: choose which forms it handles and which Telegram recipients should receive those messages. Create at least one bridge to run the integration, and add more when different forms should send messages to different sets of Telegram recipients.
The integration is configured correctly when the bot panel is highlighted in blue and the bridge panel is highlighted in green.
Hooks and constants
Filter wpcf7tg_skip_tg
Use it to skip sending a Telegram message.
Filter wpcf7tg_markdown
Use it to customize the allowed Markdown tags.
Filter wpcf7tg_sendMessage( $args, $chat_id, $mode )
Use it to customize Telegram sendMessage arguments for each recipient and message chunk.
Action wpcf7tg_message_sent( $args, $submission )
Runs after each Telegram delivery attempt. A Telegram failure does not abort the Contact Form 7 submission.
Action wpcf7tg_messages_sent( $list, $output, $mode, $submission )
Runs after all configured recipients have been attempted.
Constant WPCF7TG_LOG_RETENTION_DAYS and filter cf7tg/logRetentionDays
Set the log retention period in days. The default is 30; set it to 0 to disable age-based pruning.
Constant WPCF7TG_LOG_MAX_ROWS and filter cf7tg/logMaxRows
Set the maximum number of newest log rows to retain. The default is 10000.
Constants WPCF7TG_PING_INTERVAL and WPCF7TG_UPDATES_INTERVAL
Set the offline bot status retry interval and the online Telegram update polling interval in milliseconds. The defaults are 5000 and 12000 respectively.
This plugin uses API Telegram and sends remote HTTP requests to Telegram servers to deliver notifications.
Screenshots


Reviews
Contributors & Developers
“Message Bridge for Contact Form 7 and Telegram” is open source software. The following people have contributed to this plugin.
Contributors“Message Bridge for Contact Form 7 and Telegram” has been translated into 8 locales. Thank you to the translators for their contributions.
Translate “Message Bridge for Contact Form 7 and Telegram” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.1.0
- Add fake Telegram browser E2E coverage for form delivery, admin setup, partial delivery failures, and CI evidence collection.
- Rename user-facing Channel terminology to Bridge across the admin UI and guide, with bridge and bot setup guidance.
- Add chat display-name controls so administrators can set custom names and restore Telegram-provided names.
1.0.13
- Make Telegram bot actions POST-first and harden the administration interface against partial loading, pagination, and retry failures.
- Restore the full-page administration background, hide unrelated WordPress notices on the plugin screen, and improve diagnostics without exposing bot tokens or contact details.
- Ignore transient Telegram polling timeouts in the interface and use a 12-second default update polling interval.
- Add automatic 30-day and 10,000-row log retention with configurable limits.
- Verify the release ZIP across supported WordPress, PHP, and Contact Form 7 versions, including install, upgrade, uninstall, and rollback workflows.
- Add reproducible build, Plugin Check, dependency audit, artifact hygiene, browser canary, and manually approved WordPress.org promotion gates.
1.0.12
- Replace the Telegram SDK with a smaller WordPress HTTP integration and safer error handling.
- Validate bot tokens before saving them and preserve existing chat connections when the bot identity is unchanged.
- Make update polling webhook-aware and prevent failed updates from being skipped.
- Load every page of Telegram chats in the administration interface.
- Improve Unicode message chunking, plaintext fallback, multi-recipient delivery, and legacy hook compatibility.
1.0.11
- Make legacy migrations self-healing, retryable, and safe to run repeatedly.
- Preserve Contact Form 7 content while migrating bots, chats, channels, and form connections without duplicates.
- Keep bot tokens defined through PHP constants out of stored plugin data.
- Replace destructive load-time cleanup with conservative repair and recovery controls.
1.0.10
- Add maintenance cleanup for orphan chats and broken relations.
- Fix fatal error on CF7 submission when a channel has chats but no connected bot (#56).
1.0.9
- Remove external update controls.
1.0.8
- Harden Telegram chat sanitization and update polling.
1.0.7
- Prevent duplicate chat subscriptions when bot updates are fetched concurrently.
1.0.6
- Fix truncated bot name copy.
1.0.5
- Race condition in chats loading fixed.
1.0.4
- Minor fixes.
1.0.3
- Fix translation loading issue.
1.0.2
- Manual migration button added.
- Migration process improved.
1.0.1
- Fix react template.
1.0.0
- New UI for managing channels and bot token.
- New plugin name was chosen to comply with new WordPress guidelines.
0.10.0
- Beta testing is available for everyone.
0.9.3
- Preparing for beta testing.
0.9.2
- Loading textdomain fixed – moved to init hook.
- Array undefined key fixed.
0.9.1
- Version never released.
0.9
- Preparing to v1.0 seamless transition.
0.8.7
- API Telegram errors logging added.
0.8.6
- Security issue CVE-2024-9629 got fixed.
0.8.5
- PHP 7.2 compatibility fixed.
0.8.4
- Markdown symbols escaping got added in order to fix an issue.
0.8.3
- Blueprint got added.
0.8.2
- Donation link got changed.
- tested up to WP 6.5
0.8.1
- Actualize add-on sale date.
0.8
- Addons available
0.7.10
- Preparing for attachment sending
- A few fixes
0.7.9
- Markdown for HTML-format issue
0.7.7
- Support WP 5.3 functions for WP before 5.3
0.7
- New interface recipient management
- Groups are supported
- WPCF7_ContactForm::prop( ‘mail’ ) instead WPCF7_ContactForm::$mail
- FIXED Dependence parse_mode by use_html property
0.6.2
- Trim for CHAT_ID field elements added
0.6.1
- Markdown bug fixed
0.6
- Message to telegram now sends on
wpcf7_before_send_mailhook insteadwpcf7_mail_sent. It is more reliable way. wpcf7tg_skip_tgadded.wpcf7tg_markdownadded.WPFC7TG_BOT_TOKENadded.- bugs fixed
0.5
- Markdown added
