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

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

Ready for 3.0

by Incrementors ✓ · 11 views · created 2026-06-27 · Crypto Trading, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 10 nodes and runs on Gmail events. Along the way it connects Gmail and Google Sheets. It also calls api.openai.com over HTTP.

How it runs

Trigger: On Gmail events.

  1. 2. Code — Extract Email Context (Code): runs custom JavaScript code
  2. 3. HTTP — AI Extract Trade Fields (HTTP Request): calls api.openai.com (POST)
  3. 4. Code — Parse and Validate Trade Data (Code): runs custom JavaScript code
  4. 5. IF — Trade Valid? (If): checks a condition and branches into true / false
  5. 6a. Sheets — Log Valid Trade (Google Sheets): append
  6. 6b. Sheets — Log Failed Trade (Google Sheets): append
  7. 7. Gmail — Reply Confirmation to Client (Gmail): reply
  8. 8. Gmail — Ops Alert (Success) (Gmail): uses Gmail
  9. 9. Gmail — Ops Alert (Extraction Failed) (Gmail): uses Gmail

Services it uses

GmailGoogle Sheets

HTTP calls to: api.openai.com

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

  • Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (1. Gmail Trigger — Watch for Trade Instructions).

Nodes used (6)

From the author

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…

Excerpt from Incrementors's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.