See llms.txt for all machine-readable content.

Back to Templates

Track and qualify new business filings with Apify, OpenAI, Sheets, Slack and Gmail

Quick Overview

This workflow runs daily to pull new business filings via an Apify actor, scores and qualifies them with OpenAI, and stores them in Google Sheets, sending hot leads to Slack for approval and warm leads to Gmail; a separate weekly trigger emails a 7‑day summary report.

How it works

  1. Runs on a daily schedule (or manually) and loads all settings such as Apify actor input, scoring thresholds, and delivery targets.
  2. Starts the Apify new-business-filings actor run via the Apify API, then waits and polls until the run succeeds or fails.
  3. Downloads the Apify dataset results, validates required fields, and deduplicates records against prior runs using workflow static data.
  4. Scores each new filing with rule-based criteria and sends each record to OpenAI to generate a structured fit score, verdict, summary, outreach angle, and red flags.
  5. Merges rule and OpenAI scores into a final tier (hot/warm/cold), then upserts all rows into Google Sheets to avoid duplicates across re-runs.
  6. Sends hot rows to Slack as a single approve/dismiss message and writes the review decision back to Google Sheets, while warm rows are emailed as an HTML digest via Gmail and cold rows remain in the sheet only.
  7. On a separate weekly schedule, reads the last 7 days of rows from Google Sheets, builds a top-leads summary, and emails the weekly report via Gmail.

Setup

  1. Create an Apify API token and configure an HTTP Header Auth credential (for example, Authorization: Bearer <token>) for the Apify HTTP Request steps.
  2. Connect Google Sheets credentials, create a spreadsheet tab (for example, “Filings”) with the expected columns, and set the Google Sheet ID and tab name in the Config step.
  3. Add OpenAI credentials (or replace the chat model) and keep the structured output format compatible with the workflow’s JSON parser.
  4. Connect Slack credentials, set the target Slack channel ID in Config (and in the error-alert Slack step if you use that branch), and ensure the workflow can receive the approval response.
  5. Connect Gmail credentials and set the digest email address in Config for the daily warm digest and Monday weekly report.