Main Use Case This workflow enables automated, AI-assisted replies to users messaging a LINE Official Account, while storing and referencing chat history from Google Sheets to maintain context. Ideal for businesses or support teams that want to provide smart, personalized customer interactions using AI with memory. How It Works (Step-by-Step) Connect to LINE Official Account's API A Webhook listens for incoming messages from users on LINE. When a message is received, it triggers the workflow. Prepare the Data An Edit Fields module structures incoming data (e.g. extracts user ID, message content). This ensures data is clean and usable downstream. Retrieve Chat History The user’s previous conversations are fetched from a Google Sheet. This ensures the AI has memory and can continue conversations contextually. Prepare Prompt The retrieved chat history is combined with the new message to form a complete prompt for the AI. Example format: “User previously said X. Now they said Y. How should we respond?” AI Agent: Google Gemini The formatted prompt is passed to an AI Agent (Google Gemini Chat Model). The AI generates a response based on the message + history.
Tags
Related workflows
See all AI Automation→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
Recommend supplier consolidation with Google Sheets, Groq, Slack and Gmail
Quick overview This workflow runs weekly to read supplier spend data from Google Sheets, detect overlapping suppliers across departments, estimate potential consolidation savings, and use Groq-hosted LLM analysis to assess risk and produce recommendations that are sent to Slack and emailed via Gmail. How it works Runs every week on a scheduled trigger. Reads supplier records from a Google Sheets spreadsheet and keeps key fields like supplier name, department, spend, risk rating, and stakeholder email. Groups and normalizes supplier names to find suppliers used by multiple departments and calculates estimated savings and an opportunity level. Sends each consolidation opportunity to a Groq chat model to evaluate risk versus savings and return a JSON decision and recommendation. Parses the AI JSON output, merges it with the calculated savings data, and formats a final recommendation record. Posts the recommendation to a Slack channel and emails a formatted report to the supplier stakeholder email address. Setup Connect your Google Sheets OAuth account and update the spreadsheet ID and sheet/tab to match your supplier records. Add a Groq API credential for the chat model used to evalua
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