Quick overview This workflow monitors a Gmail inbox for PDF invoices, uses Groq (Llama 3.3) to extract structured invoice fields, validates the invoice against Purchase Orders in Google Sheets and tax rules in Notion, logs an audit entry to Notion, and notifies Slack and the supplier based on pass/fail. How it works Triggers every minute when a new email arrives in Gmail and downloads the attached PDF invoice. Extracts text from the PDF and sends it to Groq (Llama 3.3) to parse invoice fields into a structured JSON schema, including SEZ/LUT detection. Looks up the referenced PO number in Google Sheets and fetches applicable tax rules from a Notion database. Validates the invoice against the PO (existence, approval status, currency, and total amount) and against Notion tax rules (SEZ/import/domestic matching and GST expectations). Writes the compliance result, matched rule, and any violations to a Notion “Compliance Audit Log” database. If the invoice passes, posts an approval message to Slack and archives the PDF to a Google Drive folder. If the invoice fails, posts a blocking alert to Slack and emails the supplier a rejection notice listing the violations.
Tags
Related workflows
See all AI Automation→Archive and index legal PDFs from Gmail with Gemini, Sheets and Google Drive
Quick Overview This workflow monitors Gmail for unread emails with PDF attachments, uses Google Gemini to extract Japan Electronic Books Preservation Act filing metadata, logs a searchable index in Google Sheets, and archives documents into Google Drive folders while notifying Slack when extraction or classification fails. How it works Polls Gmail hourly for unread emails that contain attachments and downloads the attached files. Extracts text from the first PDF attachment. Sends the extracted text to Google Gemini to pull out transaction date, counterparty, amount, and document type, and alerts Slack if the document text cannot be read. Builds an Act-compliant PDF filename from the extracted fields and checks that date, counterparty, and amount are all present. If required metadata is missing, posts a warning to a Slack channel to handle the document manually. If metadata is complete, appends a row to a Google Sheets “Document Index”, marks the Gmail message as read to prevent reprocessing, and uploads the PDF to the matching Google Drive folder (invoice/receipt/contract) or flags it in Slack if unclassified. Setup Connect credentials for Gmail, Google Gemini (PaLM) API, Google Sh
Run AI employee onboarding with Groq, Google Workspace, and Gemini
Quick overview This workflow ingests onboarding documents from Google Drive into an in-memory vector store with Google Gemini embeddings, then runs a multi-channel onboarding chatbot powered by Groq, sends role-based welcome emails via Gmail when a new hire appears in Google Sheets, and schedules day 1/7/30 check-in emails. How it works Manually runs an ingestion flow that lists files in a specified Google Drive folder, downloads them, extracts text, and indexes them into an in-memory vector store using Google Gemini embeddings. Receives employee questions via n8n Chat (and optionally Slack or Telegram), normalizes the message into a single format, and rejects empty or overly long inputs. Uses a Groq LLM agent with per-user session memory to retrieve relevant excerpts from the in-memory company_docs knowledge base and generate a grounded answer, or directs the user to HR when no relevant content is found. Routes the assistant’s response back to the originating channel (n8n Chat, and optionally Slack or Telegram). Triggers every minute on updates to a Google Sheets “Hires” sheet, validates rows marked as Hired, and skips hires already present in the “Tracking” sheet. Builds a depart
Monitor overtime risk against Japanese labour caps with Gemini, Sheets, Slack & Gmail
Quick Overview This workflow runs weekly to read attendance overtime from Google Sheets, totals it per employee and month, uses Google Gemini to classify risk against Japanese labour-law limits, writes results back to Sheets, and escalates high-risk cases via Slack and a Gmail draft. How it works Runs every week on a schedule. Loads configured Japanese overtime limits and fetches raw attendance rows from a Google Sheets “Attendance” worksheet. Aggregates overtime hours per employee per month. Sends each employee-month total to Google Gemini, which returns a structured risk level (over/approaching/ok) plus a short summary and recommended manager actions. Stores or updates the assessment in a Google Sheets “Overtime Status” worksheet keyed by employee and month. Posts to Slack when overtime is over the cap (and drafts a manager notice in Gmail), posts an early-warning Slack message when approaching the cap, and flags unclear or failed assessments to Slack for manual review. Setup Add credentials for Google Sheets OAuth, Google Gemini (PaLM) API, Slack OAuth2, and Gmail OAuth2. Create a Google Sheets spreadsheet with an “Attendance” sheet containing Employee (or Name), Month (or Date)