Quick overview
This workflow checks official French product recalls from the RappelConso API against your Google Sheets catalog, uses Google Gemini to assess severity and draft recommended actions and a customer notice, then emails urgent alerts and a per-run summary via Gmail while logging matched recalls back to Google Sheets.
How it works
- Runs every day at 7:00 or starts from an n8n Form submission where a user provides brands/products, an email address, and optional parameters.
- Loads watch terms from Google Sheets (scheduled) or splits the submitted form terms, then normalizes them into brand, keyword, and GTIN values.
- Reads the existing “Recall log” from Google Sheets and fetches recent recall records from the RappelConso public API for the configured lookback window.
- Matches each recall against your watch terms (brand, keyword, and GTIN), skipping recalls that have already been logged for scheduled runs.
- Assigns an initial severity using rule-based keywords and asks Google Gemini to return severity, business impact, suggested actions, and a short customer notice using only the recall data.
- Emails an immediate Gmail alert for recalls marked urgent, and for scheduled runs appends the recall details to the Google Sheets “Recall log.”
- Sends a single Gmail summary email listing all matched recalls for the run, or sends a “no recall found” email for on-demand checks.
Setup
- Create a Google Sheets file with a “Catalog” sheet (Brand, Product keyword, GTIN columns) and a “Recall log” sheet, then paste the spreadsheet URL into the Google Sheets nodes.
- Add Google Sheets OAuth credentials for the catalog read, recall log read, and recall log append actions.
- Add a Gmail OAuth credential and set the report recipient email (and optional urgent recipient) in the workflow options so alert and summary emails can be delivered.
- Add a Google Gemini (Google AI Studio) API key/credential for the Gemini chat model used to assess recalls and draft text.
- Optionally adjust the lookback window, business description, and risk keywords in the workflow options, and set this workflow as its own Error Workflow with an alert email for failure notifications.