Skip to content
FlowHubFluxonLab
C
Gmailfree

Capture and log email trade instructions with Gmail, OpenAI, and Google Sheets

by Incrementorsadapted from n8n official workflow galleryUpdated Aug 2026
RequiresCCodeGmailGmailGoogle SheetsGoogle SheetsHTTP RequestHTTP Request
Share Post Share
1. Gmail Trigger — Watch for Trade Instructions1. Gmail Trigge…Co2. Code — Extract Email Context2. Code — Extra…HR3. HTTP — AI Extract Trade Fields3. HTTP — AI Ex…Co4. Code — Parse and Validate Trade Data4. Code — Parse…If5. IF — Trade Valid?5. IF — Trade V…6a. Sheets — Log Valid Trade6a. Sheets — Lo…6b. Sheets — Log Failed Trade6b. Sheets — Lo…7. Gmail — Reply Confirmation to Client7. Gmail — Repl…8. Gmail — Ops Alert (Success)8. Gmail — Ops …9. Gmail — Ops Alert (Extraction Failed)9. Gmail — Ops …123456789
1/5
STEPS · 9
Starts on a Gmail event

Quick overview This workflow polls Gmail for emails with the subject “Trade Instruction”, uses OpenAI Chat Completions to extract trade fields from the email body, logs valid and failed extractions to separate tabs in Google Sheets, and sends confirmation and ops alert emails via Gmail. How it works Triggers every minute by polling Gmail for new messages matching the query subject:"Trade Instruction". Extracts the email body, sender address, subject, and message/thread IDs and generates a trade reference and timestamps. Sends the email body to OpenAI (Chat Completions) to return a JSON object containing asset, ticker, action, quantity, price, client, and notes. Parses the returned JSON, validates that asset is present and quantity is greater than zero, and marks the result as valid or failed with a reason. Appends valid trade instructions to the “Valid Trades” tab in Google Sheets, or appends failures (including a snippet and error reason) to the “Failed Trades” tab.

Tags

n8nreference-onlygmailgoogle-sheets
Connects
CCodegmailGmailsheetsGoogle SheetsWHTTP Request
CategoryGmail
Triggermanual
Complexitycomplex
Nodes10
AddedJun 27, 2026

Related workflows

See all Gmail
CgmailsheetsW
free

Route real estate buyer and seller leads with Claude and Google Sheets

Quick Overview This workflow hosts an n8n lead-capture form, uses Anthropic Claude to score and classify real estate inquiries, then routes ready leads to Gmail and Google Sheets while logging early-stage leads to a separate Google Sheets tab. How it works Receives a new submission from an n8n Form trigger with contact details, intent, area, budget, timeline, financing status, and notes. Normalizes the submitted fields (for example trimming strings, lowercasing email, and adding a timestamp) for consistent downstream processing. Sends the normalized lead details to the Anthropic Messages API (Claude) to return a strict JSON classification, summary, timeline band, financing readiness, recommended agent role, and score. Parses the Claude JSON response, clamps the score to a 1–10 range, and calculates whether the lead is “ready” (score 7). If the lead is ready, sends a formatted Gmail alert to the agent and appends the lead to the “Active Leads” tab in Google Sheets. If the lead is not ready, appends the lead to the “Nurture Leads” tab in Google Sheets. Returns a confirmation message to the form submitter after the lead is routed. Setup Create an Anthropic HTTP Header Auth credential

by Milos Vranes
CgmailsheetsW
free

Handle client intake, routing, and confirmations with Claude, Google Sheets, Gmail, and Twilio

Quick overview This workflow hosts an n8n intake form, checks whether the submitted state is in your service area, uses Anthropic Claude to draft confirmation messages and an internal summary, logs requests to Google Sheets, emails via Gmail, optionally sends an SMS via Twilio, and shows the customer a confirmation page. How it works Receives a new client request through an n8n-hosted form submission. Normalizes the submitted details (name, email, phone, state, request type, description, and SMS consent) and generates a timestamp and reference number. Checks whether the submitted state is included in your configured served-area list. For in-area requests, sends the intake details to Anthropic Claude and parses the returned JSON into a customer email message, customer SMS message, internal summary, category, priority, and missing-info list. Appends the request to Google Sheets, emails the intake team and the customer via Gmail, and sends an SMS confirmation via Twilio only when the customer opted in. For out-of-area requests, appends the submission to a Google Sheets waitlist and shows the customer a waitlist message. Setup Customize the n8n Form Trigger fields and text to match you

by Milos Vranes
gmailsheetsW
free

Move data between JSON and spreadsheets

This workflow illustrates how to convert data from JSON to binary format and import JSON data or files into Google Sheets or local spreadsheets.

by Lorena