Skip to main content

Log daily Interactive Brokers trades to a Google Sheets journal

Workflow preview

Workflow preview
100%
Log daily Interactive Brokers trades to a Google Sheets journal preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Automated Trade Report from Interactive Brokers This workflow is aimed at traders who use Interactive Brokers. It automatically retrieves the trades made in IBKR...

Best for

  • Crypto Trading automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.wait, n8n-nodes-base.splitout, n8n-nodes-base.set, n8n-nodes-base.googlesheets, n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Wolfgang Renner.

Original n8n.io source

1.1 Workflow description

Title
Log daily Interactive Brokers trades to a Google Sheets journal
Workflow name
Log daily Interactive Brokers trades to a Google Sheets journal

Automated Trade Report from Interactive Brokers

This workflow is aimed at traders who use Interactive Brokers. It automatically retrieves the trades made in IBKR on a daily basis and writes them to a Google Sheet, so that anyone can easily perform further analyses and statistics using the on-board tools.

This creates an automatic, continuous trade journal.

Typical Usecaes

  • Monitoring your trades in one journal
  • Analyze your Profit & Losses
  • Basis for any kind of statistics • Log trades (entry, exit, setup, reason) • Analyze performance (win rate, R/R, expectancy) • Evaluate strategies & setups • Detect mistakes & patterns • Track emotions & discipline • Support coaching, reviews & improvement

How it works

  1. A daily schedule triggers a FlexStatement request to Interactive Brokers to start generating a trade report.
  2. The workflow extracts the reference code from IBKR's response, waits for the report to be ready, then downloads the Flex report XML.
  3. The XML is parsed and split into individual Trade records.
  4. Key fields (tradeDate, symbol, quantity, buySell, tradeID, price, money, currency, fxRateToBase) are normalized.\n5. Each trade is appended or updated in the configured Google Sheet, matching on tradeID to avoid duplicates and keep the journal current.

Prerequisites

  • Trading Account on IBKR
  • Google Sheets OAuth2
  • A Google Sheet containing your trading journal

Setup

  • Set schedule to run at your desired time (default: 08:00)
  • Add or verify IBKR request token/reference parameters.
1. Create Flex Query Token:

Go to IBKR Account Management Reports → Flex Queries → Flex Web Service → Generate Current Token → Make a note of the token (e.g.: 123456789012345678901234)

2. Enter Flex Token:

In node '1. Request Flex Report' and in node '2. Extract Reference Code' Replace YOUR_FLEX_TOKEN with your token ID

3. Create Flex Query in IBKR (if not already done):

Go to IBKR Account Management Reports → Flex Queries → Activity Flex Query → Create Select: Trade Confirmation ✓ Period: Last 365 Days Format: XML Save and note down the query ID

4. Enter Flex Query ID:

In node '1. Request Flex Report' Replace YOUR_QUERY_ID with your query ID

  • Adjust wait time if IBKR needs longer to generate reports
  • Select the Google Sheet and target sheet/tab
  • Connect Google Sheets OAuth2 account
  • Confirm column mapping and that tradeID is the matching column
  • Run a manual test to validate parsing and row updates

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - 1. Request Flex Report

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 2 - 2. Extract Reference Code

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 3 - Wait 10 Seconds

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 4 - 3. Download Report

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - 5. Split Trades

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 6 - 6. Format Trade Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - 7. Save to Google Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 8 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Daily Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 12 - 4. Convert XML to JSON

Type / Role
n8n-nodes-base.xml - xml
Config choices
Version 1

Block 13 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Log daily Interactive Brokers trades to a Google Sheets journal
Complexity intermediate
Nodes 13
Categories Crypto Trading
Author Wolfgang Renner
Published 26 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12151/12151.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Log daily Interactive Brokers trades to a Google Sheets journal do?

Automated Trade Report from Interactive Brokers This workflow is aimed at traders who use Interactive Brokers. It automatically retrieves the trades made in IBKR...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Crypto Trading use case.