Email Automation
Send post-visit Google review requests from Google Sheets via Gmail
On a schedule, it handles email using SMTP Email, Google Sheets.
What it does
## Post-visit Google review requests with opt-out Emails each client a link to your Google review page after a completed visit, and never asks anyone who opted out. ### How it works 1. Every hour, the workflow reads the Visits tab of your Google Sheet. 2. It picks completed visits that ended at least delay_hours ago and no more than max_age_days ago. It skips clients who were already asked or opted out, and emails each address only once per run. Nothing is sent during quiet hours (21:00 to 08:00 by default). 3. Before sending, it writes sending into review_status, waits 15 seconds and checks that the row still holds exactly that value. If it doesn't, the owner gets an email and the run stops. After sending, it saves review_requested_at and reads it back. A failed send is tried again on later runs, up to 3 attempts in total. 4. The unsubscribe link in each email is signed. It opens a confirmation page, and clicking Unsubscribe sets opt_out to TRUE on every row with that email. ### Setup 1. Create a Visits tab with the columns visit_id, client_name, email, visit_end, timezone, status, review_requested_at, opt_out, review_status. 2. Connect your Google Sheets and SMTP credentials on the nodes that ask for them. 3. In Config, set the sheet URL, timezone, sender, owner email, review link and a random optout_secret. Copy the Production URL of Unsubscribe link into optout_url. Nothing is sent until both are set. 4. Set the same timezone in the workflow settings. Test while the workflow is inactive, then activate it. Don't start manual runs while the schedule is active. ### Limits - The duplicate-send check works through the sheet, so it's best effort, not a hard lock. - Runs start an hour apart and each one times out after 5 minutes, so they shouldn't overlap. - Don't add, delete or sort rows while a run is going. - If a run times out or n8n restarts mid-run, check the execution, your mailbox and the sheet before you clear a sending claim. ### Customize Change the email wording in Select visits to ask, or the schedule in Every hour.
The steps
- Every hour
- Config
- Read Visits
- Select visits to ask
- Send or report?
- Claim review request
- Save claim
- Wait for overlapping runs
- Re-read Visits (claims)
- Confirm claims
- Claim confirmed?
- Prepare stop alert: claim not owned
- Alert owner before stop: claim not owned
- Stop: claim not owned
47 steps in total.
Similar automations
Email AutomationSend post-appointment review requests via email and SMS using Google Sheets33 stepsEmail AutomationSend multilingual after-visit voice instructions with OpenAI, ElevenLabs, Gmail and16 stepsEmail AutomationSend dog walking visit report cards with DeepSeek and Google Sheets27 stepsEmail AutomationReview and approve pending WordPress posts with Gemini and Slack22 steps