Send Contact Form 7 submissions to MAX Messenger bot

Description

This plugin sends each successful Contact Form 7 submission to a chat in MAX messenger using your own bot. Configure the bot access token and target chat id under Contact Form 7 Integration.

This plugin is an independent integration and is not affiliated with or endorsed by MAX messenger or Contact Form 7.

External services

This plugin connects to the MAX messenger Bot API (HTTPS host platform-api.max.ru), operated by MAX, to send Contact Form 7 submissions to a MAX chat that you configure in the integration settings.

When a site administrator saves or validates the integration settings in WordPress admin, the plugin sends HTTPS requests to MAX with the configured bot access token: GET /me (check the token) and GET /chats/{chat_id}/members/me (check that the bot is a member of the target chat). The chat id you saved is included in the request path.

When a visitor successfully submits a form (after Contact Form 7 validation and spam checks), the plugin sends HTTPS POST /messages to MAX. The request includes the bot access token, the target chat id (as a query argument), and a plain-text message body built from the form title (if any) and the submitted field names and values (unless filtered out by the form or by the mmfcfbs_message_text filter). Nothing is sent to MAX unless the integration is turned on and the token and chat id are configured.

API reference for developers: MAX Bot API documentation.

Legal documents for the MAX service:

  • Terms of service (user agreement): https://legal.max.ru/ps
  • Privacy policy: https://legal.max.ru/pp

Screenshots

Installation

  1. Upload the plugin files to the /wp-content/plugins/send-contact-form-7-submissions-to-max-messenger-bot directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Open Contact Form 7 Integration page.
  4. Configure the MAX bot access token and target chat id.
  5. Submit a contact form — the entry will appear in the configured MAX chat.

FAQ

How to get a bot access token?

Open MAX for Business, add a Chat bot, then open the Integration section for that bot — there you can create or copy the bot access token.

How to get the chat id?

Add the bot to the target chat. The chat id can be obtained via MAX Bot API (GET /chats) or by inspecting incoming bot updates.

How to override credentials in code?

Define MMFCFBS_TOKEN and MMFCFBS_CHAT_ID constants in wp-config.php. They take precedence over the values stored in the database.

Which filters (apply_filters) are available?

The plugin exposes the following filters for developers:

  • mmfcfbs_token — (string) Bot access token after reading from constants / stored options. Use to supply or replace the token programmatically.

  • mmfcfbs_chat_id — (string) Target chat id after reading from constants / stored options.

  • mmfcfbs_message_text — (string) Full plain-text message body before it is sent to MAX. Passed arguments: message text, Contact Form 7 form object, posted field array.

Example:

add_filter( 'mmfcfbs_message_text', function ( $text, $contact_form, $posted_data ) {
    $text .= "\n" . home_url();
    return $text;
}, 10, 3 );

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Send Contact Form 7 submissions to MAX Messenger bot” is open source software. The following people have contributed to this plugin.

Contributors

“Send Contact Form 7 submissions to MAX Messenger bot” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “Send Contact Form 7 submissions to MAX Messenger bot” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.3

  • Plugin renamed to “Send Contact Form 7 submissions to MAX Messenger bot”.
  • Added disclaimer about independent integration status.

1.0.2

  • Document external services in readme (terms and privacy links, data disclosure).
  • Resolve plugin directory paths without relying on WP_PLUGIN_DIR/WP_CONTENT_DIR/ABSPATH for other plugins’ files.

1.0.0

  • Basic functionality released.