Quick Overview
This workflow monitors Gmail for new emails, screens potential podcast guest pitches with rule-based spam checks and OpenAI classification, then applies Gmail labels and optionally drafts personalized replies, plus a daily digest email summary.
How it works
- Polls Gmail every minute for new emails and pulls message content.
- Normalizes each email (sender, subject, body, links) and fetches message metadata from the Gmail API to list attachment names.
- Scores spam and scam signals using rule-based checks on sender details, links, and attachment names.
- Uses OpenAI to classify whether the email is a guest pitch and to rate topic match, fit score, and risk based on your show settings.
- Combines the rule score and OpenAI output into a verdict (Strong Fit, Maybe, Not a Fit, Spam/Pay-to-Play, or Not a Pitch) and creates any missing Gmail labels before applying the correct label to the message.
- For Strong Fit and Maybe pitches, uses OpenAI to write a reply draft, skips threads that already contain a draft, and saves the new draft in Gmail with placeholders highlighted and an optional “Needs Details” label when required.
- On a daily schedule, compiles the saved screening results into a text digest and emails it to the configured owner address.
Setup
- Connect a Gmail OAuth2 credential for all Gmail nodes, including the HTTP request to the Gmail API and the steps that create labels, apply labels, create drafts, and send the digest.
- Add an OpenAI credential for the two OpenAI steps (classification and reply drafting) and confirm the model ID in Settings (default: gpt-4.1-mini).
- Fill in the show profile in Settings (show name/about, topics, optional audience/must-haves/dealbreakers, reply style, booking link, and scoring thresholds) and optionally add trusted_senders/known_bad_senders.
- Decide which drafts to create by toggling draft_strong_fit and draft_maybe, and set the Gmail label prefix if you want something other than AI/.
- If you want the daily digest, set Digest Settings owner_email (and optionally send_when_empty) and confirm the schedule time matches your instance timezone.