n8n + Apify · Government and public records
FDA, NHTSA and CPSC Product Recalls to Email with n8n
The Product Recall Feed reads FDA, NHTSA and CPSC recalls (plus Health Canada, UK and EU feeds) into one record shape and, in monitor mode, returns only recalls it has not returned before. A four-node n8n workflow built on Apify's official n8n node runs it every morning and e-mails the new recalls. No task or schedule in Apify is needed: n8n does the scheduling.
Product Recall Feed — FDA, NHTSA & CPSC Recalls API. Pay per result; see the Store page for current pricing.
What you build
An n8n Schedule Trigger starts the workflow at 7:00 every day. The Apify node runs the Actor with the input below and waits for it, a second Apify node reads the run's dataset, a filter drops error items, and an e-mail node sends one message per new recall with the product, the hazard and the agency link.
The input watches Class I FDA food and drug recalls plus CPSC consumer product recalls. Add a vehicles list for a fleet, or set keyword or firm to follow one product line or supplier. The product recalls guide covers every source and field.
Before you start
- An Apify account and its API token (Console → Settings → API & Integrations). The Actor is billed per result to that account; the Store page lists the current prices.
- An n8n instance, on n8n Cloud or self-hosted, with the Apify node installed. On self-hosted n8n: Settings → Community Nodes → Install, package
@apify/n8n-nodes-apify. On n8n Cloud: search for Apify in the nodes panel and install it (the instance owner may need to allow verified community nodes in the Cloud Admin Panel first). - An e-mail node with credentials: Gmail, or Send Email over SMTP.
Step 1: The input
This JSON goes into the Custom input field of the Run an Actor node in step 2:
{
"agencies": [
"fda-food",
"fda-drug",
"cpsc"
],
"daysBack": 30,
"fdaClassifications": [
"Class I"
],
"maxResultsPerSource": 100,
"onlyNewSinceLastRun": true,
"stateStoreName": "n8n-email-recalls"
}
With onlyNewSinceLastRun the Actor remembers, in a key-value store named n8n-email-recalls in your Apify account, which recalls it has returned, and each run returns only the new ones. The first run returns everything in the 30-day window. The window is long on purpose: FDA lists a recall in its enforcement report only after classifying it, which can be weeks after the firm's announcement, and monitor mode keeps the long window from sending anything twice. fdaClassifications applies to the FDA sources only; CPSC recalls pass through.
Step 2: Build the n8n workflow
1. Schedule Trigger
Create a workflow and add a Schedule Trigger that fires daily at the hour you want.
2. Apify: Run an Actor
Add the Apify node with the Run an Actor operation. Create a credential (Apify API with your token, or Apify OAuth2 API on n8n Cloud), choose the Product Recall Feed Actor (owlabee/product-recall-feed), paste the input above into Custom input, and set Wait for finish to true so the next node runs only after the run completes.
3. Apify: Get dataset items
Add a second Apify node with Get dataset items and set Dataset ID to the defaultDatasetId value from the Run an Actor output. It outputs one item per recall.
4. Filter
Add a Filter node that keeps items where error does not exist. An agency API that is down produces one error item such as FETCH_FAILED instead of failing the run.
5. E-mail: Gmail or Send Email
Add Gmail (send a message) or Send Email. n8n runs it once per recall. Use expressions for the subject and body, for example:
Subject: {{ $json.agency }} recall: {{ $json.title }}
{{ $json.product }}
Hazard: {{ $json.hazard }}
Firm: {{ $json.firm }}
Classification: {{ $json.classification }}
{{ $json.url }}
For one digest e-mail instead, put an Aggregate node before it. Save the workflow and activate it.
Fields to map
Each dataset item is one recall in the shared record shape:
| Field | Use it for |
|---|---|
agency, recallId | FDA, NHTSA or CPSC and the agency's recall number |
date, title, product | When and what was recalled |
hazard | FDA reason for recall, NHTSA consequence summary, or CPSC hazards |
classification, severity | FDA Class I/II/III, NHTSA or CPSC remedy type; severity where it can be derived |
firm, distribution, quantity | Recalling firm and distribution as published |
url | The agency record |
All fields are described in the Product recalls API guide.
Costs and limits
- Apify bills the Actor per recall record and per agency API request, at the prices on its Store page. In monitor mode later runs only return, and only charge per record for, new recalls.
- Apify's documentation lists OAuth2 credentials for n8n Cloud only; self-hosted n8n uses the API token credential.
- Agencies publish on their own schedules: openFDA enforcement reports update weekly, NHTSA and CPSC within days. The recalls guide covers each source.
FAQ
Can I trigger the workflow from an Apify schedule instead?
Yes. Save the input as a task with an Apify schedule and start the workflow with the Apify node's On new Apify event trigger (Resource to Watch: your task; Event Type: Succeeded), then read the dataset as in step 3. The website changes recipe uses that trigger.
Does it need an openFDA key?
No. An optional fdaApiKey only raises openFDA's rate limits.
Can I watch recalls for specific vehicles?
Yes. Add vehicles, one entry per vehicle as "make, model, year" (for example "Ford, F-150, 2021"). Each lookup returns every NHTSA recall on that vehicle.
Is this affiliated with n8n or the agencies?
No. owlabee is an independent developer on Apify Store, and the n8n node used here is Apify's own. Not affiliated with or endorsed by n8n, Google, Apify, the FDA, NHTSA or CPSC.