See llms.txt for all machine-readable content.

Back to Templates

Score SAM.gov contract notices with Apify, OpenAI, Google Sheets and Slack

Quick Overview

This workflow checks SAM.gov opportunities via an Apify actor, scores each notice with rules plus OpenAI, saves results to Google Sheets, and routes hot items to Slack for approval and warm items to a daily Gmail digest, with a weekly Gmail report and Slack error alerts.

How it works

  1. Runs daily on a schedule (or manually), and on Mondays runs a weekly reporting branch.
  2. For daily runs, starts an Apify actor for SAM.gov opportunities, then waits and polls Apify until the run succeeds or fails.
  3. Downloads the Apify dataset results, validates required fields, and deduplicates against previously seen notices.
  4. Scores each notice with rule-based criteria and uses OpenAI to generate a structured fit score, verdict, summary, outreach angle, and red flags, then blends rule and AI scores into a final tier.
  5. Upserts all scored notices into a Google Sheets tab using a stable key to avoid duplicates.
  6. Posts hot notices to a Slack channel for approve/dismiss and writes the review decision back to Google Sheets, while warm notices are emailed as an HTML digest via Gmail and cold notices remain in the sheet only.
  7. For the weekly branch, reads the last 7 days of rows from Google Sheets, builds a tier/review summary with the top opportunities, and emails it via Gmail.

Setup

  1. Add an Apify API token as an HTTP Header Auth credential (Authorization: Bearer <token>) and select it in the Apify HTTP Request nodes.
  2. Connect your OpenAI credentials (or replace the chat model with another supported provider) and keep the structured output format expected by the workflow.
  3. Connect Google Sheets OAuth credentials, create a sheet tab with the expected columns, and set the Google Sheet ID and tab name in the Config values.
  4. Connect Slack OAuth credentials and set the target channel ID in Config (and in the error-alert Slack node if you use a different alerts channel).
  5. Connect Gmail OAuth credentials and set the digest recipient email in Config, then adjust the Apify actor input and scoring thresholds/keywords in Config to match your bid criteria.