Basic LLM Chain workflows
205 results — all source-linked n8n references
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
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
Match Japanese jGrants subsidies to your company with Gemini, Slack and Gmail
Quick Overview This workflow runs weekly to search the public jGrants API for open Japanese subsidies, scores each subsidy’s fit for your company using Google Gemini, logs results to Google Sheets, and notifies a Slack channel (and drafts a Gmail kickoff email) for strong matches. How it works Runs weekly on a schedule and loads your company profile details (industry, headcount, prefecture, investment plan, and search keyword). Calls the public jGrants subsidies API to retrieve currently accepting programs sorted by newest first, and posts to Slack if the search fails. Processes each returned subsidy individually and asks Google Gemini to produce a fit score, verdict (strong/possible/no), reasons, next steps, and a short summary. Normalizes the Gemini response into consistent fields, and posts to Slack if scoring fails for a subsidy. Upserts each scored subsidy into a Google Sheets tracker (keyed by subsidy ID) to avoid duplicates across weekly runs. Routes results by verdict: sends a detailed Slack alert and creates a Gmail draft for strong matches, posts a lightweight Slack message for possible matches, and flags unclear verdicts in Slack. Setup Add credentials for Google Gemini
Monitor Japanese business partners for registry changes with gBizINFO and Gemini
Quick Overview This workflow runs weekly to check Japanese business partners listed in Google Sheets against the gBizINFO corporate registry API, uses Google Gemini to assess the risk impact of detected changes, updates the stored partner snapshot, and escalates findings to Slack and Gmail based on materiality. How it works Runs every week on a schedule. Reads the partner list (including corporate numbers and last-known name/address) from Google Sheets. Queries the gBizINFO corporate registry API for each partner and posts a Slack message if the lookup fails. Compares the latest registry data to the stored snapshot to detect name, address, or closure/dissolution changes and continues only when changes are found. Sends the detected changes to Google Gemini to classify materiality (high/medium/low) with a short summary and recommended action, and posts a Slack message if the assessment fails. Updates the Google Sheets partner snapshot with the latest registry details so the change is recorded. Routes by materiality to notify Slack (medium/other), and for high materiality also posts a Slack alert and creates a Gmail draft requesting a credit review. Setup Create a Google Sheets spread
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)
Check Japanese ad copy compliance with Google Gemini, Sheets, Slack and Gmail
Quick Overview This workflow runs daily to review Japanese ad copy in Google Sheets using Google Gemini, writes compliance risk results back to the sheet, and alerts the right team in Slack (and drafts a Gmail revision request) based on high/medium/low risk. How it works Runs every day at 9:00 on a schedule. Reads ad copy rows from Google Sheets to find items that still need a compliance check. Sends each copy item to Google Gemini with the configured product category, target laws, and extra rules to generate a risk level, violations, and a compliant rewrite. Parses and normalizes the Gemini output into fields like risk level, violation count, and safe rewrite, and posts a Slack alert if the AI check fails. Updates the corresponding Google Sheets row with the compliance results to keep a record of the review. Routes the item by risk level and posts to Slack for legal blocking (high), marketing review (medium), publish-ready notification (low), or manual review when the result is inconclusive. For high-risk copy, also creates a Gmail draft requesting the author to revise the copy using the suggested compliant rewrite. Setup Add credentials for Google Sheets, Google Gemini (PaLM) API
Verify Japanese invoice registration numbers from Gmail using Gemini, NTA API, Sheets and Slack
Quick Overview This workflow monitors Gmail for unread invoice emails with PDF attachments, extracts invoice details with Google Gemini, verifies Japanese qualified invoice registration numbers against the National Tax Agency (NTA) Invoice Web-API, logs results to Google Sheets, and sends Slack alerts for invalid, missing, or inconclusive checks. How it works Polls Gmail hourly for unread emails matching “has:attachment invoice” and downloads the first attachment. Extracts text from the attached invoice PDF. Uses Google Gemini to parse the invoice text into structured fields such as the T-registration number, issuer name, invoice date, and amounts. Normalizes and validates the registration number to ensure it matches the required “T + 13 digits” format. If the format is valid, calls the NTA Invoice Web-API to verify the registration number and interprets the response as valid, invalid, or not found. Appends the invoice details and verification status to a Google Sheets worksheet. Routes the outcome by sending the appropriate Slack alert for invalid/not found/inconclusive results or marking the invoice email as read when the number is valid. Setup Connect your Gmail OAuth2 credentia
Route urgent Gmail support emails and WhatsApp digests with Groq and Supabase
Quick overview This workflow monitors a Gmail inbox, uses Groq LLM classification to label each support email as urgent, routine, or spam, logs the result to Supabase, sends immediate WhatsApp alerts for urgent messages, and delivers a daily WhatsApp digest summarizing routine emails. How it works Triggers every minute when a new email arrives in Gmail. Uses Groq (via an LLM prompt) to classify the email as urgent, routine, or spam and generate a one-sentence summary and reason. Inserts the email metadata, category, and summary into a Supabase table for tracking. Sends an immediate WhatsApp message to the support owner when the email is classified as urgent and updates the Supabase record to reflect it was notified. Runs on a daily schedule to fetch all routine emails in Supabase that have not yet been included in a digest. Aggregates those routine emails into a single WhatsApp digest message, sends it to the support owner, and marks the included Supabase records as digested. Setup Connect Gmail OAuth2 credentials and ensure the trigger watches the support inbox/labels you want monitored. Add Groq API credentials for the chat model used to classify and summarize emails. Add Supabas
Generate weekly student progress reports with Gemini, Supabase, and WhatsApp
Quick overview This workflow runs weekly to pull student attendance and score data from Supabase, uses Google Gemini to generate per-student performance summaries and attention flags, sends immediate WhatsApp alerts for flagged students, then compiles all summaries into a PDF report, uploads it, and shares it with the coach via WhatsApp. How it works Runs weekly on a schedule. Fetches all student weekly metrics (attendance and scores) from Supabase. Uses Google Gemini to write a short performance summary per student and determine whether the student should be flagged for attention based on attendance and score-drop rules. If a student is flagged, sends a WhatsApp message to the coach and inserts a flag record into Supabase. Aggregates all students’ summaries into a single HTML weekly report. Converts the HTML report to a PDF via an HTTP-based HTML-to-PDF API, uploads the PDF to a file-hosting API, and sends the PDF link/document to the coach via WhatsApp. Logs the report URL to Supabase for recordkeeping. Setup Add Supabase credentials and create the required tables/columns (weekly_student_data, attention_flags, and weekly_reports) referenced by the workflow. Add a Google Gemini (P
Draft personalized cold emails from Google Sheets using Gemini and HubSpot
Quick overview This workflow batch-processes leads from Google Sheets, researches each person and company using Tavily plus Google Gemini, drafts a personalized cold email, then creates/updates the contact in HubSpot with a research note and a saved email draft before marking the lead as Done in the sheet. How it works Runs manually and sets a batch size that controls how many leads to process per run. Reads leads from Google Sheets, skips rows already marked as Done, and normalizes the selected batch into clean lead fields. Processes the batch one lead at a time and uses Tavily search (last 60 days) with Google Gemini to extract the most recent public activity, pain points, and a personalization hook. Cleans and parses the research JSON so it can be reused reliably downstream. Uses Google Gemini to draft a 90–120 word cold outreach email (subject and body) that incorporates the research and offers a free “Automated LinkedIn Post Creator” n8n workflow. Creates or reuses the HubSpot contact, logs a HubSpot note with the research and drafted email, and saves the email as a HubSpot engagement in DRAFT status. Updates the matching row in Google Sheets (by Email) to set Status to “Done
Send and track LinkedIn outreach with Airtable, Unipile, and OpenRouter
Quick overview This workflow automates LinkedIn outreach by using Airtable as a CRM, Unipile to fetch profiles and send connection requests/messages, and OpenRouter to generate personalized connection notes and follow-ups, while tracking accepts and replies via Unipile webhooks. How it works Runs every weekday at 09:00 to pull up to 15 Airtable leads with Connection Status set to New. For each lead, derives the LinkedIn public identifier, fetches the LinkedIn profile from Unipile, and uses OpenRouter to generate a personalized connection note capped at 300 characters. Sends the LinkedIn connection request via Unipile, updates the Airtable record with request details (note, timestamps, invitation ID), and waits 30–90 seconds between sends. Receives Unipile new_relation webhook events, matches the lead by Provider ID, and marks the Airtable record as Accepted with an Accepted At timestamp. Receives Unipile message_received webhook events, filters to inbound replies, finds the matching Airtable lead, and marks it Replied while stopping the campaign. Runs daily at 10:00 to find accepted, no-reply leads due for follow-up, uses OpenRouter to write follow-up #1 or #2, sends the DM via Uni
Screen resumes and route hiring decisions with Airtable, DeepSeek, and gotoHuman
Quick overview This workflow collects job applications via Gmail, deduplicates candidates in Airtable, extracts resume text with LlamaParse, scores candidates against an Airtable role rubric using a DeepSeek chat model, and routes results to gotoHuman for approve/reject decisions that update the candidate’s stage. How it works Receives a job application submission from Gmail, including the applicant’s name, email, role, and resume file. Searches Airtable Candidates by email to detect duplicates and either creates a new candidate record or updates the existing record. Extracts text from the uploaded resume with LlamaParse and runs a basic quality check to detect likely mis-parsed or incomplete text. If parsing looks poor, updates the candidate in Airtable to “Needs Manual Review” with a “poor” parse quality flag. If parsing looks good, fetches the role-specific scoring rubric from the Airtable Roles table, sanitizes the resume text, and sends both to a DeepSeek chat model (via LangChain) to produce a structured JSON scorecard. Validates and normalizes the AI’s JSON output, saves the score, reasoning, confidence, red flags, and recommendation back to Airtable, and submits the scoreca
Scrape and score Amazon products with Apify, OpenAI, and Google Sheets
Quick overview This workflow manually scrapes product results from an Amazon search URL via the Apify Amazon Crawler actor, uses OpenAI to generate a structured product analysis (category, key feature, verdict, value score), and appends the enriched results to a Google Sheets spreadsheet. How it works Runs when you manually click “Test workflow” in n8n. Sends the configured Amazon search URL and scraping limits to the apify Amazon Crawler actor and retrieves the dataset items. Filters out any scraper items that are missing a title or contain an error. Uses OpenAI to analyze each product’s title, brand, price, rating, and review count and returns a structured category, key feature, buyer verdict, and 1–10 value score. Combines the scraped fields and AI analysis into a single row format and adds a timestamp. Appends each enriched product as a new row in Google Sheets. Setup Create an apify API token and add it as an HTTP Header Auth credential used by the Apify request. Add an OpenAI API key as an OpenAI credential and choose the model to use in the configuration. Connect a Google Sheets OAuth2 account and select the target spreadsheet, sheet tab, and columns for appending rows. Upda
Find and verify business emails with ScraperCity, OpenAI, Google Sheets, and Gmail
Quick overview This workflow reads contacts from Google Sheets, finds and verifies their business emails via the ScraperCity Email Finder API, generates a short personalized icebreaker with OpenAI, appends the enriched leads to another Google Sheet, and emails a run summary via Gmail. How it works Starts manually to run an email enrichment job. Reads contacts (first name, last name, domain) from an input Google Sheets worksheet and aggregates them into a single payload. Submits the contacts to the ScraperCity Email Finder API, then waits and repeatedly checks the job status until it succeeds or fails/times out. When the job succeeds, downloads the result CSV from ScraperCity, parses it, normalizes key fields (name, domain, email, verification status, provider), and keeps only rows with an email. For each verified contact, prompts OpenAI to generate one short, company-referencing cold-email opening line in the configured language. Appends the enriched lead (including email, status, and icebreaker) to an output Google Sheets worksheet and sends a summary email via Gmail. Setup Create a ScraperCity account with Email Finder credits and add an HTTP Header Auth credential that sends you
Turn LinkedIn post reactions into AI content ideas with OpenAI and Google Sheets
Quick overview This workflow runs daily to fetch your recent LinkedIn post reactions via a RapidAPI LinkedIn endpoint, uses OpenAI to turn each reacted post into a structured original content idea, and appends or updates the results in a Google Sheets idea vault without duplicates. How it works Runs every day at 08:00 using a schedule trigger. Loads configurable settings like your LinkedIn username, reaction type filter, recency window, max posts to analyze, OpenAI model, and output language. Calls the linkedin-api8 RapidAPI endpoint to retrieve posts you recently reacted to and splits the response into individual reaction items. Filters reactions to keep only the selected reaction type (or all when blank) and posts newer than the configured number of days. Limits the number of reactions sent for analysis to control cost. Sends each source post (author, reaction, text, and URL) to OpenAI to generate a structured content idea (category, angle, hook, takeaway, format, and hashtags). Saves each idea to Google Sheets using an upsert that matches on Post URL to avoid duplicate rows. Setup Create a RapidAPI subscription for linkedin-api8 and add an HTTP Header Auth credential that sends
Audit landing page CRO and log results with OpenAI and Data Tables
Quick overview This workflow collects a landing page URL, scrapes its HTML, and uses OpenAI to generate a structured conversion-rate-optimization (CRO) audit with scores and prioritized tips, then renders a styled report in the browser and logs each audit to an n8n Data Table. How it works Presents an n8n Form where the user submits a landing page URL. Fetches the landing page HTML via an HTTP request with retries, and routes to an error page if the URL can’t be retrieved. Sends the scraped HTML and URL to OpenAI to produce a CRO audit including an overall score, category scores, a written roast, and a ranked list of optimization tips. Uses a structured output parser with an OpenAI “fixer” model to validate and auto-correct the AI response into the required JSON schema. Builds a styled HTML report from the structured audit results. Logs the audit metadata (URL, score, verdict, summary, language, timestamp) to an n8n Data Table and displays the report back in the user’s browser. Setup Add an OpenAI API credential and select it for both the main OpenAI model and the output-fixer model. Create or select an n8n Data Table (for example, “CRO Audit Log”) and map the columns used for url,
Schedule weekly focus-time blocks with Google Calendar, OpenAI, and Slack
Quick overview This workflow runs every Sunday at 18:00 to scan your Google Calendar for next week, find free gaps of at least two hours within your working hours, auto-book them as “🧘 Focus Time” events, and then DM you a personalized deep-work plan in Slack using OpenAI. How it works Runs every Sunday at 18:00 on a schedule. Loads your working-hour preferences and fetches all events from your Google Calendar. Calculates weekday-only free gaps within your working hours and keeps only gaps that meet the minimum block length. If no qualifying gap exists, sends you a Slack DM warning that next week is too fragmented for a focus block. If gaps exist, limits the number of blocks for the week and creates “🧘 Focus Time (protected by n8n)” events in Google Calendar for each selected slot. Uses OpenAI to generate a short, personal Slack message that lists the protected blocks and suggests what kind of work fits each. Sends the generated deep-work plan to you as a Slack DM. Setup Add Google Calendar credentials, select the calendar to read from and the calendar to create “🧘 Focus Time” events in. Add Slack credentials and set your target Slack username in both the plan DM and warning mes
Extract Twilio voice donation details with Groq, Gemini, and Google Sheets
Quick overview This workflow receives Twilio call recording callbacks, transcribes the audio with Groq Whisper, uses Google Gemini/Groq LLMs to extract structured donation details, and appends the results (with transcript and review flag) to Google Sheets. How it works Receives a Twilio Recording Status Callback webhook and immediately responds with TwiML (``). Captures call metadata (CallSid, caller number, recording URL/SID, and duration) and continues only if the recording exists and is at least 2 seconds long. Waits briefly for Twilio to finalize the media, then downloads the recording MP3 using Twilio HTTP Basic Auth. Sends the audio file to Groq’s Whisper transcription endpoint to generate a text transcript. Uses a LangChain prompt with Google Gemini and Groq chat models to extract donation amount, fee (if mentioned), beneficiary name, currency, a needs-review flag, and a short summary from the transcript. Parses the model output as JSON and falls back to an error summary with needs_review=yes if parsing fails. Checks Google Sheets for an existing row matching the CallSid/RecordingUrl and, if not found, appends a new row with the extracted fields, transcript, and call details
Handle WhatsApp support chats with OpenRouter, Pinecone, and Gemini
Quick overview This template implements a WhatsApp support suite that logs inbound events to a dashboard API, routes conversations through an OpenRouter-powered AI agent with Pinecone RAG and memory, exposes a webhook for human outbound replies, and provides a webhook to summarize recent chats for handoff. How it works Triggers on WhatsApp Cloud API events and routes status updates (sent/delivered/read) to a dashboard API endpoint for storage. For inbound messages, looks up the contact in the dashboard API and normalizes the message into a consistent schema (sender, type, timestamp, and best-effort content). If the message contains media (image/video/audio/document), fetches the WhatsApp media URL, downloads the file, uploads it to the dashboard’s media endpoint, and attaches the resulting media URL and MIME type. Stores inbound messages and reactions in the dashboard API, then checks via the cases endpoint whether the sender already has an open case. If the inbound message is text and no open case is found, queries Pinecone as a tool (using Google Gemini embeddings), uses an OpenRouter chat model with conversation memory to draft a reply or create a new case via the dashboard API,
Confirm and log WhatsApp restaurant orders with Groq and Google Sheets
Quick Overview This workflow triggers on incoming WhatsApp orders, uses Groq to extract items and quantities, validates them against a live Google Sheets menu, logs the result to an orders sheet, and replies to the customer with either a clarification request or a priced confirmation (with optional VIP owner alerts). How it works Triggers when a new WhatsApp message is received on your WhatsApp Business Cloud number. Sends the message text to Groq (Llama 3.3) to extract a structured list of ordered items and quantities. Reads the latest menu (item name, price, availability) from a Google Sheets “Menu” tab. Matches extracted items to the menu, checks availability, calculates line subtotals and the total price, and compiles any validation issues. If there are issues, replies to the customer on WhatsApp asking for a corrected order and appends a “needs_clarification” entry to the Google Sheets “Orders” tab. If the order is valid, appends a “confirmed” entry to the Google Sheets “Orders” tab and sends a WhatsApp confirmation with the item summary and total. If the confirmed total meets or exceeds the VIP threshold, sends a separate WhatsApp notification to the owner number. Setup Conne
Create and approve AI social posts with OpenAI, Telegram and Blotato
Quick overview This workflow runs daily to generate an AI-written social post and DALL·E image with OpenAI, sends it to Telegram for approval, and—if approved—publishes it to LinkedIn, X, Instagram, Facebook, and Threads via Blotato while logging outcomes to Google Sheets. How it works Runs every 24 hours on a schedule trigger. Uses OpenAI to generate a single content topic (title, angle, and hook) based on your niche, audience, and language settings. Uses OpenAI to write one social post with a separate hashtag line and an image prompt in your specified tone and style. Uses OpenAI Images (DALL·E) to generate a matching image and extracts a shareable image URL. Sends the post text, hashtags, and image link to Telegram and waits for you to approve or skip within the configured time window. If approved, publishes the post with the image to LinkedIn, X, Instagram, Facebook, and Threads using Blotato and appends a “Published” log row to Google Sheets. If skipped or not approved, appends a “Skipped” log row to Google Sheets. Setup Add OpenAI API credentials and ensure the selected chat model and image model in the configuration match models available to your account. Add Telegram credent
Generate CCTV-style animal TikTok videos with OpenAI, Seedance and Blotato
Quick Overview This workflow runs every four hours to generate a CCTV-style animal video concept with OpenAI, renders an 8-second vertical clip using AtlasCloud Seedance, then publishes it to TikTok via Blotato and sends a preview to Telegram. How it works Runs every 4 hours on a schedule. Uses OpenAI to create a hyper-realistic CCTV-style image and video prompt based on a random (or overridden) animal, location, action, and a current timestamp overlay. Starts a Seedance text-to-video render on AtlasCloud with the generated prompt, duration, aspect ratio, and optional audio. Polls AtlasCloud at a fixed interval until the render status is completed or succeeded and retrieves the output video URL. Uses OpenAI to generate a TikTok-ready title and exactly five hashtags from the video concept. Publishes the generated video to TikTok via Blotato with the title/hashtags and the selected privacy level, flagged as AI-generated. Sends the rendered video and title as a preview to a specified Telegram chat. Setup Add OpenAI API credentials and set the prompt and caption models in the Configuration values if you want to change them. Add an AtlasCloud API key (HTTP Header Auth) and ensure it is
Send prescription PDFs to patients via WhatsApp with Google Gemini and Supabase
Quick overview This workflow listens for incoming WhatsApp messages from clinic staff, uses Google Gemini to extract prescription details, generates a prescription PDF via an HTML-to-PDF API, uploads it to a public URL, sends the document back over WhatsApp, and logs outcomes to Supabase. How it works Triggers whenever a new WhatsApp message is received on your WhatsApp Business Cloud number. Captures configuration values and the incoming message text and sender number. Uses Google Gemini to extract patient name, doctor name, and medication details into structured data and flags any missing required fields. If required details are missing, replies to staff on WhatsApp with what to fix and inserts a needs_review record into Supabase. If details are complete, renders a prescription HTML document, converts it to a PDF via an external HTML-to-PDF API, and uploads the PDF to an external file-hosting API. Sends the prescription PDF to the sender on WhatsApp and inserts a “sent” log record (including the PDF URL) into Supabase. Setup Connect WhatsApp Business Cloud credentials for the WhatsApp trigger and the WhatsApp send steps, and configure the workflow’s webhook in Meta/WhatsApp so in
Log email receipts to Google Sheets with Gmail and OpenAI
Quick Overview This workflow logs Gmail receipt attachments to Google Sheets by extracting structured fields with OpenAI (including category selection from your list), prevents duplicates by checking the ledger, and sends a monthly spending summary email via Gmail based on last month’s rows. How it works Triggers when a Gmail message matching has:attachment subject:receipt arrives or when a schedule runs on the 1st of the month at 8am. For receipt emails, looks up the Gmail message ID in Google Sheets and stops if the receipt is already logged. If the receipt is new, extracts text from PDF attachments or transcribes image receipts using OpenAI vision. Sends the receipt text to OpenAI to extract receipt_date, merchant, amount, currency, and a category chosen only from your predefined category list. Appends one cleaned expense row to Google Sheets with the extracted fields plus a processed timestamp, Gmail message ID, and the original email subject. For the monthly run, reads the full Google Sheets ledger, totals last month’s expenses by category, and emails the summary to you via Gmail. Setup Connect Gmail credentials for the Gmail Trigger and for sending the monthly summary email.