Extract invoice data and send payment reminders with Google Drive, Mistral, Groq and Gmail
Quick overview This workflow monitors a Google Drive folder for new receipt or invoice images, uses Mistral AI OCR and a Groq-hosted LLM to extract key fields, writes the results to Google Sheets, and sends scheduled Gmail reminders when document dates are 7, 3, 1, or 0 days away.
How it works Triggers when a new file is created in a specified Google Drive folder. Downloads the new Google Drive file and sends it to Mistral AI to extract OCR text from the image. Uses a Groq Chat LLM chain to parse the OCR text into JSON containing the document date, total amount, and company name. Formats the extracted fields, adds the Google Drive file ID and link, and upserts the record into a Google Sheets table keyed by the Drive file ID. Runs on a daily schedule and reads all rows from the same Google Sheets document. Filters rows whose document date is exactly 7, 3, 1, or 0 days from today and emails a payment reminder for each matching row via Gmail.
Setup Connect credentials for Google Drive, Google Sheets, Mistral Cloud, Groq, and Gmail. Set the Google Drive trigger to watch your target folder for new files. Update the Google Sheets document and sheet tab in both the write (append/update) and read steps, and ensure the sheet has columns for ID, Document_date, Total_Note, Company_Name, and Note_Link. Replace the "[ReceiverEmail]" placeholder with the destination email address for reminders. Adjust the daily schedule timing and the reminder-day logic (7, 3, 1, 0) if you want different notification intervals.
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