Skip to main content

Record transactions & generate budget reports with Gemini AI, Telegram & Firefly III

Workflow preview

Workflow preview
100%
Record transactions & generate budget reports with Gemini AI, Telegram & Firefly III 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 this is for Anybody using Firefly III, especially home/self hosted users, who want to add some level of automation to their transaction tracking, either in addition to or because they can't or ...

Best for

  • Document Extraction automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegram, @n8n/n8n-nodes-langchain.googlegemini, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.stickynote, n8n-nodes-base.splitinbatches

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Record transactions & generate budget reports with Gemini AI, Telegram & Firefly III
Workflow name
Record transactions & generate budget reports with Gemini AI, Telegram & Firefly III

Who this is for

Anybody using Firefly III, especially home/self-hosted users, who want to add some level of automation to their transaction tracking, either in addition to or because they can't or don't want to use the dataimporter

How it works - posting transactions

  1. User sends a transaction screenshot/image or statement to a Telegram bot
  2. Gemini analyzes it based on the user's requirements (asset account IDs & categories)
  3. The transaction information is parsed to create a suitable POST to a Firefly instance
  4. The transaction(s) are posted to Firefly via its API, using an OAuth2 credential

How it works - requesting budget reports

  1. User sends the word 'Report' via telegram
  2. A 'GET' API request is sent to Firefly for all budgets between the beginning of the month and the request date, including remaining amounts for each
  3. This is converted to a CSV file
  4. The CSV is sent to the user via Telegram

Prerequisites

  1. Telegram, and knowledge of how to set up a bot (search for BotFather in Telegram)
  2. An existing instance of Firefly III with admin access for creating OAuth2 credentials

How to set it up - Credentials

  1. Open Telegram, and search for BotFather
  2. Create a new bot by following the instructions
  3. Save the API key provided
  4. In n8n, create a new Telegram credential using the info for the new bot
  5. Create an OAuth client in Firefly, using the redirect URL found in n8n's OAuth2 API credential creator
  6. Fill the n8n OAuth2 API credential form as Authorization Code, filling in the remaining parameters from the info created in Firefly
  7. Create a Gemini credential following the instructions in n8n

How to set it up - the workflow

  1. Set the credential in each Telegram node
  2. Set the Firefly credential in each http node
  3. Set the correct base URL for the Firefly instance in each http node
  4. Set the desired Gemini credential and model in each AI node
  5. Set the correct Bank IDs (as per Firefly) and preferred categories in the AI node system message

Customization options

The user can specify all types of asset and expense accounts, as well as a specific list of categories and descriptions for Gemini to use. Gemini can also be swapped out for any other AI/LLM.

Additionally, anyone can build on this by reviewing the Firefly API documents to automate almost any other part of the Firefly software.

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 - Get file from server

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

Block 2 - Analyze the image or pdf

Type / Role
@n8n/n8n-nodes-langchain.googleGemini - googleGemini
Config choices
Version 1

Block 3 - Make it pretty

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

Block 4 - Get image from server

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

Block 5 - Post to Firefly

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

Block 6 - Switch

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

Block 7 - Analyzer Scraper

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 8 - Sticky Note1

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

Block 9 - Sticky Note5

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

Block 10 - Loop for Multiple Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 11 - Confirmation Message

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

Block 12 - Get Remaining Budget

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

Block 13 - Parse JSON

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

Block 14 - Pull required fields

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

Block 15 - Make CSV

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

Block 16 - Send CSV

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

Block 17 - Transaction Image or PDF Received

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

Block 18 - Parse details & add category

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 19 - Sticky Note2

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

Block 20 - Parse Output

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 21 - Sticky Note

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

Block 22 - Sticky Note3

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

3. Summary Table

Workflow Record transactions & generate budget reports with Gemini AI, Telegram & Firefly III
Complexity advanced
Nodes 22
Categories Document Extraction, AI Chatbot
Author PTS
Published 28 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11339/11339.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 Record transactions & generate budget reports with Gemini AI, Telegram & Firefly III do?

Who this is for Anybody using Firefly III, especially home/self hosted users, who want to add some level of automation to their transaction tracking, either in addition to or because they can't or ...

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 Document Extraction, AI Chatbot use case.