See llms.txt for all machine-readable content.

Back to Templates

Score new NIH research grants with Apify, OpenAI, Google Sheets and Slack

Quick Overview

This workflow runs daily to fetch newly awarded NIH research grants via an Apify actor, scores and summarizes them with OpenAI, stores results in Google Sheets, and routes hot grants to Slack for approval and warm grants to a Gmail digest, plus a weekly email report.

How it works

  1. Runs on a daily schedule (or manually), and uses a separate weekly schedule to send a 7-day report instead of fetching new data.
  2. On daily runs, starts the Apify “nih-research-grants-awarded” actor, then waits and polls the Apify Runs API until the run succeeds or fails.
  3. When the run succeeds, downloads the actor dataset items from Apify, removes incomplete rows, and deduplicates grants against recent runs.
  4. Scores each new grant using rule-based criteria (award size, topic keywords, state, grant type, and recency) and then calls OpenAI to generate a structured fit score, verdict, summary, outreach angle, and red flags.
  5. Combines the rule score with the OpenAI fit score to set a final tier, then upserts all scored grants into Google Sheets.
  6. Sends hot grants to Slack as a single approval message and writes the approve/dismiss decision back to Google Sheets, while sending warm grants as an HTML digest via Gmail and leaving cold grants only in the sheet.
  7. On weekly runs, reads the last 7 days of rows from Google Sheets, builds a top-10 summary, and emails the report via Gmail.

Setup

  1. Create an Apify token and configure an HTTP Header Auth credential (Authorization: Bearer <token>) for the Apify HTTP requests.
  2. Connect Google Sheets credentials, create a sheet tab with the expected columns, and set the Google Sheet ID and tab name in the Config values.
  3. Connect an OpenAI credential (or replace the model node with another supported chat model) and review the aiCriteria and aiWeight settings in Config.
  4. Connect Slack credentials, set the target Slack channel ID in Config (and the error-alert Slack channel ID in the error alert node).
  5. Connect Gmail credentials and set the digest recipient email address in Config for the warm digest and weekly report.