Back to Catalog

Stock portfolio analysis with Perplexity AI, GPT-4, and Google Sheets

Automate With MarcAutomate With Marc
1731 views
2/3/2026
Official Page

πŸ“Š Dynamic Portfolio Advisor – Daily Stock Market Intelligence with Google Sheets Description: This advanced AI-powered n8n workflow automatically delivers a daily market intelligence briefing tailored to your stock holdings portfolio stored in Google Sheets. It uses real-time data from Perplexity AI, combines it with your portfolio, and generates personalized insights, risk alerts, and trade suggestions β€” all delivered via Telegram or any messaging app of your choice.

For step-by-step build of workflows like this, check out: https://www.youtube.com/@Automatewithmarc

βš™οΈ How It Works: πŸ•’ Daily Trigger  Starts every day at a scheduled time (default: 10 AM) to fetch the most recent market data.

πŸ“ˆ Holdings Fetch  Reads your current portfolio dynamically from Google Sheets β€” no hardcoding required.

🧠 AI Analysis Agent  Combines:

Market headlines

Company-specific developments

Macroeconomic updates  And analyzes how they might affect your holdings.

πŸ” Perplexity Web Research Tool  Finds and summarizes the most relevant stock market news from the past 24 hours.

πŸ’¬ Telegram Delivery  Sends a customized summary of:

Market highlights

Asset-specific impacts

Opportunities and risks

Actionable trade ideas (buy/sell/hold)

πŸ› οΈ Tools & Integrations: Google Sheets (live holdings feed)

Perplexity AI (real-time market research)

OpenAI GPT (financial summarization)

Telegram (output, customizable)

πŸ’‘ Use Cases: Portfolio-aware market intelligence

Automated investor briefing assistant

Risk alert + opportunity scanner

Daily trade idea generator

Finance bloggers or equity analysts streamlining prep work

πŸ“Note: You can easily replace Telegram with Slack, Email, Notion, or any output tool supported by n8n.

This template is perfect for active investors, financial advisors, or automation-savvy traders who want to turn AI and data into actionable daily signals.

n8n AI Agent for Telegram Chat

This n8n workflow demonstrates a basic setup for an AI conversational agent that interacts with users via Telegram. It utilizes n8n's LangChain integration to provide a simple, stateful chat experience.

Description

This workflow creates a Telegram bot that can hold a conversation using an AI agent. It listens for incoming messages on Telegram, processes them with an OpenAI Chat Model, stores a short history of the conversation, and sends the AI's response back to the user.

What it does

  1. Triggers on Telegram Messages: The workflow starts whenever a new message is received by the configured Telegram bot.
  2. Initializes AI Agent: It sets up an AI Agent using the LangChain integration.
  3. Configures OpenAI Chat Model: The AI Agent uses an OpenAI Chat Model to generate responses.
  4. Maintains Simple Memory: A "Simple Memory" (Buffer Window Memory) is used to keep track of the last few turns of the conversation, allowing the AI to maintain context.
  5. Responds via Telegram: The AI's generated response is sent back to the user through the Telegram bot.

Prerequisites/Requirements

  • n8n Instance: A running instance of n8n.
  • Telegram Bot Token: A Telegram bot created via BotFather. You will need its API token.
  • OpenAI API Key: An API key from OpenAI to access their chat models (e.g., GPT-3.5 Turbo, GPT-4).
  • n8n Credentials: You will need to configure credentials for both Telegram and OpenAI within your n8n instance.

Setup/Usage

  1. Import the Workflow:
    • Copy the provided JSON workflow definition.
    • In your n8n instance, click "New" -> "Import from JSON" and paste the content.
  2. Configure Credentials:
    • Telegram Node (ID: 49): Click on the "Telegram" node. In the "Credentials" section, select or create a new Telegram API credential using your bot token.
    • OpenAI Chat Model Node (ID: 1153): Click on the "OpenAI Chat Model" node. In the "Credentials" section, select or create a new OpenAI API credential using your OpenAI API Key.
  3. Activate the Workflow: Toggle the workflow to "Active" in the top right corner of the n8n editor.
  4. Start Chatting: Send a message to your configured Telegram bot, and the AI agent should respond!

Related Templates

Generate AI website legal and accessibility compliance reports with OpenAI, Gmail and Google Drive

Automated Legal & Accessibility Website Compliance Checker Description Automate website compliance checks in minutes using AI-powered analysis. This workflow scans any website for essential legal and accessibility requirements, generates a professional compliance report, delivers it as a PDF, and stores it securely β€” helping teams identify risks early and stay audit-ready with zero manual effort. --- What This Workflow Does Transforms manual website compliance reviews into a single automated flow: 🌐 Capture Website Details – Accepts website URL, company name, and email via webhook. πŸ“₯ Fetch Website Content – Securely downloads and cleans website HTML for analysis. 🧠 AI Compliance Analysis – Uses AI to audit the site against key compliance standards. πŸ“Š Scoring & Insights – Calculates an overall compliance score and highlights gaps. πŸ“„ Generate Visual Report – Builds a detailed, easy-to-read HTML compliance report. πŸ–¨οΈ Convert to PDF – Converts the report into a downloadable, shareable PDF. πŸ“§ Email Delivery – Sends the compliance report directly to the provided email. ☁️ Secure Storage – Saves the PDF report to Google Drive for records and audits. --- Key Features πŸ€– AI-Powered Compliance Audits – Automatically checks privacy, cookies, accessibility, SSL, and more. πŸ“Š Compliance Scoring – Clear numerical scores and status indicators for each section. πŸ“„ Professional PDF Reports – Branded, structured reports suitable for clients or audits. βš™οΈ End-to-End Automation – From URL submission to email delivery without manual steps. πŸ“§ Instant Email Notifications – Reports delivered automatically to stakeholders. ☁️ Google Drive Backup – Centralized storage for compliance history and documentation. --- Compliance Checks Included βœ”οΈ Privacy Policy presence & indicators βœ”οΈ Cookie consent mechanisms βœ”οΈ Terms of Service availability βœ”οΈ Accessibility (WCAG-related indicators) βœ”οΈ Contact information visibility βœ”οΈ SSL / HTTPS verification βœ”οΈ Critical issues & improvement recommendations --- Perfect For 🏒 Startups & SaaS Companies – Quickly assess website compliance before launch. 🧾 Agencies & Consultants – Deliver automated compliance audits to clients. βš–οΈ Legal & Compliance Teams – Speed up preliminary compliance checks. πŸ’» Freelancers & Web Developers – Validate client websites post-deployment. πŸ“ˆ Operations Teams – Maintain ongoing compliance documentation effortlessly. --- What You’ll Need Required Integrations 🌐 Webhook – Receive website URL and user details. πŸ€– OpenAI – Analyze website HTML for compliance indicators. πŸ“„ HTMLCSS to PDF – Convert compliance report into a PDF. πŸ“§ Gmail – Send compliance report via email. ☁️ Google Drive – Store generated compliance reports. 🌍 HTTP Request – Fetch website HTML content (no authentication required). --- Optional Enhancements πŸ“Š Compliance Dashboard – Connect Google Drive or logs to Looker Studio. 🌍 Multi-Website Scans – Extend webhook to accept bulk URLs. πŸ•’ Scheduled Scans – Run periodic compliance checks automatically. πŸ“¨ Slack Alerts – Send compliance summaries to internal channels. πŸ“ Custom Branding – Adjust HTML styling, logos, and colors. --- Quick Start 1️⃣ Import the workflow JSON into your n8n workspace. 2️⃣ Activate the webhook and copy the endpoint URL. 3️⃣ Connect OpenAI, Gmail, Google Drive, and HTMLCSS to PDF credentials. 4️⃣ Send a POST request with website URL, company name, and email. 5️⃣ Review the emailed PDF compliance report. 6️⃣ Check Google Drive for stored audit copies. 7️⃣ Activate the workflow for production use. --- Expected Results ⚑ Minutes Instead of Hours – Instant compliance assessments. πŸ€– AI Accuracy – Consistent, structured compliance analysis. πŸ“ˆ Risk Visibility – Early detection of legal and accessibility gaps. πŸ“„ Audit-Ready Reports – Clean, shareable documentation. ☁️ Centralized Storage – Every scan archived automatically. --- Workflow Structure 🌐 Webhook Trigger ↓ πŸ“₯ Fetch Website HTML ↓ 🧹 Clean & Prepare Content ↓ 🧠 AI Compliance Analysis ↓ πŸ“Š Parse Results ↓ πŸ“„ Generate HTML Report ↓ πŸ–¨οΈ Convert to PDF ↓ πŸ“§ Email Report ↓ ☁️ Save to Google Drive --- Ready to Automate Website Compliance? Import this template and turn any website URL into a complete compliance report β€” automatically, consistently, and professionally. Perfect for audits, clients, and peace of mind. βœ… ---

Jitesh DugarBy Jitesh Dugar
31

WhatsApp group chat with your vector database β€” no Facebook Business required

Enable smart, real-time answers in your WhatsApp groups using a custom webhook, Pinecone vector database, and no Facebook Business setup. > 🟑 Note: This template uses a custom WhatsApp webhook. It does not use the official WhatsApp Business API. --- πŸ‘₯ Who is this for? This workflow is designed for individuals and teams who want to enable smart WhatsApp group automation β€” without going through Meta’s official WhatsApp Business API. Ideal for small businesses, internal teams, communities, and personal power users. --- ❓ What problem is this solving? Setting up WhatsApp bots with intelligent responses often requires approval from Meta and a verified business account. This workflow removes those barriers by using a self-hosted webhook to handle incoming messages and respond using a document-trained AI via Pinecone. --- βš™οΈ What this workflow does Connects a regular WhatsApp number to a custom webhook Adds the bot to any group chat (it stays silent unless mentioned) Indexes documents from Google Drive into Pinecone Responds with intelligent, context-aware answers from your custom knowledge base Auto-updates its knowledge every minute as the document changes --- πŸ› οΈ Setup Step 1: Connect Google Drive Set up your Google Drive credentials in n8n Step 2: Configure Pinecone Create an index in Pinecone Dimension: 1536 Select this index in both Pinecone nodes Click Test Workflow to ingest your document into Pinecone Step 3: Get Access to the WhatsApp Webhook Fill out this form to request access You’ll receive a WhatsApp confirmation for linking Step 4: Test WhatsApp Integration βœ… One-on-one test: Send a message from another number πŸ‘₯ Group test: Add the bot to a group; it will only respond when tagged --- 🧩 How to customize this workflow Modify the system prompt inside the AI agent node to control tone and behavior Update the connected Google Doc to match your specific domain (e.g. FAQs, SOPs, product manuals) Adjust the Pinecone sync frequency if you want updates more or less often --- πŸ“š Use cases Customer Support: Instant, intelligent replies in WhatsApp without live agents Team Knowledge Bot: Tag the bot for quick access to SOPs and internal docs Community Groups: Automate common questions while keeping noise low Personal AI Assistant: A WhatsApp chatbot trained on your notes and files --- πŸ“ Sticky Note Suggestion πŸ’¬ What this template does: > Enables an AI bot in your WhatsApp group that answers questions based on a Google Doc you provide. It uses a custom webhook, Google Drive, and Pinecone. πŸ”§ Requirements: > Google Drive account > Pinecone account with an index (dimension 1536) > Access to the custom WhatsApp webhook (see setup steps)

Cecilia MukimaBy Cecilia Mukima
1606

Create an AI Telegram bot using Google Drive, Qdrant, and OpenAI GPT-4.1

How it works This workflow creates an intelligent Telegram bot with a knowledge base powered by Qdrant vector database. The bot automatically processes documents uploaded to Google Drive, stores them as embeddings, and uses this knowledge to answer questions in Telegram. It consists of two independent flows: document processing (Google Drive β†’ Qdrant) and chat interaction (Telegram β†’ AI Agent β†’ Telegram). Step-by-step Document Processing Flow: New File Trigger: The workflow starts when the New File Trigger node detects a new file created in the specified Google Drive folder (polling every 15 minutes). Download File: The Download File (Google Drive) node downloads the detected file from Google Drive. Text Splitting: The Split Text into Chunks node splits the document text into chunks of 3000 characters with 300 character overlap for optimal embedding. Load Document Data: The Load Document Data node processes the binary file data and prepares it for vectorization. OpenAI Embeddings: The OpenAI Embeddings node generates vector embeddings for each text chunk. Insert into Qdrant: The Insert into Qdrant node stores the embeddings in the Qdrant vector database collection. Move to Processed Folder: After successful processing, the Move to Processed Folder (Google Drive) node moves the file to a "Qdrant Ready" folder to keep files organized. Telegram Chat Flow: Telegram Message Trigger: The Telegram Message Trigger node receives new messages from the Telegram bot. Filter Authorized User: The Filter Authorized User node checks if the message is from an authorized chat ID (26899549) to restrict bot access. AI Agent Processing: The AI Agent receives the user's message text and processes it using the fine-tuned GPT-4.1 model with access to the Qdrant knowledge base tool. Qdrant Knowledge Base: The Qdrant Knowledge Base node retrieves relevant information from the vector database to provide context for the AI agent's responses. Conversation Memory: The Conversation Memory node maintains conversation history per chat ID, allowing the bot to remember context. Send Response to Telegram: The Send Response to Telegram node sends the AI-generated response back to the user in Telegram. Set up steps Estimated set up time: 15 minutes Google Drive Setup: Add your Google Drive OAuth2 credentials to the New File Trigger, Download File, and Move to Processed Folder nodes. Create two folders in your Google Drive: one for incoming files and one for processed files. Copy the folder IDs from the URLs and update them in the New File Trigger (folderToWatch) and Move to Processed Folder (folderId) nodes. Qdrant Setup: Add your Qdrant API credentials to the Insert into Qdrant and Qdrant Knowledge Base nodes. Create a collection in your Qdrant instance (e.g., "Test-youtube-adept-ecom"). Update the collection name in both Qdrant nodes. OpenAI Setup: Add your OpenAI API credentials to the OpenAI Chat Model and OpenAI Embeddings nodes. (Optional) Replace the fine-tuned model ID in OpenAI Chat Model with your own model or use a standard model like gpt-4-turbo. Telegram Setup: Create a Telegram bot via @BotFather and obtain the bot token. Add your Telegram bot credentials to the Telegram Message Trigger and Send Response to Telegram nodes. Update the authorized chat ID in the Filter Authorized User node (replace 26899549 with your Telegram user ID). Customize System Prompt (Optional): Modify the system message in the AI Agent node to customize your bot's personality and behavior. The current prompt is configured for an n8n automation expert creating social media content. Activate the Workflow: Toggle "Active" in the top-right to enable both the Google Drive trigger and Telegram trigger. Upload a document to your Google Drive folder to test the document processing flow. Send a message to your Telegram bot to test the chat interaction flow.

KonstantinBy Konstantin
167