Quick overview
This workflow checks Meta (Facebook) ad account pixels for inactivity using the Meta Marketing API, flags pixels that have stopped firing beyond a defined threshold, asks Anthropic Claude to suggest likely causes and first checks, and emails a readable flatline report via Gmail.
How it works
- Runs manually (or can be switched to a schedule) to start a pixel health check.
- Fetches all Meta ad pixels and their
last_fired_time from the Meta Marketing API.
- Calculates how many hours each pixel has been quiet and flags pixels as OK, warning, flatlined, or never fired based on your thresholds.
- Sends the flatlined (and optionally never-fired) pixel list to Anthropic Claude to generate a concise JSON diagnosis with a likely cause and first check per pixel.
- Formats the AI output into a human-readable “Meta Pixel Flatline Report” including counts, threshold, and per-pixel diagnostics.
- Emails the report using Gmail.
Setup
- Set environment variables for
META_ACCESS_TOKEN, META_AD_ACCOUNT_ID, and optionally META_API_VERSION to allow the workflow to call the Meta Marketing API.
- Set the
ANTHROPIC_API_KEY environment variable to enable the Claude diagnosis request.
- Add a Gmail credential and configure the Gmail node’s recipients/subject as needed for where the report should be sent.
- Adjust
FLATLINE_HOURS, WARN_HOURS, and IGNORE_NEVER_FIRED in the configuration step to match your pixel traffic expectations.