Handle NPS survey responses with OpenAI, Gmail, and Google Sheets
Ready for 3.0What this workflow does
This workflow has 13 nodes and runs on a schedule (every 6 hours). Along the way it connects Google Sheets and Gmail. It also calls api.openai.com over HTTP.
How it runs
Trigger: On a schedule (every 6 hours).
- 2. Sheets - Read NPS Responses (Google Sheets): uses Google Sheets
- 3. Filter - Only Status New Rows (Filter): keeps only the items that match a condition
- 4. Code - Validate and Parse NPS Score (Code): runs custom JavaScript code
- 5. HTTP - OpenAI Generate Personalized Reply (HTTP Request): calls api.openai.com (POST)
- 5b. Code - Parse AI Reply and Build Email (Code): runs custom JavaScript code
- 6. Gmail - Send Personalized Reply to Customer (Gmail): uses Gmail
- 7. Switch - Route by NPS Segment (Switch): routes items into 3 branches
- 8. Sheets - Save Promoter Quote (Google Sheets): append
- 11. Sheets - Update Passive Status to Processed (Google Sheets): update
- 12. Gmail - Send Detractor Alert to Support Team (Gmail): uses Gmail
…plus 2 more steps. See the full node list below.
Services it uses
HTTP calls to: api.openai.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (7)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Sheets
n8n-nodes-base.googleSheets - Filter
n8n-nodes-base.filter - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Gmail
n8n-nodes-base.gmail - Switch
n8n-nodes-base.switch
From the author
Quick Overview This workflow runs every 6 hours to read new NPS survey responses from Google Sheets, generates a personalized reply with OpenAI, and sends the email via Gmail. It then routes promoters, passives, and detractors for follow-up actions and marks…