Automate Your Telegram Financial Reporting With Google Sheets
detail.loadingPreview
Effortlessly send personalized financial reports from Google Sheets directly to your Telegram. This workflow automates the retrieval and formatting of your financial data for timely updates.
About This Workflow
This n8n workflow elegantly bridges the gap between your financial data stored in Google Sheets and instant, formatted reports delivered via Telegram. It intelligently processes your investment data, calculates key financial metrics, and presents them in a clear, actionable format. Whether you need a daily P&L overview or a detailed breakdown by platform, this automation ensures you're always informed.
The workflow starts by monitoring Telegram messages. It then queries your specified Google Sheet for relevant financial data, filtering it based on the incoming message content. Subsequently, an 'If' condition checks if the request is for a specific platform or a total portfolio summary. The data is then aggregated and processed by a code node, which meticulously formats the financial figures (invested amount, P&L, changes, current value) into a human-readable message. Finally, this personalized report is sent back to the user via Telegram, complete with markdown for enhanced readability.
Key Features
- Real-time Telegram Reporting: Receive financial updates directly in your Telegram chat.
- Dynamic Data Fetching: Automatically pulls data from your specified Google Sheet.
- Personalized Insights: Generates reports for specific platforms or the entire portfolio.
- Automated Calculations: Calculates P&L, percentage changes, and current values.
- Customizable Formatting: Uses Markdown for clear and structured message presentation.
How To Use
- Telegram Trigger Setup: Configure your Telegram node to listen for incoming messages. Ensure your bot is set up and the necessary chat ID is captured.
- Google Sheets Integration: Connect your Google Sheets account and specify the
Document IDandSheet Namecontaining your financial data. Ensure your sheet has columns for 'Platform', 'Invested Amount', 'PNL', 'PNL %', 'PNL Change', and 'PNL Change %'. - Conditional Logic (Switch Node): Configure the 'Switch' node to differentiate between commands for specific platforms (e.g., messages not starting with '/total') and commands for the total portfolio (e.g., '/total').
- Data Retrieval (Get Row(s) in Sheet): Set up the Google Sheets nodes to fetch the relevant rows based on the message text (for specific platforms) or to retrieve all data (for the total portfolio).
- Data Aggregation: Use the 'Aggregate' node to gather all the fetched data into a single item for processing.
- Code Node for Formatting: Populate the 'Code' node with the provided JavaScript. This node will iterate through your data, format currency and percentages, and construct the final Telegram message. Crucially, ensure the
chat_idwithin thejsCodecorrectly references your Telegram chat ID (you can use an 'Edit Fields' node for this if needed, as shown in the example). - Telegram Output: Ensure the final output of the code node is correctly configured to send a message to your Telegram chat using the
chat_idandtextparameters, along withparse_mode: "Markdown"for formatting.
Apps Used
Workflow JSON
{
"id": "8c8d2a9d-526a-4854-82d5-0b8075308f04",
"name": "Automate Your Telegram Financial Reporting With Google Sheets",
"nodes": 16,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 8c8d2a9d-526a...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.