Skip to main content

Automate WordPress contact form (CF7) responses and classification with Gemini

Workflow preview

Workflow preview
100%
Automate WordPress contact form (CF7) responses and classification with Gemini preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow optimizes the management of inquiries received through a contact form (Contact Form 7 CF7 Plugin) on a WordPress site , automating the process of classification, response drafting, an...

Best for

  • Ticket Management automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.textclassifier, n8n-nodes-base.gmail, @n8n/n8n-nodes-langchain.chainllm, n8n-nodes-base.googlesheets, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Davide.

Original n8n.io source

1.1 Workflow description

Title
Automate WordPress contact form (CF7) responses and classification with Gemini
Workflow name
Automate WordPress contact form (CF7) responses and classification with Gemini

This workflow optimizes the management of inquiries received through a contact form (Contact Form 7 - CF7 Plugin) on a WordPress site, automating the process of classification, response drafting, and data storage.

This workflow is particularly useful for businesses that receive multiple daily inquiries and want to improve their efficiency in managing customer communications.

Benefits:

Automation & Speed – Reduces the time needed to handle inquiries manually.
Better Email Management – Ensures every message receives a timely and accurate response.
Customization – The generated draft can be edited before sending, maintaining a personal touch.
Inquiry History – Storing data in Google Sheets allows for easy tracking of customer interactions.
Easy Integration – Works seamlessly with Contact Form 7 without complex configurations.


How It Works

  1. Form Submission Handling: The workflow starts with a WordPress form submission captured via a webhook. The form data (first name, last name, email, phone, and message) is extracted and structured using the "Set Fields" node.
  2. Message Classification: The submitted message is classified into predefined categories (e.g., "Product Info," "Order Info," or "Other") using the "Message Classifier" node, powered by Google Gemini.
  3. Automated Email Drafting: Based on the classification, the workflow generates a professional email draft using one of three "Email Writer" nodes (for Product, Order, or Other requests). Each node uses Google Gemini to craft a personalized response with a structured format (subject and body).
  4. Email Draft Creation: The drafted email is sent as a Gmail draft to the appropriate department, including the original form data for context.
  5. Data Logging: All submissions, along with their classifications and email drafts, are logged in a Google Sheets spreadsheet for record-keeping and further action.

Set Up Steps

  1. Install WordPress Plugin: Install the "CF7 to Webhook" plugin on WordPress and configure it to send form submissions to the n8n webhook URL.
  2. Configure Webhook in n8n: Set up the "From Wordpress" webhook node in n8n to receive POST requests from the WordPress form.
  3. Google Gemini Integration: Ensure the Google Gemini nodes are properly authenticated with the correct API credentials.
  4. Gmail and Google Sheets Setup: Authenticate the Gmail and Google Sheets nodes with the appropriate OAuth2 credentials and specify the target spreadsheet and sheet name.
  5. Customize Classification Categories: Adjust the categories in the "Message Classifier" node to match your business needs.
  6. Test the Workflow: Trigger a test form submission to verify the workflow processes data correctly, classifies the message, generates an email draft, and logs the data.

Need help customizing?

Contact me for consulting and support or add me on Linkedin.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - From Wordpress

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 2 - Set Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 4 - Message Classifier

Type / Role
@n8n/n8n-nodes-langchain.textClassifier - textClassifier
Config choices
Version 1

Block 5 - Google Gemini Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 6 - Email draft - Other info

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 7 - Email writer (Others)

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.6

Block 8 - Google Gemini Chat Model2

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 9 - Google Gemini Chat Model3

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 10 - Email writer (Order info)

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.6

Block 11 - Email writer (Product info)

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.6

Block 12 - Email draft - Product info

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 13 - Email draft - Order info

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 14 - Save on Sheet (product)

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 15 - Save on Sheet (order)

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 16 - Save on Sheet (other)

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 17 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Subject and Text

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 22 - Subject and Text 2

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 23 - Subject and Text 3

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 24 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Automate WordPress contact form (CF7) responses and classification with Gemini
Complexity advanced
Nodes 24
Categories Ticket Management, Multimodal AI
Author Davide
Published 08 Apr 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3472/3472.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automate WordPress contact form (CF7) responses and classification with Gemini do?

This workflow optimizes the management of inquiries received through a contact form (Contact Form 7 CF7 Plugin) on a WordPress site , automating the process of classification, response drafting, an...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Ticket Management, Multimodal AI use case.