Skip to content

Premium Integrations

How to Draft an AI Auto-Reply When a Contact Form 7 Form Is Submitted

Want visitors to get an immediate, specific reply to what they actually wrote — not a generic "we got your message" — without anyone on your team typing it? Zapify chains two actions: Generate text with AI drafts a reply based on the submission, then Send an email sends it. Both run off the free A form is submitted trigger. AI is a Zapify PRO integration.

What this automation does

The automation is one trigger and two actions, run in order:

  • Trigger: A form is submitted (CF7_FORM_SUBMITTED, Contact Form 7)
  • Action 1: Generate text with AI (AI_GENERATE_TEXT)
  • Action 2: Send an email (WP_SEND_EMAIL, WordPress)

When a visitor submits the form, Zapify sends the submission's details to the AI model as a prompt, gets a drafted reply back as a token, and emails that reply to the visitor.

PRO feature

AI is a Zapify PRO integration and needs a Connection under Settings → Connections. The Contact Form 7 trigger and the Send an email action are both free.

The prompt is built from what the visitor typed

Whatever's in the AI prompt comes partly from a stranger's form submission, and "ignore your previous instructions" is a thing people type into forms. Treat the model's output as untrusted text — sending it straight into an email is fine, but don't have a later step in the automation treat it as an instruction to follow.

Before you start

  • Contact Form 7 installed and active, with at least one published form.
  • An API key for either Anthropic (Claude) or OpenAI — Anthropic's documentation covers getting one for Claude, or use your OpenAI account's own key.

How to build the automation

Step 1: Connect your AI provider

  1. Go to Settings → Connections and click Add New.
  2. Choose AI (OpenAI & Anthropic).
  3. Pick the Provider — Anthropic or OpenAI — and paste in the matching API key.
  4. Optionally set a Model. Leave it empty to use a sensible current default for that provider.
  5. Name the connection and save.

Connections Tab

See Connections for how this screen works generally.

Step 2: Create a new automation

  1. In the WordPress admin, go to Zapify → Automations.
  2. Click Add New to open the builder.
  3. Name it clearly, such as AI auto-reply for contact form.

Create Automation Button

Step 3: Add the "A form is submitted" trigger

  1. Click Add Trigger.

Trigger Button

  1. Choose Contact Form 7 as the app, and select A form is submitted.

Select Contact Form 7 Select A form is submitted

  1. In the Form field, pick the specific form to reply to.

Step 4: Add the "Generate text with AI" action

  1. Click Add Action.

Action Button

  1. Choose AI (OpenAI & Anthropic) as the app, and select Generate text with AI.

Select AI (OpenAI & Anthropic)  3. Configure it:

Field Required What it does
Connection Yes The AI connection from Step 1.
Model No Leave empty to use the connection's default.
Instructions No How the model should behave — for example, "You are a friendly support assistant. Reply in two short paragraphs and sign off as the team."
Prompt Yes Build this from the form's submitted fields — for example, insert the message-field token so the reply actually addresses what was asked.
Maximum length No In tokens, roughly four characters each. Defaults to 500.

Step 5: Add the "Send an email" action

  1. Click Add Action again, below the AI action.

  2. Choose WordPress as the app.

Select WordPress as Action

  1. Select Send an email.

Select Send an email

  1. Configure it, using the AI action's Generated text token for the body:
Field Required What it does
To Yes Insert the form's email-field token to reply to the visitor.
Subject Yes For example, Re: your message or a token from the form.
Body Yes Insert the Generated text token from the Generate text with AI action.

Edit the Send an email action

Step 6: Set every step Live and save

  1. Set the trigger and both actions to Live.
  2. Click Save.

Set Live Button to activate Automation

Step 7: Test it

Submit the form yourself with a specific question. Check the reply you receive actually addresses what you wrote, and open Zapify → Logs to see the model's raw output if the reply looks off — a run mode this action defaults to allows a good 60 seconds for the model to answer, so a genuine timeout is worth retrying rather than treating as broken.

Tokens you can use

Once you've chosen a specific form in the trigger, Zapify exposes one token per field on that form — insert them into the Prompt field. The AI action then makes these available to later actions:

Token What it holds
Generated text The model's reply.
Model Which model actually answered.

Conclusion

With a free trigger and two chained actions — Generate text with AI and Send an email — Zapify replies to form submissions with something that actually reads the message, not a template. For a reply that doesn't depend on AI, see send an email when a Contact Form 7 form is submitted instead.

FAQs

Is this free in Zapify?

The trigger and the Send an email action are free. Generate text with AI is part of the AI PRO integration and needs an active Zapify PRO licence and a Connection.

Which should I use, Anthropic or OpenAI?

Either works the same way from Zapify's side — pick whichever you already have an account and API key for. The connection stores the choice, so switching later is one edit to the connection rather than to every automation.

Is it safe to email whatever the model generates, unreviewed?

For a short, instructed reply to a form submission, generally yes — that's what this automation does. If you want a human to check replies before they go out, add a Write a note to the log action with the generated text instead of sending it automatically, and review the log before deciding whether to build in a send step.

What if the model takes too long or fails?

The action allows up to 60 seconds. A timeout or a server error from the provider is treated as worth retrying automatically; check Zapify → Logs for the specific reason if a run fails.

Can I control how long the reply is?

Yes, with the Maximum length field, in tokens — and by asking for a specific length in Instructions, such as "reply in under 100 words."

Do I need to write any code?

No. The connection and every field are configured visually — the API key is the only thing you copy from your AI provider.

Was this page helpful?