Contact Form 7 to Gmail, replies drafted for you
Your Contact Form 7 inbox fills up fast, then the busywork starts. Open the message, figure out what they want, paste bits into an email, try to sound consistent, then log it somewhere (if you remember).
This CF7 Gmail automation hits marketing managers and small business owners hardest, but client-facing agency teams feel it too. You get ready-to-send Gmail drafts plus a clean Google Sheets log, so replies go out quickly without losing the human touch.
Below is what the workflow does, the results you can expect, and what to watch for when you plug it into your WordPress site.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: Contact Form 7 to Gmail, replies drafted for you
flowchart LR
subgraph sg0["Message Classifier Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>From Wordpress"]
n1@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set Fields", pos: "b", h: 48 }
n2@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model", pos: "b", h: 48 }
n3@{ icon: "mdi:robot", form: "rounded", label: "Message Classifier", pos: "b", h: 48 }
n4@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model1", pos: "b", h: 48 }
n5@{ icon: "mdi:message-outline", form: "rounded", label: "Email draft - Other info", pos: "b", h: 48 }
n6@{ icon: "mdi:robot", form: "rounded", label: "Email writer (Others)", pos: "b", h: 48 }
n7@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model2", pos: "b", h: 48 }
n8@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model3", pos: "b", h: 48 }
n9@{ icon: "mdi:robot", form: "rounded", label: "Email writer (Order info)", pos: "b", h: 48 }
n10@{ icon: "mdi:robot", form: "rounded", label: "Email writer (Product info)", pos: "b", h: 48 }
n11@{ icon: "mdi:message-outline", form: "rounded", label: "Email draft - Product info", pos: "b", h: 48 }
n12@{ icon: "mdi:message-outline", form: "rounded", label: "Email draft - Order info", pos: "b", h: 48 }
n13@{ icon: "mdi:database", form: "rounded", label: "Save on Sheet (product)", pos: "b", h: 48 }
n14@{ icon: "mdi:database", form: "rounded", label: "Save on Sheet (order)", pos: "b", h: 48 }
n15@{ icon: "mdi:database", form: "rounded", label: "Save on Sheet (other)", pos: "b", h: 48 }
n16@{ icon: "mdi:robot", form: "rounded", label: "Subject and Text", pos: "b", h: 48 }
n17@{ icon: "mdi:robot", form: "rounded", label: "Subject and Text 2", pos: "b", h: 48 }
n18@{ icon: "mdi:robot", form: "rounded", label: "Subject and Text 3", pos: "b", h: 48 }
n1 --> n3
n0 --> n1
n16 -.-> n10
n3 --> n10
n3 --> n9
n3 --> n6
n17 -.-> n9
n18 -.-> n6
n6 --> n5
n12 --> n14
n5 --> n15
n2 -.-> n3
n9 --> n12
n4 -.-> n6
n7 -.-> n9
n8 -.-> n10
n11 --> n13
n10 --> n11
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n3,n6,n9,n10,n16,n17,n18 ai
class n2,n4,n7,n8 aiModel
class n13,n14,n15 database
class n0 api
classDef customIcon fill:none,stroke:none
class n0 customIcon
The Challenge: Contact Form Inquiries Turn Into a Daily Fire Drill
Contact forms are supposed to make it easier for customers to reach you. In practice, they create a tiny, constant backlog. Each inquiry needs quick triage (sales question, order issue, random request), a reply that sounds like your brand, and some kind of tracking so nothing disappears when the day gets chaotic. Miss one message and you lose trust. Reply too slowly and the lead is gone. Honestly, the most annoying part is how small each task feels until you add them up across a week.
It adds up fast. Here’s where it breaks down in real teams:
- You end up re-reading the same message multiple times just to decide who should handle it.
- Copy-paste replies drift over time, which means your tone and promises get inconsistent.
- Someone forgets to log the inquiry, so follow-ups rely on memory and Slack messages.
- When a customer replies later, there’s no clean history, so you waste time reconstructing context.
The Fix: Classify Every CF7 Message, Draft the Reply, Log It
This workflow turns every Contact Form 7 submission into two things you can act on immediately: a Gmail draft reply and a structured row in Google Sheets. It starts the moment your WordPress form submits to an n8n webhook, capturing the sender’s details and message in a consistent format. Then Google Gemini classifies the inquiry into your predefined categories (Product, Order, or Other). Based on that classification, Gemini drafts a professional response with a clear subject line and body copy, and n8n creates the email as a Gmail draft so a human can review and send. Finally, the workflow appends the inquiry, classification, and draft details into a Google Sheets log, which becomes your searchable history.
The flow is simple in practice. A webhook captures the form data from WordPress, then AI sorts and writes the response, and Gmail stores it as a draft (not an auto-send). Google Sheets keeps a running list so you always know what came in and what happened next.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you receive 12 Contact Form 7 inquiries a day. Manually, it’s usually about 10 minutes to read, classify, draft a decent reply, and log the details, so you’re spending roughly 2 hours daily just moving messages along. With this automation, the submission is captured instantly, Gemini drafts the reply in under a minute, and your only “work” is reviewing and sending from Gmail (often 1–2 minutes each). That’s close to 90 minutes back most days, without skipping follow-up tracking.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- WordPress + Contact Form 7 to collect inbound inquiries.
- CF7 to Webhook plugin to forward submissions to n8n.
- Google Gemini API key (get it from Google AI Studio / Google Cloud).
- Gmail to create drafts your team can review.
- Google Sheets to store inquiry history and statuses.
Skill level: Beginner. You’ll connect accounts, paste a webhook URL into WordPress, and tweak a few text prompts.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
A Contact Form 7 submission hits your webhook. WordPress sends the form fields (name, email, phone, message) to n8n the second someone clicks submit.
The data gets cleaned up into a consistent format. n8n maps the incoming fields so your AI prompt and your Google Sheets rows don’t break when a field is missing or renamed.
Gemini classifies, then writes the reply draft. A classifier routes the message into Product, Order, or Other. Each route uses its own email-writing prompt so the response is relevant instead of generic.
Gmail drafts are created and the sheet is updated. The workflow creates a draft email in the right mailbox or department flow, then appends a row to Google Sheets so you can sort, filter, and follow up later.
You can easily modify the categories and email tone to match your business. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Webhook Trigger
Set up the entry point so your WordPress form can send submissions into n8n.
- Add and open Incoming WP Form Hook.
- Set HTTP Method to
POST. - Set Path to
61858d25-af82-4cab-bb1b-68bea4989e15. - Copy the production webhook URL and configure your WordPress form to POST to it.
Step 2: Connect Google Sheets
Configure the three append operations that log each inquiry type to Google Sheets.
- Open Append Sheet - Product and set Operation to
append. - Set Document to
[YOUR_ID]and Sheet togid=0(name:Foglio1). - Map DATE to
{{ $now.format('dd/MM/yyyy') }}and DRAFT to{{ $('Compose Reply - Product').item.json.output.text }}. - Map FIRST NAME, LAST NAME, EMAIL , PHONE, and MESSAGE to the corresponding Map Contact Fields expressions.
- Repeat the same configuration for Append Sheet - Order and Append Sheet - Other, using their respective
{{ $('Compose Reply - Order').item.json.output.text }}and{{ $('Compose Reply - Other').item.json.output.text }}expressions. - Credential Required: Connect your googleSheetsOAuth2Api credentials to Append Sheet - Product, Append Sheet - Order, and Append Sheet - Other.
[YOUR_ID] with your actual Google Sheets document ID, or the append nodes will fail.Step 3: Set Up AI Classification and Field Mapping
Normalize inbound data and classify the inquiry so it routes to the correct AI response path.
- Open Map Contact Fields and set assignments:
- first_name →
{{ $json.body.first_name }} - last_name →
{{ $json.body.last_name }} - email →
{{ $json.body.email }} - phone →
{{ $json.body.phone }} - message →
{{ $json.body.message }}
- first_name →
- Open Route Inquiry Types and set Input Text to
{{ $json.message }}. - Verify categories in Route Inquiry Types include
Product InfoandOrder Info, with Fallback set toother. - Ensure Gemini Classifier Model is connected as the language model for Route Inquiry Types with Model Name
models/gemini-2.0-flash. - Credential Required: Connect your googlePalmApi credentials to Gemini Classifier Model.
Step 4: Set Up AI Reply Generation
Generate tailored draft responses for product, order, and other inquiries.
- Open Compose Reply - Product and set Text to the multi-line prompt using contact fields, starting with
This is the message you received that you need to reply to:and including{{ $('Map Contact Fields').item.json.first_name }},{{ $('Map Contact Fields').item.json.last_name }},{{ $('Map Contact Fields').item.json.email }},{{ $('Map Contact Fields').item.json.phone }}, and{{ $('Map Contact Fields').item.json.message }}. - Repeat the same Text and promptType
defineconfiguration for Compose Reply - Order and Compose Reply - Other. - Confirm Gemini Reply Model C is the language model for Compose Reply - Product, Gemini Reply Model B for Compose Reply - Order, and Gemini Reply Model A for Compose Reply - Other, each using
models/gemini-2.0-flash-exp. - Credential Required: Connect your googlePalmApi credentials to Gemini Reply Model A, Gemini Reply Model B, and Gemini Reply Model C.
- Keep Parse Subject/Text A, Parse Subject/Text B, and Parse Subject/Text C attached as output parsers with their Input Schema for
subjectandtext. These are AI sub-nodes—credentials should be added to the parent Gemini nodes, not the parsers.
Step 5: Configure Draft Email Outputs
Create Gmail drafts using the generated subject and message from the AI outputs.
- Open Draft Email - Product and set Resource to
draft. - Set Subject to
{{ $json.output.subject }}and Message to the multi-line template using{{ $json.output.text }}plus the mapped contact fields. - Set Send To to
{{ $('Route Inquiry Types').item.json.email }}so the draft targets the detected email address. - Repeat the same configuration for Draft Email - Order and Draft Email - Other.
- Credential Required: Connect your gmailOAuth2 credentials to Draft Email - Product, Draft Email - Order, and Draft Email - Other.
email field, the Send To expression may be empty. Consider adding validation if your form does not always include email.Step 6: Test and Activate Your Workflow
Run a full test from the webhook to confirm drafts and sheet logs are created correctly.
- Click Execute Workflow and submit a test form to the webhook URL from Incoming WP Form Hook.
- Confirm Map Contact Fields outputs the expected fields and Route Inquiry Types classifies the message.
- Verify a Gmail draft is created in the appropriate node: Draft Email - Product, Draft Email - Order, or Draft Email - Other.
- Check that a new row was appended in the corresponding sheet node (Append Sheet - Product, Append Sheet - Order, or Append Sheet - Other) with the AI draft and contact data.
- When tests pass, toggle the workflow to Active for production use.
Watch Out For
- Gmail credentials can expire or need specific permissions. If things break, check the Gmail node’s credential status in n8n and confirm the connected Google account still has draft access.
- If you’re relying on AI responses during busy periods, Gemini can take longer than expected. If downstream nodes ever run with empty output, adjust your prompts and add simple “no content” fallbacks instead of assuming perfect responses.
- Default AI prompts are generic. Add your brand voice early (greeting style, sign-off, what you can’t promise), or you will be editing drafts every time.
Common Questions
About 30 minutes if your Google accounts are already connected.
Yes. No coding is required, but someone will need to paste a webhook URL into the WordPress plugin settings and connect Gmail/Sheets once.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Google Gemini API usage costs, which depend on how many inquiries you process.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
You can. Update the categories in the “Route Inquiry Types” classifier so they match how your team actually thinks (sales, support, billing, partnerships). Then adjust the three “Compose Reply” prompts to include your policy details, your preferred sign-off, and any questions you always ask (order number, product URL, urgency). If you want replies in a different language, set that requirement inside each Compose Reply prompt so it stays consistent across categories.
Usually it’s expired OAuth consent or the wrong Google account connected. Reconnect Gmail credentials inside n8n, then confirm the account can create drafts in the mailbox you’re targeting. If it fails only when volume spikes, you may also be hitting rate limits, so spacing executions slightly can help.
If you self-host, capacity mostly comes down to your server and your Gemini quota.
Often, yes, but it depends. This workflow uses classification plus three different AI reply paths, and n8n handles that kind of branching cleanly without turning it into a maze of separate automations. You also have the option to self-host, which matters when you’re processing a lot of inquiries and don’t want every execution metered. Zapier or Make can be quicker for a simple “form → email” connection, but drafting different responses based on intent usually gets expensive or hard to maintain. Talk to an automation expert if you want a quick recommendation for your exact volume and tools.
You’ll still send the final message, but you won’t be starting from a blank screen or losing track of who asked what. Set it up once, and the workflow quietly keeps your inbox and your follow-up log under control.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.