Quick overview This workflow monitors Gmail for new support-style emails, scans them for prompt-injection signals, and only then sends safe messages to Google Gemini for structured triage. It logs outcomes to Google Sheets and creates Gmail drafts either for a safe reply or for manual human review. How it works Triggers every 5 minutes when a new Gmail message matches the configured query filter. Normalizes the email metadata and cleans the body text to create a consistent input for safety checks. Scores the email for prompt-injection risk using keyword and pattern matching and labels it as safe, review, or high risk. If the email is high risk, it skips Google Gemini, logs the event to Google Sheets, and creates a Gmail draft to request manual review. If the email is safe or review-level, it sends the email (wrapped as untrusted content) to Google Gemini to return a strict JSON triage including summary, intent, requested action, and a safe reply draft. Logs the Gemini results and final safety status to Google Sheets, then creates either a Gmail reply draft to the sender or a Gmail draft for the reviewer when human review is required.
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