AutomationFlowsAI & RAG › Trading Journal: Log Trades Into Google Sheets via Telegram & Gemini AI

Trading Journal: Log Trades Into Google Sheets via Telegram & Gemini AI

ByMalik Hashir @malikx on n8n.io

Simply send messages to your personal trade journal assistant (bot) on Telegram, and it will handle the rest. After some time, you can review your journal to reflect, learn, and improve your trading skills. Asset or trading pair Entry price Stop loss Take profit Trade direction…

Event trigger★★★★☆ complexityAI-powered22 nodesTelegram TriggerGoogle Gemini ChatGoogle SheetsOutput Parser StructuredGroq ChatTelegramAgent
AI & RAG Trigger: Event Nodes: 22 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #5793 — we link there as the canonical source.

This workflow follows the Agent → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "323e6adb-5692-4a54-ba6e-8b1709094837",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -740,
        -80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "992528a7-11e0-4ab2-82ef-622fee127597",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        780,
        780
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7819c8ac-14bc-4415-bd0f-de48307da67f",
      "name": "Generate Unique Trade ID",
      "type": "n8n-nodes-base.code",
      "position": [
        840,
        -20
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "a1f8fb0c-c6d5-416e-9b1d-8159645d9259",
      "name": "Update the Sheet With Profit & Loss",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1160,
        -440
      ],
      "parameters": {},
      "typeVersion": 4.5
    },
    {
      "id": "ad5a1fc1-5f4d-4e1a-beb0-e0d88de366b5",
      "name": "Log The Trade In Google Sheets Journal",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1180,
        -20
      ],
      "parameters": {},
      "typeVersion": 4.5
    },
    {
      "id": "cc013e2d-c767-4a13-b631-447aa50e5597",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -80,
        360
      ],
      "parameters": {},
      "notesInFlow": false,
      "typeVersion": 1.2
    },
    {
      "id": "c43a29b7-bf84-401f-8b6d-e32e4ecc5d0b",
      "name": "Groq Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        -400,
        380
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e88f40f2-d772-443b-b269-0e742fa78078",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        -400
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "72d1855e-0618-42d6-ac41-23137e8c2dd2",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -400
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "7587987d-a8b1-4f3d-b9e3-fe1bec5a59da",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        180
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "2b9fbcc0-dd8a-49aa-add3-dc7d7f4d65fd",
      "name": "Extract Journal Entry Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        20,
        -80
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "9ab1a158-30eb-4a55-8eb5-2a80275f1b27",
      "name": "If (Trade Found => True)",
      "type": "n8n-nodes-base.if",
      "position": [
        240,
        -80
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "bcbf30ee-5042-4c48-8f68-13deff37fbdc",
      "name": "Existing Entry Update OR New Entry",
      "type": "n8n-nodes-base.if",
      "position": [
        480,
        -280
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "6ef1ea61-9e00-42fe-a58c-00a5f6303368",
      "name": "Send Response Back",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1600,
        -440
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "d133cb4b-84ba-4362-a2dc-f4cbd9888de9",
      "name": "Send Trade ID to Telegram For Further Updates",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1600,
        -20
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "f65eb562-e133-4062-8b13-d4f8f408b34f",
      "name": "Agent Handles (If Trade Is Not Found)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        840,
        340
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "54cd0864-fdbf-4823-baac-7ee42e72a431",
      "name": "Sends Response Back To Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1600,
        340
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "6c647990-5a82-4fe9-9887-0b91c24eff9c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1460,
        -800
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "dbf18695-9ee5-4d04-b174-f3d8a8d4fe44",
      "name": "AI Agent (Extracts the Journal Entry)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -360,
        -80
      ],
      "parameters": {},
      "retryOnFail": false,
      "typeVersion": 1.9
    },
    {
      "id": "98a146e5-3af8-4b0a-9ec6-28b34144a52e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -600
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "3079fb79-026c-45c6-9a12-96d6c94e3b5d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1060,
        -180
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "50f32072-45e2-49e7-88f6-a3d5e7f0dc9e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        580
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Groq Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent (Extracts the Journal Entry)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "AI Agent (Extracts the Journal Entry)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Unique Trade ID": {
      "main": [
        [
          {
            "node": "Log The Trade In Google Sheets Journal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If (Trade Found => True)": {
      "main": [
        [
          {
            "node": "Existing Entry Update OR New Entry",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Agent Handles (If Trade Is Not Found)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent (Extracts the Journal Entry)",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Agent Handles (If Trade Is Not Found)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Extract Journal Entry Fields": {
      "main": [
        [
          {
            "node": "If (Trade Found => True)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Existing Entry Update OR New Entry": {
      "main": [
        [
          {
            "node": "Update the Sheet With Profit & Loss",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate Unique Trade ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update the Sheet With Profit & Loss": {
      "main": [
        [
          {
            "node": "Send Response Back",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent (Extracts the Journal Entry)": {
      "main": [
        [
          {
            "node": "Extract Journal Entry Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agent Handles (If Trade Is Not Found)": {
      "main": [
        [
          {
            "node": "Sends Response Back To Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log The Trade In Google Sheets Journal": {
      "main": [
        [
          {
            "node": "Send Trade ID to Telegram For Further Updates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Simply send messages to your personal trade journal assistant (bot) on Telegram, and it will handle the rest. After some time, you can review your journal to reflect, learn, and improve your trading skills. Asset or trading pair Entry price Stop loss Take profit Trade direction…

Source: https://n8n.io/workflows/5793/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow transforms your Telegram bot into an intelligent creative assistant. It can chat conversationally, fetch trending image prompts from PromptHero for inspiration, or perform a deep "remix"

Telegram Trigger, Output Parser Structured, Telegram +6
AI & RAG

This automation is designed to help you generate AI-powered music tracks, cover art, and fully rendered music videos — all triggered from a simple Telegram chat and managed via Google Sheets.

OpenAI Chat, Memory Buffer Window, Output Parser Structured +11
AI & RAG

LinkedIn URL → Scrape → Match → Screen → Decide, all automated

Google Drive, Agent, Google Drive Tool +6
AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Output Parser Structured, Telegram, N8N Nodes Tesseractjs +14
AI & RAG

This workflow acts as an AI-powered "Viral Architect" for YouTube creators. Simply send a video topic (e.g., "Kling 2.6") to your Telegram bot, and it will scrape top-performing competitor thumbnails,

Output Parser Structured, N8N Nodes Browseract, OpenRouter Chat +6