Skip to main content

Automate income and expense tracking in Google Sheets via Telegram

Workflow preview

Workflow preview
100%
Automate income and expense tracking in Google Sheets via Telegram preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Who’s it for This template is perfect for freelancers, small business owners, or financial assistants who want to record and approve financial transactions like income and expenses directly from Te...

Best for

  • Personal Productivity automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.code, n8n-nodes-base.switch, n8n-nodes-base.telegram, n8n-nodes-base.googlesheets, n8n-nodes-base.stickynote

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Automate income and expense tracking in Google Sheets via Telegram
Workflow name
Automate income and expense tracking in Google Sheets via Telegram

Who’s it for

This template is perfect for freelancers, small business owners, or financial assistants who want to record and approve financial transactions like income and expenses directly from Telegram, without opening a spreadsheet manually.

It’s also useful for teams that require a supervisor to approve expenses before they’re finalized.

What it does

This workflow allows users to:

  • Start a conversation via Telegram using the /start command.
  • Choose to record an income or expense.
  • Submit transaction data using a structured format.
  • Store the data into Google Sheets in real time.
  • For expenses, automatically notify a supervisor for approval.
  • The supervisor can Approve ✅, Reject ❌, or View Details 👁.
  • Sends feedback to the user based on supervisor action.

🔧 How it works

  1. Telegram Bot Trigger: Captures user input via message or inline button callback.

  2. Message Detection Logic: Differentiates between text input and button interactions.

  3. Switch Node: Routes the message type:

    • /start: Displays income/expense buttons.
    • Input text: Validates formatting and parses data.
    • Callback: Handles approval/rejection process.
  4. Google Sheets Integration: Appends or updates entries in different sheets based on the data type.

  5. Notifications:

    • User gets feedback (recorded, pending, approved, rejected).
    • Supervisor receives inline button options for approval.

Google Sheets Details

You will need a Google Sheet with the following two worksheets:

Sheet 1: income Sheet 2: Sheet1 (Default tab for expenses)

📱 Telegram Setup Instructions

  1. Create a bot using @BotFather.
  2. Save the bot token.
  3. Go to n8n Credentials → Telegram API and add:
    • Access Token = your bot token
  4. In Telegram, send /start to your bot.
  5. Make sure your bot has enabled privacy mode (or disabled, if used in a group).

💡 For the approval flow, update the node Send Approval Request with the correct chatId of the supervisor's Telegram account. You can hardcode a static ID (e.g., "123456789") or pull from a variable if dynamic.

🛠 Requirements

Tool Description
n8n (Cloud or Self-hosted) Use latest stable version
Telegram Bot For user input and notifications
Google Sheets To store income and expense records
Google OAuth2 Credentials Required for Google Sheets node

⚙️ How to customize the workflow

  • Change the chat ID for supervisors in the node Send Approval Request.
  • Modify the text or add new buttons in the inline keyboard node.
  • Update Google Sheet ID and tab names if you’re using different sheets.
  • Customize the approval logic, for example, route to different teams.

✅ Setup Steps

  1. Import the workflow JSON into your n8n instance.
  2. Configure Telegram API credential with your bot token.
  3. Connect your Google Sheets OAuth2 credential.
  4. Replace Google Sheet document ID and tab names with your own (via UI or “Expression” mode).
  5. Deploy and activate the workflow.

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 - Telegram - Incoming Webhook

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

Block 2 - Detect Message Type

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

Block 3 - Route by Input Type

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 4 - Handle /start or Message Input

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 5 - Show Income/Expense Options

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

Block 6 - Validate Input Format

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

Block 7 - Extract Data Type

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

Block 8 - Route Based on Data Type

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 9 - Parse Income Data

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

Block 10 - Save Income to Sheet

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

Block 11 - Notify User Income Recorded

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

Block 12 - Parse Expense Data

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

Block 13 - Save Expense to Sheet

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

Block 14 - Notify User Expense Pending

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

Block 15 - Send Approval Request

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

Block 16 - Parse Callback Response

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

Block 17 - Route Based on Callback Type

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 18 - Update Approval Status

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

Block 19 - Get Approved Row

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

Block 20 - Notify User of Approval Result

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

Block 21 - Get Row for Detail View

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

Block 22 - Format Expense Detail Message

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

Block 23 - Send Expense Detail to Supervisor

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

Block 24 - Show Income Input Format

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

Showing the first 24 of 31 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Automate income and expense tracking in Google Sheets via Telegram
Complexity advanced
Nodes 31
Categories Personal Productivity
Author Fahmi Oktafian
Published 18 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6147/6147.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 Automate income and expense tracking in Google Sheets via Telegram do?

Who’s it for This template is perfect for freelancers, small business owners, or financial assistants who want to record and approve financial transactions like income and expenses directly from Te...

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 Personal Productivity use case.