Guard AI marketing email runs with FirstHelm, OpenAI, Gmail and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 19 nodes and runs on Gmail events (specific label). Along the way it connects Gmail, OpenAI, Google Sheets and Slack. It also calls firsthelm.dev over HTTP.
How it runs
Trigger: On Gmail events (specific label).
- Set Request Details (Edit Fields (Set)): sets 4 fields: requester_email, subject, body…
- Post Log for Run Request (HTTP Request): calls firsthelm.dev (POST)
- Post to Evaluate Budget Constraint (HTTP Request): calls firsthelm.dev (POST)
- Parse Budget-Gate Verdict (Code): runs custom JavaScript code
- Check Approval for AI Run (If): checks a condition and branches into true / false
- OpenAI: uses OpenAI
- Check if Budget Approval Needed (If): checks a condition and branches into true / false
- Build Run Financial Record (Code): runs custom JavaScript code
- Post Approval Request to FirstHelm (HTTP Request): calls firsthelm.dev (POST)
- Notify Slack for Budget Block (Slack): post (message)
…plus 8 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
HTTP calls to: firsthelm.dev
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.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (When Marketing Email Received).
Nodes used (10)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - OpenAI
@n8n/n8n-nodes-langchain.openAi - Gmail
n8n-nodes-base.gmail - Google Sheets
n8n-nodes-base.googleSheets - Slack
n8n-nodes-base.slack - Wait
n8n-nodes-base.wait
From the author
Quick overview This workflow monitors Gmail emails labeled MARKETING and uses FirstHelm to enforce a budget guardrail before generating marketing copy with OpenAI, then emails approved results back to the requester, logs spend to Google Sheets, and notifies…