Quick overview
This workflow receives cleaning enquiries from a website form via a webhook, normalizes the submitted fields, logs each enquiry to Google Sheets, and (optionally) sends acknowledgement and owner-notification emails through Gmail based on postcode-to-owner routing.
How it works
- Receives a POST request on a webhook endpoint when a website enquiry form is submitted.
- Normalizes common WordPress form payloads into consistent fields (contact details, message, and postcode) and generates a human-readable enquiry reference.
- Rejects likely spam or incomplete submissions (for example, missing/invalid email or a filled honeypot field) and returns a JSON response to the website.
- Assigns the enquiry to an area owner by matching the postcode prefix against configured rules and prepares customer and internal email content, including standard follow-up questions.
- Appends the enquiry as a new row in a Google Sheets tracker so the enquiry is recorded even if email sending fails.
- If sending is enabled, sends the acknowledgement email to the customer and (if the owner email is set) sends a notification email to the assigned owner via Gmail, then returns a JSON response containing the enquiry reference.
Setup
- Create or choose a Google Sheets tracker with the expected header columns (for example Ref, Received, Stage, Owner, Email, Postcode, and Notes) and paste its Sheet ID and tab name into the config values.
- Connect Google Sheets credentials in n8n for the workflow to append rows to your tracker spreadsheet.
- Connect Gmail credentials in n8n and set the config values for From name, Reply-To, and owner email addresses (and optionally a test email).
- Update the postcode-to-area routing rules (areas, owners, and postcode prefixes) in the config so enquiries are assigned correctly.
- Copy the webhook URL from the trigger and configure your WordPress form/plugin to POST submissions to that endpoint.
- Choose your run mode in config by setting TEST_RUN/TEST_EMAIL (preview/test/live) before activating the workflow.