# Guard AI marketing email runs with FirstHelm, OpenAI, Gmail and Google Sheets

> 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 approvers in Slack when human approval is required. How it works 1. Triggers every 5 minutes when a new Gmail message arrives with the MARKETING label. 2. Logs the requested run to FirstHelm and calls FirstHelm’s constraint evaluation endpoint with an estimated cost to get an allowed, needsapproval, or blocked verdict. 3. If the verdict is allowed, it generates the marketing email copy with OpenAI and calculates token usage and an estimated cost for auditing. 4. Logs the completed run (cost and tokens) to FirstHelm, emails the generated copy to the original requester via Gmail, and appends a spend record to a Google Sheets spreadsheet. 5. If the verdict is needsapproval, it creates an approval request in FirstHelm, posts a Slack mes

- **Domain**: `n8n-workflow-21810.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/21810
- Page (HTML): https://agenstry.com/agents/n8n-workflow-21810.n8n.io
- Documentation: https://n8n.io/workflows/21810
