Detect Meta Ads spend anomalies and creative fatigue with OpenAI and Slack
Ready for 3.0What this workflow does
This AI workflow has 54 nodes and runs on a schedule (cron 0 9 * * *) (plus 2 other triggers). Along the way it connects Slack, Google Sheets, OpenAI Chat Model and HTTP Request.
How it runs
Trigger: On a schedule (cron 0 9 * * *) (plus 2 other triggers).
- Set Workflow Config (Edit Fields (Set)): sets 30 fields: ad_accounts, graph_version, default_slack_channel…
- Acknowledge Slack Within 3s (Respond to Webhook): sends the response back to the webhook caller
- Send Workflow Error Alert to Slack (Slack): uses Slack
- Is Scheduled Run? (If): checks a condition and branches into true / false
- Read Alert Log Sheet (Google Sheets): uses Google Sheets
- Parse Slack Button Payload (Code): runs custom JavaScript code
- Split Ad Accounts (Code): runs custom JavaScript code
- Route by Action Type (Switch): routes items into 5 branches
- Loop Over Ad Accounts (Loop Over Items (Split in Batches)): loops over the items in batches
- Pause Ad in Meta (HTTP Request): calls an HTTP API (POST)
…plus 36 more steps. See the full node list below.
Services it uses
Other OpenAI + Google Sheets templates (2,011) · Other Google Sheets + Slack templates (1,314) · Other OpenAI + Slack templates (979)
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (18)
- Error Trigger
n8n-nodes-base.errorTrigger - Slack
n8n-nodes-base.slack - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Webhook
n8n-nodes-base.webhook - Respond to Webhook
n8n-nodes-base.respondToWebhook - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - HTTP Request
n8n-nodes-base.httpRequest - Wait
n8n-nodes-base.wait - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Http Request Tool
n8n-nodes-base.httpRequestTool - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Split Out
n8n-nodes-base.splitOut
From the author
Quick overview This workflow runs daily and pulls Meta Ads account and ad insights from the Meta Graph API, detects spend/performance anomalies and creative fatigue, uses OpenAI (gpt-4o-mini) to propose fixes for flagged accounts, and posts either an alert or…