Daily FDA drug recall watcher for your pharmacy
Every weekday at 8am ET, check the FDA for new recalls affecting drugs you stock, and ping the responsible buyer in Slack.
Build me a daily drug recall watcher for our pharmacy as a code workflow.
Trigger: cron. Run every weekday (Monday through Friday) at 8:00am America/New_York.
Step 1. Read our watchlist from Airtable using the List Records operation. The base has one row per drug we stock, with columns for brand name, generic name, NDC, and the responsible buyer's Slack handle (or user ID). Page through all records.
Step 2. For each watchlist row, call openFDA's Search Drug Recall Enforcement Reports operation. Filter to records where recall_initiation_date is within the last 24 hours and where openfda.brand_name or openfda.generic_name matches the row's brand or generic name. Treat a 404 from openFDA as "no matches" rather than as a fatal error, because openFDA returns 404 when zero records match.
Step 3. For every match, post a message in our #pharmacy-recalls Slack channel using Slack's Send a Message operation. Include the recall class (Class I, II, or III), reason for recall, recall status, recalling firm, affected lot numbers and distribution pattern, and a link back to the openFDA enforcement report. Tag the buyer from the watchlist row so they are notified directly.
Step 4. If no rows produced any matches, exit silently without posting anything. We do not want a "nothing to report" message on quiet days.
Use openfda, airtable, and slack as the integrations. openFDA is a public no-auth API, so no credential setup is needed for it.
Additional information
What does this prompt do?
- Reads your pharmacy's drug watchlist from an Airtable base, one row per stocked product, with brand name, generic name, NDC, and the buyer who owns it.
- Checks the FDA's recall enforcement database every weekday morning for new drug recalls filed in the last 24 hours.
- Posts a Slack message in your recalls channel for every match, with the recall class, reason, status, recalling firm, affected lots, and a link back to the FDA report.
- Tags the buyer who owns the affected product so the right person sees it first.
- Stays silent on quiet days so the channel only lights up when there is something real to act on.
What do I need to use this?
- An Airtable base with one row per drug you stock. Each row should have brand name, generic name, NDC, and the Slack handle of the buyer who owns the product.
- A Slack workspace with a channel for pharmacy recall alerts (for example, #pharmacy-recalls).
- No FDA account needed. The FDA's recall data is public.
How can I customize it?
- Change the schedule. The default is weekdays at 8am ET, but you can run it twice a day, hourly, or only on weekends.
- Swap the Slack channel or route alerts to a DM to the buyer instead of a public channel.
- Adjust the match window. The default looks at the last 24 hours of recall filings, but you can widen it for a Monday catch-up or narrow it for an hourly run.
- Filter by recall class. For example, only alert on Class I (most serious) recalls and skip Class II and III.
Frequently asked questions
Do I need an FDA account or API key?
What happens on days with no recalls?
How do I add or remove drugs from the watchlist?
Can I tag a buyer instead of posting to a shared channel?
What if a recall matches a drug we no longer stock?
Stop scanning FDA bulletins by hand.
Connect Airtable and Slack once, and Geni checks the FDA for fresh recalls against your watchlist every weekday morning.