WP Webhooks / Examples / CF7 to Webhook
Example · Contact Form 7

CF7 to Webhook: Tell the Plugin’s AI What You Want — It Builds the n8n Integration

Contact Form 7 has no built-in webhook feature. Instead of wiring hooks and field mappings by hand, describe the integration to Build with AI in one sentence — the agent proposes a plan, builds the webhook, and tests it. Manual setup still takes five steps if you prefer clicking.

~6 min read Updated Jul 17, 2026
contactform7webhookn8n

TL;DR

  • Paste one sentence into Build with AI — the agent wires the CF7 trigger, your n8n endpoint, and the field mapping for you
  • The webhook is created disabled; you review the plan, confirm enable, and test with a real submission
  • Delivery is queued with automatic retries (1 min, 2 min, 4 min, 8 min — 5 attempts), full event log, and one-click replay
/ Build with AI

Describe It Once — The Agent Builds It

This example uses Webhook Actions by Flow Systems — a free WordPress plugin whose admin opens on the Build with AI screen: describe the integration or automation you want, and the agent proposes a plan you can edit, then builds and tests it for you.

A CF7 to webhook integration is the canonical Build with AI request. Open Webhook Actions in the WordPress admin and type:

prompt — paste into Build with AI

When a Contact Form 7 form is submitted, send it as JSON to my n8n webhook: https://your-n8n-url/webhook/test
Build with AI — describe the CF7 → n8n integration in plain language and press Build

The agent first gathers context — you'll see read-only ability chips like list_triggers and get_trigger_schema as it discovers the Contact Form 7 hooks on your site. CF7 has a built-in integration in the plugin, so the agent picks the right trigger itself — typically wpcf7_before_send_mail (submission data at its most complete state), or wpcf7_mail_sent when you ask it to fire only after the notification email went out.

It then proposes an ordered plan: create the webhook, point it at your n8n URL, and map the submitted form fields to clean JSON keys. With "Review plan before running" enabled you can edit any step before it executes.

The proposed plan — trigger, endpoint, and field mapping as editable steps before anything is created

When the run finishes you get "Build complete." with a one-click enable toggle. New webhooks are always created disabled — nothing fires until you confirm. Going live, test dispatches with real data, and deletions all require explicit confirmation, and there's a revert for the last change.

Build complete — review the result, flip the enable toggle, and submit a test form

One prerequisite: connect an AI provider on first run — use a provider already configured in WordPress or add your own API key. Keys are encrypted in the plugin's Credentials Vault and never returned over the API; the same vault stores any endpoint auth (auth_credential_id), so secrets never sit in plaintext headers or chat.

FIG 01 — CF7 → Webhook Actions → n8n
/ Manual Setup

Prefer to Set It Up by Hand?

The same result takes five steps in the admin UI — no AI provider needed:

  1. Install the plugin

    Search for FlowSystems in Plugins → Add Plugin — it narrows the WordPress.org search to exactly one result.

  2. Create a new webhook

    Go to Webhooks → Add Webhook, name it (e.g., “CF7 → n8n”).

  3. Select the trigger

    Set the WordPress action hook to wpcf7_mail_sent — it fires once per successful CF7 form submission.

    Webhook Actions admin — searching “sent” and selecting the wpcf7_mail_sent hook under Contact Form 7
  4. Set the n8n webhook URL

    In n8n, add a Webhook node, set HTTP Method to POST, and copy its URL into the plugin's webhook URL field.

  5. Save and test

    Submit your CF7 form and check the Event Log for the delivery status and payload. In n8n, “Listen for test event” shows the incoming data for mapping to subsequent nodes.

    Full walkthrough — CF7 form submission triggers a webhook payload delivered to n8n via Webhook Actions by Flow Systems

Writing the integration yourself with wpcf7_mail_sent and wp_remote_post()? That approach — and why it silently drops submissions in production — is covered in depth in Contact Form 7 to Webhook: Send CF7 to Any Endpoint and the wpcf7_mail_sent hook reference.

/ Payload

Example Payload

Here’s what a typical CF7 submission looks like when it arrives at your n8n webhook. The field names match the name attributes you set in your CF7 form tags.

POST body — application/json

{
  "event": {
    "id": "085cc108-654f-4b26-b39e-921cc8208bbd",
    "timestamp": "2026-03-23T12:59:21Z",
    "version": "1.0"
  },
  "hook": "wpcf7_mail_sent",
  "args": [
    {
      "__type": "WPCF7_ContactForm",
      "id": 16,
      "title": "Contact form 1",
      "name": "contact-form-1",
      "locale": "en_US",
      "submission": {
        "fields": {
          "your-name": "Mateusz",
          "your-email": "[email protected]",
          "your-subject": "CF7 to webhook test",
          "your-message": "Testing integration"
        },
        "meta": {
          "url": "https://webhook-actions.local/cf-7-example/",
          "timestamp": 1774270761,
          "remote_ip": "172.22.0.1",
          "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36",
          "container_post_id": 17,
          "current_user_id": 0
        }
      }
    }
  ],
  "timestamp": 1774270761,
  "site": {
    "url": "https://webhook-actions.local"
  }
}

The payload wraps the full WPCF7_ContactForm object including submitted fields, page url, remote_ip, and user_agent. Use args[0].submission.fields in n8n to access form values directly — or let Build with AI apply a field mapping so n8n receives flat keys like name and email instead.

/ Reliability

What You Get Beyond the Setup

Every delivery is dispatched from a background queue, so form submissions are never blocked by a slow or unavailable endpoint. Failures retry automatically with exponential backoff — 1 min, 2 min, 4 min, 8 min, 5 attempts — and every attempt is logged with status code and response body. Anything that exhausts its retries stays in the event log, replayable from the admin UI or via the REST API (POST /wp-json/fswa/v1/logs/{id}/retry) — without asking the user to resubmit.

Why this matters in production — and why bare wp_remote_post() integrations lose leads silently — is covered in Why WordPress webhooks silently fail in production and How the retry and replay system works.

The destination decides how much work sits between the form and the record. A catch-hook node accepts whatever you send it, but a real product API does not: writing a submission into an Airtable base means mapping every form-tag name onto a field that already exists, and writing one into Notion means wrapping each value in the property type its schema declares. Both are walked through end to end in Contact Form 7 to Airtable and Contact Form 7 to Notion.

/Notes
WordPress Webhooks: Setup, Examples, and Why They Fail — complete guide to how WordPress webhooks work and why they break
Webhook Actions by Flow Systems — plugin overview
wpcf7_mail_sent hook reference — parameters, submission object, code examples
Contact Form 7 to Airtable — field mapping, typecast, the 10-record cap and the 5 req/s limit
Contact Form 7 to Notion — typed properties, the Notion-Version header and rate limits
WordPress Webhook REST API — retry and replay documentation
FAQ

Common questions always ask.

Don't see yours? Open an issue on GitHub or check the full reference in the API docs.

Can AI set up my CF7 webhook for me? +
Yes. The free Webhook Actions by Flow Systems plugin includes Build with AI — describe the integration in plain language ("When a Contact Form 7 form is submitted, send it as JSON to my n8n webhook"), and the agent reads the CF7 trigger schema, proposes a plan you can edit, then creates the webhook with trigger, endpoint, and field mapping configured. New webhooks are created disabled, so nothing goes live until you confirm.
How do I connect CF7 to a webhook? +
The fastest way is the Build with AI screen in the Webhook Actions by Flow Systems plugin: describe the integration in one sentence and the agent builds it. Manually, you create a webhook in the plugin admin, select a Contact Form 7 hook such as wpcf7_mail_sent as the trigger, and paste your endpoint URL. Either way you get queue-based delivery with automatic retries, logging, and replay — so no form submission is lost silently.
Does Contact Form 7 support webhooks? +
Not natively. Contact Form 7 doesn't include a built-in webhook feature. To send form data to a webhook endpoint you need custom code using the wpcf7_mail_sent action hook, or a plugin that handles webhook dispatch for you.
Should I use wpcf7_mail_sent or wpcf7_before_send_mail? +
wpcf7_before_send_mail fires before the notification email is sent and gives access to the submission at its most complete state — it's what the plugin's built-in CF7 integration recommends and what Build with AI typically selects. wpcf7_mail_sent fires only after the email sent successfully, which is useful when you want email delivery confirmed before triggering the integration. Both work as webhook triggers.
What happens if my n8n webhook is down when CF7 submits? +
With a bare wp_remote_post() call, the data is lost silently — there's no retry and no log entry. With a queue-based system, the failed delivery is stored and retried automatically with exponential backoff (1 min, 2 min, 4 min, 8 min — 5 attempts). You can also replay any failed submission manually from the WordPress admin.
Can I retry failed CF7 webhook submissions? +
Yes, if you use a plugin that provides retry support. The Webhook Actions by Flow Systems plugin retries failed deliveries automatically and also exposes a REST API endpoint (POST /wp-json/fswa/v1/logs/{id}/retry) that lets you replay any past submission — even successful ones.
Ready

Your next automation is
one sentence away.

$ wp plugin install flowsystems-webhook-actions --activate