Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Email Automation

Email Automation

Audit Instagram post performance with Apify, OpenAI, Google Sheets, Slack and Gmail

On a schedule, it handles email with OpenAI / ChatGPT using Gmail, Google Sheets, Slack, Apify.

What it does

## Instagram post performance audit with an account-relative score Collects recent photos, carousels and videos from the public accounts you list and scores each post against that account's own median in the same run, so a post that does 2x its usual likes stands out even for a small account. ### How it works 1. A schedule or manual run reads everything from Config. 2. The Apify actor runs asynchronously; the flow waits and polls until it ends. 3. Results are validated and deduped against earlier runs. 4. A rule score plus an AI chain (structured output) rate each record. 5. Rows are saved to Google Sheets; hot ones go to Slack for approve or dismiss, warm ones to an email digest. 6. A weekly report and an error alert branch run separately. ### Setup 1. Create an HTTP Header Auth credential (Authorization: Bearer ) and pick it on the Apify nodes. 2. Add a Google Sheet tab matching the sheet columns and paste its ID into Config. 3. Connect OpenAI (or any chat model), Slack and Gmail; set the Slack channel and digest email in Config. 4. Fill the actor input and the scoring keywords in Config, run once manually, then activate. ### Customization tips - Change the rule weights in the scoring Code node and the aiCriteria text. - Swap Slack or Gmail for Teams, Discord, HubSpot or Airtable; delivery nodes only read $json. Disclosure: I maintain these Apify actors (account transparent_meteorite). The actor is a paid pay-per-event Apify tool; check its Store page for current pricing before scheduling.

The steps

  1. Daily schedule
  2. Run manually
  3. Weekly report schedule
  4. Config
  5. Daily run or weekly report?
  6. Start Apify run
  7. Wait before polling
  8. Get run status
  9. Check run status
  10. Route by run status
  11. Stop: Apify run failed
  12. Fetch dataset items
  13. Validate and dedupe
  14. Any new records?

35 steps in total.

Similar automations