About this plugin
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_start command to your bot. To add a group, first add the bot to the group, then send /cf7tg_start in 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.