n8n

How to Automate Gmail Replies and Feedback Tracking?

Handle inbound emails without manual typing. New emails trigger an AI reply and save the full exchange into Google Sheets. A feedback link lets people rate the reply, so you can learn and improve over time.

The flow starts with Gmail receiving a message. It parses the body, checks token limits, and uses OpenAI to draft a reply with a size cap. The reply goes back through Gmail with a feedback link that calls an n8n webhook and shows a thank you page. All details are logged to Google Sheets, including the email, the AI response, a unique ID, and any feedback. If a sheet does not exist, it creates one and stores its ID so future runs update the same sheet.

Setup is simple. Connect Gmail, Google Sheets, and OpenAI in n8n. Pick who should get replies with the recipients setting. You can leave the sheet fields empty for a first run to auto create the sheet, then store the IDs for future runs. Expect faster response times, a clean record of every exchange, and quick feedback you can use to tune messages for support teams and inbox managers.

What are the key features?

  • Gmail trigger checks for new emails and filters allowed recipients
  • Advanced parser extracts clean message text from raw email content
  • Token limit check prevents oversized inputs from breaking replies
  • OpenAI generates a reply with a set max token size
  • Gmail sends an HTML reply that includes a unique feedback link
  • Webhook captures feedback and shows a thank you HTML page
  • Google Sheets creates a sheet if missing and logs each exchange
  • Global storage keeps the sheet ID so future runs update the same file
  • UUID links each reply to the exact feedback record
  • Safety paths skip sending if the reply is not complete or sender is blocked

What are the benefits?

  • Reduce manual email replies from 60 minutes a day to 5 minutes
  • Automate up to 80 percent of repetitive responses
  • Keep a single source of truth for every email and reply in Google Sheets
  • Capture real user feedback on replies to guide message tuning
  • Handle higher email volume without adding staff

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Gmail, Google Sheets and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, open the Gmail trigger node and the send email node. In the Credential to connect with dropdown, click Create new credential and follow the on screen steps to sign in with your Google account.
  4. Open the Google Sheets nodes. In the Credential to connect with dropdown, click Create new credential and connect your Google account so the workflow can create and update spreadsheets.
  5. Open the OpenAI node. Create a new credential and paste your API key from the OpenAI account API page. Name the credential clearly so you can reuse it later.
  6. Open the Configure node. Set recipients to a comma separated list of emails or use * to reply to all senders. Adjust maxTokenSize and replyTokenSize to match your model limits.
  7. If you want the workflow to auto create a sheet, leave spreadsheetId and worksheetId empty and set spreadsheetName and worksheetName. Run once to create and store these IDs.
  8. Send a test email to the Gmail inbox. Confirm the flow generates a reply, sends it back, and writes a new row to the Google Sheet.
  9. Click the feedback link in the reply. Verify you see the thank you page and that the feedback value appears in the same row in Google Sheets.
  10. If the email is too long and no reply is sent, increase replyTokenSize or trim the input text. Check the Is text within token limit path and the related sticky note for guidance.
  11. If no rows appear, confirm the Google Sheets credential has access to your drive and that the sheet name matches the Configure values. If the sheet ID in static data is stale, duplicate the workflow to reset stored IDs.
  12. Review the Only continue for specific emails filter. Update the recipients list if a sender should not receive automated replies.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

Google Sheets

Sign up

Free: $0 (Google Sheets API usage has no additional cost; quota limits apply)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.