{"product_id":"n8n-ai-advocacy-email-workflow-openai-gmail-sheets","title":"n8n AI Advocacy Email Workflow: OpenAI + Gmail + Sheets","description":"\u003ch3\u003eTurn customer health signals into AI-crafted advocacy emails—automatically\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow takes customer interaction\/health data (via webhook or weekly schedule), scores advocacy potential in Python, uses OpenAI to generate a personalized outreach email, sends it through Gmail, logs activity to Google Sheets, and returns a JSON summary to the caller.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eIngests data\u003c\/b\u003e via a \u003cb\u003ePOST webhook\u003c\/b\u003e or runs \u003cb\u003eevery Monday at 8:00\u003c\/b\u003e to process incoming items.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eNormalizes customer fields\u003c\/b\u003e (e.g., \u003cb\u003eNPS, CSAT, tenure, spend, usage,\u003c\/b\u003e and \u003cb\u003esupport signals\u003c\/b\u003e) into a consistent customer schema.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eScores advocacy potential\u003c\/b\u003e and assigns an advocacy tier in \u003cb\u003ePython\u003c\/b\u003e, determining whether the customer qualifies as an advocacy candidate and selecting a recommended campaign type.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eFilters to qualified candidates\u003c\/b\u003e, then briefly \u003cb\u003ewaits to respect rate limits\u003c\/b\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eGenerates a structured outreach campaign with OpenAI\u003c\/b\u003e, including subject line, email body, tone, channel, incentive, and risk flags.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eSends the email via Gmail\u003c\/b\u003e and \u003cb\u003eappends results to Google Sheets\u003c\/b\u003e for tracking.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eReturns a JSON response\u003c\/b\u003e containing submission ID, score\/tier, campaign type, and status via the webhook response.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS teams identifying \u003cb\u003ehigh-potential advocates\u003c\/b\u003e from NPS\/CSAT and usage signals, then automatically triggering outreach.\u003c\/li\u003e\n  \u003cli\u003eCustomer success operations running a \u003cb\u003eweekly advocacy campaign\u003c\/b\u003e without manual segmentation or drafting.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers building an end-to-end pipeline: \u003cb\u003ewebhook → scoring → OpenAI email → Gmail send → Sheets log\u003c\/b\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eOpenAI\u003c\/b\u003e (chat model) for structured, personalized email generation\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eGmail\u003c\/b\u003e OAuth2 for sending from your connected mailbox\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eGoogle Sheets\u003c\/b\u003e logging via Sheets tracker append\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003en8n nodes used\u003c\/b\u003e: set, code, wait, gmail, filter, webhook\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eBuilt for professional n8n automation workflows that combine AI outreach with reliable delivery and audit-friendly tracking.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45741425754291,"sku":"N8N-17585","price":24.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/i6Cf0u83H437eiBRmi0H8_Z9SricpG.png?v=1785316560","url":"https:\/\/buyflowscripts.com\/products\/n8n-ai-advocacy-email-workflow-openai-gmail-sheets","provider":"N8N Commerce","version":"1.0","type":"link"}