Contact Form 7 Integration: Triggers, Actions, and Automation Examples
Krom Automation Pro connects to Contact Form 7, the most widely used WordPress form plugin with over 5 million active installs. Once the integration is active, every CF7 form submission, validation failure, spam detection, and mail failure becomes a trigger that can start a Krom Automation workflow.
No API key or configuration is required. Krom Automation detects CF7 automatically when the plugin is active.
Requirements #
- Krom Automation Pro installed and activated
- Contact Form 7 plugin installed and active
That’s it. No settings to configure. The integration activates automatically.
Available triggers #
Form Submitted
Fires when a CF7 form is submitted and the notification email sends successfully. This is the primary trigger for most CF7 automations.
| Data field | Description |
|---|---|
form_id | The CF7 form ID |
form_title | The form’s title as set in CF7 |
posted_data | All submitted form fields as dynamic keys |
page_url | URL of the page where the form was submitted |
About posted_data: Every field in your CF7 form is available as a merge tag using its field name. If your form has a field named your-name, it’s available as {{your-name}}. If it has your-email, use {{your-email}}. The field names match exactly what you’ve set in the CF7 form builder.
Tip: Open your CF7 form in the editor and check the field tags (the text inside
[brackets]). The first word after the bracket type is the field name — that’s your merge tag key.
Form Invalid
Fires when a CF7 submission fails validation — for example, a required field is left empty or an email field contains an invalid address. This fires before the form submits successfully.
| Data field | Description |
|---|---|
form_id | The CF7 form ID |
form_title | The form title |
invalid_fields | The fields that failed validation |
page_url | URL of the page where the submission was attempted |
Important: Form Invalid can fire very frequently on busy sites, especially on forms that receive bot traffic. Always pair this trigger with a condition on
form_idto target a specific form. Without this, the trigger fires on every invalid submission across all your CF7 forms.
Form Spam
Fires when a CF7 submission is flagged as spam by CF7’s built-in spam filtering or a connected anti-spam service.
| Data field | Description |
|---|---|
form_id | The CF7 form ID |
form_title | The form title |
spam_reason | The reason CF7 flagged the submission as spam |
page_url | URL of the page where the spam submission occurred |
Common use: Alerting an admin when spam volume on a specific form increases, which can indicate a bot attack or a problem with your spam filtering configuration.
Mail Failed
Fires when a valid CF7 submission completes successfully but the notification email CF7 sends fails to deliver. The submission itself was valid — the issue is with email sending, not the form data.
| Data field | Description |
|---|---|
form_id | The CF7 form ID |
form_title | The form title |
posted_data | All submitted field values (same as Form Submitted) |
page_url | URL of the page where the form was submitted |
Common use: This is a critical trigger for lead capture forms. If a contact form submission arrives but CF7’s notification email fails, you’d normally never know about it. A workflow on Mail Failed can send the submission data to Slack or log it to Google Sheets as a backup, ensuring you never miss a lead due to an email delivery failure.
Available action #
Add Flamingo Contact
Creates or updates a contact record in the Flamingo inbox, which is the companion CRM plugin for Contact Form 7 by the same author.
| Field | Description |
|---|---|
name | Contact name. Use {{your-name}} or whichever field name holds the submitter’s name in your form. |
email | Contact email. Use {{your-email}} or your form’s email field name. |
channel | The Flamingo channel to file the contact under. Usually matches your form title. |
subject | The subject for the Flamingo contact record. |
Note: This action requires the Flamingo plugin to be installed and active alongside Contact Form 7. Flamingo is a free plugin by the same author as CF7 and is available on WordPress.org.
Setting up your first CF7 workflow #
- Go to Krom Automation > Workflows and click Add New Workflow.
- Click Add Trigger and select Form Submitted under the Contact Form 7 category.
- If you have multiple CF7 forms and only want this workflow to run for one of them, add a Condition node. Set the field to
form_id, the operator toequals, and the value to the ID of the specific form. - Add your actions below the trigger (or condition). For a lead notification, add a Send Email action addressed to
{{admin_email}}with the form data in the body. - Simulate the workflow to confirm merge tags resolve correctly.
- Activate the workflow.
Screenshot: Condition node configured with
form_idequals a specific ID, sitting between the CF7 Form Submitted trigger and a Send Email action.
Real-world automation examples #
Auto-responder to the form submitter Trigger: Form Submitted Action: Send Email with To set to {{your-email}}, subject Thanks for reaching out, and a message body using {{your-name}} to personalise the reply.
Lead notification to the sales team via Slack Trigger: Form Submitted (filtered by form_id to your lead form) Action: Slack Send Rich Message to your #leads channel with the submitter’s name, email, and enquiry in the message body.
Backup lead capture when email fails Trigger: Mail Failed Action: Google Sheets Append Row to log the submission data as a backup row. This ensures no lead is lost even when CF7’s email notification fails.
Spam volume alert Trigger: Form Spam (filtered by form_id) Action: Send Email to admin when spam is detected on a specific form, with the {{spam_reason}} in the body.
CRM contact creation on every inquiry Trigger: Form Submitted Action 1: FluentCRM Create or Update Contact using {{your-email}} and {{your-name}} Action 2: Send Email auto-responder to the submitter
Pre-built templates #
Install these from Krom Automation > Templates:
| Template | What it does |
|---|---|
cf7-auto-responder | Sends an instant auto-responder email to the form submitter on successful submission |
cf7-lead-notification | Sends an admin notification email and a Slack alert when a new lead arrives via CF7 |
Troubleshooting #
The Form Submitted trigger isn’t firing. CF7’s Form Submitted trigger fires only when the notification email sends successfully. If CF7’s mail sending is failing (check your email configuration), this trigger won’t fire either. Use the Mail Failed trigger to catch those cases, and verify your SMTP setup is working correctly.
Merge tags from form fields aren’t resolving. Double-check the field name. Go to your CF7 form editor and look at the field shortcode — for example, [text* your-name]. The field name is your-name, so the merge tag is {{your-name}}. Names are case-sensitive and must match exactly.
The workflow is firing for forms I didn’t intend. Add a condition on form_id to restrict the trigger to a specific form. Without this condition, the trigger fires on all CF7 form submissions across your site.