Automated Financial Analysis and Conversational Reporting Assistant - n8n Workflow

A robust n8n workflow for scheduled financial portfolio analysis using Perplexity and OpenAI, delivering PDF reports via Telegram, and supporting real-time conversational AI.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Financial Advisors or Wealth Managers needing automated client reports.

  • Developers seeking advanced n8n templates for integrating multiple AI agents (OpenAI, Perplexity).

  • Businesses requiring scheduled, personalized PDF generation and delivery via messaging apps like Telegram.

  • Anyone looking for a complex, event-driven n8n workflow example involving database operations (Postgres, Supabase) and external APIs (PDFco).

Overview

This sophisticated n8n workflow functions as a comprehensive, two-pronged financial analysis system. It addresses the need for both proactive, scheduled reporting and reactive, on-demand query handling. The scheduled component automates market research and portfolio analysis for a roster of clients, leveraging Perplexity for up-to-date information and multiple OpenAI n8n node agents for structuring and formatting the data into professional HTML and PDF reports. These reports are then automatically delivered via Telegram. The second crucial feature is the conversational AI assistant, activated by a Telegram n8n trigger, which manages user sign-ups, maintains chat memory using a Postgres chat memory n8n node, and can analyze uploaded documents (like personal portfolio statements) for instant feedback. This powerful n8n solution drastically reduces manual reporting time and enhances client engagement through personalized, real-time AI interactions.

How it Works

The n8n workflow operates across two primary execution paths:

Automated Reporting (Scheduled n8n Trigger)


  1. Trigger and Data Retrieval: The automation is initiated by a Schedule Trigger n8n node. It then uses the Search Clients (Postgres n8n node) to fetch all users requiring analysis.

  2. Batch Processing: The Loop Over Items n8n node iterates through each client record.

  3. Research Initiation: For each client, the RESEARCH REQUEST SPECIALIST AGENT (backed by an OpenAI Chat Model n8n node) defines a specific research query based on the client's portfolio needs.

  4. External Research: The Message a model (Perplexity n8n node) executes the defined financial research.

  5. Report Generation: The raw output is processed by a custom Code n8n node and fed into the HTML FORMATTER AGENT. This agent structures the data and generates professional HTML content using several OpenAI n8n node components and output parsers.

  6. PDF Conversion & Delivery: The resulting HTML is converted into a professional PDF using the PDF Generator (PDFco n8n node). This file is then delivered to the client via a Telegram n8n node.

  7. Database Update: The n8n workflow concludes the loop item by using the Update Sent (Supabase n8n node) to log the delivery status.

On-Demand Conversational AI (Telegram n8n Trigger)


  1. Real-Time Trigger: A user message activates the dedicated Telegram Trigger n8n node.

  2. User Authentication: The flow uses Supabase n8n nodes and an IF User Exists n8n node to check user status and register new users if necessary.

  3. Conversation Management: If the interaction is purely conversational, the Conversation Agent (utilizing a Postgres Chat Memory n8n node for history and an OpenAI Conversation n8n node) responds intelligently. It can use tools defined in the n8n workflow, such as update_wallet.

  4. PDF Analysis Path: If the user uploads a PDF, the n8n workflow downloads the document via HTTP Request n8n nodes, and the Agent Analysis PDF performs complex analysis on the file content. This action then triggers a secondary research and report generation loop similar to the scheduled path, providing the user with a customized, document-specific financial report delivered immediately via a Telegram n8n node.

Installation Guide


  1. Import the n8n workflow: Copy the provided JSON data and paste it directly into your n8n instance's workflow editor using the 'New' -> 'Import from JSON' function.

  2. Credential Setup: This n8n workflow requires multiple active credentials:

OpenAI: Required for all LLM Chat Model and Agent n8n nodes.
Perplexity: Required for external financial and market data research.
Telegram: Requires credentials for both the automated reports and the conversational trigger setup. Webhooks must be registered for the Telegram Trigger n8n node.
Postgres: Required for Chat Memory persistence and fetching client lists in the scheduled run.
Supabase: Required for managing user profiles and tracking report status.
PDFco: Required by the PDF Generator n8n node for converting HTML to PDF reports.

  1. Database Schema: Ensure your Postgres and Supabase databases are set up with the required tables (e.g., clients, chat_history, wallets) as expected by the n8n node operations.

  2. Activate: After configuring all credentials, activate the n8n workflow. The scheduled n8n trigger will run based on its configured interval.

Node Details

Schedule Trigger n8n node: Initiates the periodic execution of the reporting flow, acting as the primary n8n trigger for automation.
Telegram Trigger n8n node: Serves as the real-time n8n trigger, initiating conversational flow or PDF analysis upon user interaction.
@n8n/n8n-nodes-langchain.agent (RESEARCH REQUEST SPECIALIST / HTML FORMATTER / Conversation Agent): These powerful n8n node agents coordinate complex multi-step AI tasks, utilizing various OpenAI Chat Model n8n nodes for reasoning, research planning, and output structuring.
Perplexity n8n node (Message a model): Used as the primary tool for fetching up-to-date, specialized financial information within the n8n workflow.
n8n-nodes-base.postgres (Search Clients, Postgres Chat Memory): Retrieves the list of clients for scheduled reporting and maintains the history for the conversational AI n8n node.
n8n-nodes-base.supabase (GET Supabase User, Update Sent, Update wallet): Manages user persistence, registration, and status updates across this complex n8n workflow.
n8n-nodes-pdfco.PDFco Api (PDF Generator): A critical n8n node for converting the finalized, professionally structured HTML report into a downloadable PDF document.
n8n-nodes-base.code (PARSE RESEARCH, HTML Report Generator): Custom scripting n8n node elements necessary to transform and refine data between AI steps and ensure proper HTML assembly.

Related n8n Workflows

Paid

Nodes: 20 Nodes
Updated: December 26 2025
View all
Created by

Featured*