Quick Overview
This workflow runs daily to scrape listed Instagram public profiles with an Apify actor, scores and summarizes creators with OpenAI, and upserts results into Google Sheets, then routes hot profiles to Slack for approval and warm profiles to a Gmail digest, with a separate weekly email report.
How it works
- Runs on a daily schedule (or manually) and loads all thresholds, Apify actor input, and destination settings from a central configuration step.
- Starts the Apify Instagram public profile scraper run, then waits and polls the Apify API until the run succeeds or fails.
- Fetches the Apify dataset results, removes incomplete rows, and de-duplicates creators already seen in recent runs using persistent workflow memory.
- Calculates a rule-based score from follower range, engagement rate, contact details in bio, and recent posting, then uses an OpenAI chat model to generate a structured fit score, verdict, summary, outreach angle, and red flags.
- Blends the rule score and AI fit score into a final score and tier, then upserts each creator row into Google Sheets keyed by a unique record key.
- Sends hot-tier creators to Slack as an approval message and writes the approve/dismiss decision back to Google Sheets, while emailing warm-tier creators as an HTML digest via Gmail and keeping cold-tier creators in the sheet only.
- On Mondays, reads the last 7 days of rows from Google Sheets and emails a weekly HTML summary report via Gmail, and on any workflow failure posts an error alert to Slack.
Setup
- Create an Apify token and add an HTTP Header Auth credential (for example,
Authorization: Bearer <token>) for the Apify HTTP requests.
- Add Google Sheets OAuth credentials, create a spreadsheet/tab with the expected columns, and set the Google Sheet ID and tab name in the Config values.
- Add an OpenAI API credential (or replace the OpenAI chat model node with another LangChain-compatible chat model) and adjust the AI criteria and weighting in Config if needed.
- Add Slack OAuth credentials, set the target Slack channel ID in Config, and set the Slack channel ID used by the error-alert Slack step.
- Add Gmail OAuth credentials and set the digest recipient email address in Config for the warm digest and weekly report emails.