GenAiHub

Last checked 24 November 2026 — responded normally.

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

Quick overview

Live
Open / InstallLast updated November 24, 2026

Description

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 Triggers every 5 minutes when a new Gmail message arrives with the MARKETING label. Logs the requested run to FirstHelm and calls FirstHelm’s constraint evaluation endpoint with an estimated cost to get an allowed, needs_approval, or blocked verdict. If the verdict is allowed, it generates the marketing email copy with OpenAI and calculates token usage and an estimated cost for auditing. 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. If the verdict is needs_approval, it creates an approval request in FirstHelm, posts a Slack message to #ai-budget-approvals, waits, and then re-checks the budget gate in FirstHelm. If the run is blocked (initially or after re-check), it posts a Slack notification and logs the blocked decision to FirstHelm without calling the OpenAI model. Setup Create a FirstHelm agent, configure spend constraints, and replace YOUR_AGENT_ID and YOUR_FIRSTHELM_API_KEY in all FirstHelm HTTP requests. Connect Gmail credentials, create/apply a MARKETING label, and ensure the trigger monitors that label. Add Slack credentials and set (or create) the #ai-budget-approvals channel used for approval and block notifications. Add Google Sheets credentials and replace YOUR_SPREADSHEET_ID (and ensure a sheet named “Spend” exists) for spend logging. Add OpenAI credentials for the OpenAI node and adjust the model/prompt if you want different copy output or cost assumptions. Additional info Preferred listing title: Block expensive AI agent runs with a budget guardrail via FirstHelm. An n8n automation workflow template by Jason Bullen.

Community Metrics

Views
0
Avg Rating
N/A
Ratings
0
Likes
0
Comments
—

Author

Jason Bullen

Platform

web

Pricing model

free

Categories

  • Automation
  • AI

Tags

  • n8n
  • workflow
  • google-sheets
  • http-request
  • slack
  • gmail
  • code
  • openai

Capabilities

  • 6 nodes

Information

TypeWorkflow
Sourcen8n
AddedOctober 30, 2026

Comments

?

Others in the same category, ranked by how often they are opened.