Quick overview This workflow accepts an invoice file via an n8n chat trigger, uses Google Gemini to extract structured invoice data, validates it against an existing Google Sheets log, appends valid line items to the sheet, and sends a formatted confirmation or failure alert via Gmail. How it works Receives a chat message with an uploaded invoice document. Uses Google Gemini to extract the vendor, invoice number, date, total amount, and all line items as a clean JSON object. Converts the extracted JSON into per-line-item records, builds an HTML invoice summary for email, and loads existing rows from Google Sheets for comparison. Validates each item by checking for missing critical fields and whether the invoice number already exists in Google Sheets. If validation passes, appends each line item as a new row in Google Sheets and then prepares a summary of the inserted data. Sends a Gmail message with the formatted HTML invoice breakdown when processing succeeds, or sends a Gmail alert email explaining the validation failure. Setup Add Google Gemini (PaLM) API credentials and ensure the chat trigger allows file uploads so the invoice is available as binary input.
Tags
Related workflows
See all AI Automation→Extract and validate invoice data from Google Drive using OCR.Space, Gemini, and Google Sheets
Quick overview This workflow monitors a Google Drive folder for newly uploaded invoice files, extracts text with OCR.Space, uses Google Gemini to convert the OCR text into structured invoice fields, validates required values, then stores results in Google Sheets and sends Gmail notifications for success or manual review. How it works Triggers when a new file is created in a specified Google Drive folder. Downloads the uploaded invoice file from Google Drive and checks that the MIME type is PDF, JPG, JPEG, or PNG. Sends the file to the OCR.Space API to extract the invoice text and stops if OCR reports a processing error. Uses Google Gemini to convert the OCR text into structured JSON containing supplier, invoice metadata, amounts, currency, and line items. Validates and normalizes the extracted fields, flags missing required values, and marks the record for manual review when needed. If manual review is required, sends a Gmail alert listing missing fields; otherwise, appends key invoice fields to Google Sheets and sends a Gmail confirmation email. Setup Connect Google Drive OAuth2 credentials and set the folder ID to watch for invoice uploads. Provide an OCR.Space API key and ensure
Qualify voicemail leads with Twilio, Google Gemini, Gmail and Google Sheets
Quick overview When a buyer or seller leaves a voicemail, this workflow transcribes it automatically, qualifies their intent using Gemini AI, sends an instant SMS acknowledgment, and alerts the agent for Hot leads — turning every missed call into a qualified lead within seconds. How it works Receives a POST webhook from Twilio when a voicemail recording and transcription are completed. Validates the voicemail by checking that the recording is completed, the transcription is completed, and the call duration is longer than 5 seconds. Extracts the transcript, caller phone number, call SID, duration, and recording URL, then sends the transcript to Google Gemini to return structured lead details, a Hot/Warm/Cold score, and draft SMS/email replies. Parses and sanitizes the Gemini JSON output, applies fallbacks if parsing fails, optionally appends a Google Calendar booking link for Hot leads, and builds an agent-ready HTML summary including the transcript and recording link. Sends an acknowledgment SMS to the caller via Twilio, and sends an acknowledgment email via Gmail only when a caller email address is available. Appends the lead details, transcript, and messaging status to a Google S
Route supplier risk alerts from Gmail to Slack with Gemini and Google Sheets
Quick overview This workflow monitors incoming Gmail messages from suppliers, uses Google Gemini to analyze sentiment and relationship risk, generates an engagement strategy for risky emails, sends an alert to Slack, and logs the analysis and recommended response to Google Sheets. How it works Triggers every minute by checking Gmail for new incoming emails. Filters out irrelevant messages (for example newsletters, unsubscribe emails, no-reply senders, and auto-replies) and keeps only valid supplier emails. Extracts the sender, subject, and email snippet into a single text block and waits briefly to buffer processing. Sends the email text to Google Gemini to return a structured JSON analysis with sentiment score/label, intent, urgency, key concern, and deterioration risk, then normalizes these fields and derives a trend. Flags the interaction as high risk based on the deterioration risk value or a low sentiment score and waits briefly before continuing. Uses Google Gemini to generate a concise engagement strategy (recommended action, draft opening message, and follow-up timeline), then parses it and formats a Slack-ready alert. Sends the alert to a selected Slack user and appends th