Match lost and found items with OpenAI, SendGrid and Google Sheets
Quick overview This workflow accepts lost-and-found item reports via a webhook or a 20-minute schedule, uses OpenAI to generate an empathetic notification message, then sends the email through SendGrid and logs each processed case to Google Sheets.
How it works Triggers when a new item report is received via webhook POST or every 20 minutes on a schedule. Normalizes incoming fields (description, location, contact, itemType, timestamp, and preferences) into a consistent item-report schema. Runs a Python step to classify and validate the report and set a flag indicating whether it is a valid item to process. Filters out invalid reports and waits briefly to rate-limit requests before continuing. Sends the cleaned item report to OpenAI (GPT-4.1-mini) to generate a concise, empathetic notification with recovery steps and match details when applicable. Formats the AI output and then emails the notification to the reporter via the SendGrid Mail Send API while appending the case details to a Google Sheets tracker.
Setup Add an OpenAI API credential for the OpenAI Chat Model used by the AI matching step. Configure SendGrid authorization for the SendGrid Mail Send API request and replace the "from" email address used in the email payload. Connect Google Sheets (OAuth2) and replace YOUR_SHEET_ID (and sheet/range if needed) in the Google Sheets append request. If using webhook intake, copy the webhook URL from n8n and configure your reporting source to POST JSON fields like description, location, and contact to that endpoint.
Related Templates
AI Email Classifier & Auto-Delete for Gmail (SPAM/OFFER Cleaner)
This workflow is designed for freelancers, solopreneurs, and business owners who receive a high volume of irrelevant mes...
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Auto-classify Gmail emails with AI and apply labels for inbox organization
Who is this for? Professionals and individuals who receive high volumes of emails, those who want to automatically organ...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments