Quick Overview
This workflow benchmarks salary buckets by role using an Apify actor, scores and summarizes changes with OpenAI, stores results in Google Sheets, and sends hot alerts to Slack for approval plus warm and weekly digests via Gmail.
How it works
- Runs daily on a schedule (or manually), and also runs a separate weekly schedule that generates a 7-day email report.
- On daily runs, starts the Apify salary-transparency-index actor and polls Apify until the run succeeds or fails.
- Downloads the Apify dataset, validates required fields, and deduplicates rows against prior runs to keep only new salary buckets.
- Scores each bucket with rule-based criteria, then uses OpenAI to qualify and summarize it and blends the AI score with the rule score to assign a final tier.
- Upserts all scored rows into a Google Sheets tab using a stable key to avoid duplicates across reruns.
- Sends hot items to Slack as a single approval message and writes the approve/dismiss decision back to Google Sheets, while warm items are emailed as an HTML digest and cold items remain in the sheet only.
- On weekly runs, reads the last 7 days of rows from Google Sheets and emails a weekly summary report via Gmail.
Setup
- Create an Apify API token and add an HTTP Header Auth credential (Authorization: Bearer <token>) for the Apify HTTP requests.
- Connect OpenAI (chat model), Google Sheets, Slack, and Gmail credentials in n8n.
- Create a Google Sheet with a tab for the salary bucket table, then set the Google Sheet ID and tab name in the Config node.
- Set your Slack channel ID and digest email address in the Config node, and (optionally) adjust the Apify actor input, tracked roles, scoring thresholds, and AI criteria before activating the schedules.