by Joseph LePage
MCP AI Chatbot using Brave Search Disclaimer: This workflow only works with local installations of n8n because it uses a community MCP node Who is this for? This workflow is ideal for developers, automation enthusiasts, and businesses looking to integrate AI-powered chat capabilities into their workflows. It's particularly useful for those leveraging Brave Search and MCP tools to enhance user interactions and streamline data retrieval. What problem is this workflow solving? This workflow addresses the challenge of creating an intelligent chatbot that can process user queries, execute searches using Brave Search, and provide responses enriched by AI. It simplifies the integration of multiple tools into a cohesive system, saving time and effort for users who need a robust conversational AI solution. What this workflow does Listens for incoming chat messages using the Chat Trigger node. Processes user input with an AI Agent powered by GPT-4o. Retrieves relevant tools using the MCP Get Brave Tools node. Executes specific search queries via the MCP Execute Brave Search node. Maintains short-term memory of conversations with the Simple Memory node. Setup Prerequisites: Access to an n8n instance (self-hosted). API credentials for OpenAI and MCP Client Tools. Brave Search API key. Steps: Import the workflow JSON into your n8n instance. Configure the API credentials for OpenAI and MCP Client Tools in their respective nodes. Set up your Brave Search API key in the MCP nodes. https://brave.com/search/api/ Testing: Use the built-in chat interface to send test messages. Verify that the chatbot processes queries and returns results as expected. How to customize this workflow to your needs Modify the AI Agent's prompt settings to tailor responses to your specific use case. Adjust the memory buffer in the Simple Memory node to retain more or less conversational context. Replace or add additional tools in the MCP nodes to expand functionality.
by David Olusola
Overview This workflow watches for new rows in a Google Sheet (e.g., where you manually log customer reviews) and uses a Code node to perform a simple sentiment analysis, then updates the same row with the detected sentiment. Use Case: Quickly gauge customer satisfaction, identify positive/negative trends, and prioritize follow-ups based on sentiment. How It Works This workflow operates in four main steps: Google Sheets Trigger (New Row): The workflow starts with a Google Sheets Trigger node configured to monitor a specific Google Sheet for new rows. This triggers the workflow whenever a new review is added. Code Node (Sentiment Analysis): A Code node receives the new row data (containing the review text). Inside this node, JavaScript code performs a basic sentiment analysis by checking for keywords (e.g., "great", "excellent" for positive; "bad", "problem" for negative). It assigns "Positive", "Negative", or "Neutral" sentiment. Update Google Sheet Row: A Google Sheets node is configured to update the same row that triggered the workflow. It adds the sentiment result (and potentially other analysis data) to a new column in that row. Setup Steps To get this workflow up and running, follow these instructions: Step 1: Create Google Sheets Credentials in n8n In your n8n instance, click on Credentials in the left sidebar. Click New Credential. Search for and select "Google Sheets OAuth2 API" and follow the authentication steps with your Google account. Save it. Make note of the Credential Name (e.g., "My Google Sheets Account"). Step 2: Prepare Your Google Sheet (or better Make a copy of the one provided in the template) Create a new Google Sheet in your Google Drive (e.g., Customer Reviews). In the first row, add these column headers: Timestamp Customer Name Review Text Sentiment (This column will be updated by the workflow) Review ID (Optional, for tracking) Copy the Sheet ID from the URL (e.g., https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID_HERE/edit). Copy the GID of the specific sheet tab (e.g., https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID_HERE/edit#gid=YOUR_GID_HERE). This is the sheetName value. Step 3: Import the Workflow JSON Step 4: Activate and Test the Workflow Click the "Activate" toggle button in the top right corner of the n8n workflow editor. Go to your Google Sheet and manually add a new row with a "Review Text" (e.g., "This product is great, I love it!"). Leave the "Sentiment" column empty. The workflow should trigger automatically (it polls every minute by default), analyze the sentiment, and update the "Sentiment" column in your Google Sheet. You can also manually "Execute Workflow" to test immediately.
by Vitorio Magalhães
Auto-publish NASA APOD to LinkedIn with AI translation and hashtags Transform NASA's daily astronomical wonders into engaging LinkedIn content automatically. This workflow fetches NASA's Astronomy Picture of the Day, translates it to Brazilian Portuguese using AI, generates strategic hashtags, and publishes everything to your LinkedIn profile with the stunning space image attached. Who's it for Content creators, astronomy enthusiasts, science communicators, and anyone wanting to share high-quality educational content consistently on LinkedIn. Perfect for Portuguese-speaking professionals who want to engage their network with fascinating space discoveries while building their personal brand as a science advocate. How it works The workflow runs on a daily schedule and handles the complete content pipeline automatically. It fetches the latest NASA APOD through the official API, including both the image and detailed explanation. The English description gets professionally translated to selected language using Google Gemini 2.5 Flash, while maintaining scientific accuracy and terminology. Smart hashtag generation combines fixed branding tags with content-specific ones, mixing Portuguese and English for maximum reach. The final post includes the NASA image, translated description, and strategic hashtags, then gets published to your LinkedIn profile automatically. How to set up You'll need accounts for Google AI Studio (free), LinkedIn Developer (free), and a Telegram bot for notifications. The setup takes about 15 minutes and uses only free services and APIs. First, create your Google AI Studio account and get an API key for the AI translation services. Then set up a LinkedIn OAuth2 application to enable posting permissions. Create a Telegram bot through BotFather and get your chat ID for notifications. Configure the Settings node with your Telegram chat ID and preferred language. The workflow comes with all prompts and configurations ready to use. Test each component individually before activating the daily automation. Requirements LinkedIn account with posting permissions Google AI Studio API key (free tier available) Telegram bot token and your chat ID Basic understanding of OAuth2 setup for LinkedIn NASA API key (optional - demo key included) All services used have generous free tiers, making this workflow completely free to operate indefinitely. How to customize the workflow The centralized Settings node makes customization simple. Change the target language from Brazilian Portuguese to any other language by updating the translate_to_language variable. Modify the posting schedule in the CRON trigger to match your preferred timing. Customize the post template in the "Create Final Post Text" node to match your personal brand voice. Adjust the hashtag strategy by editing the AI prompt in the "Generate Hashtags" node. Add additional social platforms by duplicating the LinkedIn publisher with different credentials. The AI prompts can be fine-tuned for different writing styles or specific astronomical topics. You can also extend the workflow to include additional content processing, image enhancements, or cross-posting to multiple platforms while maintaining the core NASA APOD automation.
by Stephan Koning
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. **Alternatively, you can delete the community node and use the HTTP node instead. ** Most email agent templates are fundamentally broken. They're statelessāthey have no long-term memory. An agent that can't remember past conversations is just a glorified auto-responder, not an intelligent system. This workflow is Part 1 of building a truly agentic system: creating the brain. Before you can have an agent that replies intelligently, you need a knowledge base for it to draw from. This system uses a sophisticated parser to automatically read, analyze, and structure every incoming email. It then logs that intelligence into a persistent, long-term memory powered by mem0. The Problem This Solves Your inbox is a goldmine of client data, but it's unstructured, and manually monitoring it is a full-time job. This constant, reactive work prevents you from scaling. This workflow solves that "system problem" by creating an "always-on" engine that automatically processes, analyzes, and structures every incoming email, turning raw communication into a single source of truth for growth. How It Works This is an autonomous, multi-stage intelligence engine. It runs in the background, turning every new email into a valuable data asset. Real-Time Ingest & Prep: The system is kicked off by the Gmail Trigger, which constantly watches your inbox. The moment a new email arrives, the workflow fires. That email is immediately passed to the Set Target Email node, which strips it down to the essentials: the sender's address, the subject, and the core text of the message (I prefer using the plain text or HTML-as-text for reliability). While this step is optional, it's a good practice for keeping the data clean and orderly for the AI. AI Analysis (The Brain): The prepared text is fed to the core of the system: the AI Agent. This agent, powered by the LLM of your choice (e.g., GPT-4), reads and understands the email's content. It's not just reading; it's performing analysis to: Extract the core message. Determine the sentiment (Positive, Negative, Neutral). Identify potential red flags. Pull out key topics and keywords. The agent uses Window Buffer Memory to recall the last 10 messages within the same conversation thread, giving it the context to provide a much smarter analysis. Quality Control (The Parser): We don't trust the AI's first draft blindly. The analysis is sent to an Auto-fixing Output Parser. If the initial output isn't in a perfect JSON format, a second Parsing LLM (e.g., Mistral) automatically corrects it. This is our "twist" that guarantees your data is always perfectly structured and reliable. Create a Permanent Client Record: This is the most critical step. The clean, structured data is sent to mem0. The analysis is now logged against the sender's email address. This moves beyond just tracking conversations; it builds a complete, historical intelligence file on every person you communicate with, creating an invaluable, long-term asset. Optional Use: For back-filling historical data, you can disable the Gmail Trigger and temporarily connect a Gmail "Get Many" node to the Set Target Email node to process your backlog in batches. Setup Requirements To deploy this system, you'll need the following: An active n8n instance. Gmail** API credentials. An API key for your primary LLM (e.g., OpenAI). An API key for your parsing LLM (e.g., Mistral AI). An account with mem0.ai for the memory layer.
by Mary Newhauser
RAG over a PDF with Weaviate This workflow allows you to upload a PDF file and ask questions about it using the Question and Answer Chain and the Weaviate Vector Store nodes. Who it's for This workflow is the simplest possible implementation of RAG with Weaviate in n8n. It's intended to act as an extendable template for RAG over your own documents. Prerequisites An existing Weaviate cluster. You can view instructions for setting up a local cluster with Docker here or a Weaviate Cloud cluster here. API keys to generate embeddings and power chat models. We use OpenAI, but feel free to switch out the models as you like. Self-hosted n8n instance. See this video for how to get set up in just three minutes. How it works Part 1: Manually upload data In this example, we manually upload a 100+ page article from arXiv called "A Survey of Large Language Models". But you can replace this with your own more advanced data pipeline, if you wish. Part 2: Embed and load data into Weaviate collection Here, we generate embeddings for the full-text of the article and store them in Weaviate. Part 3: Perform RAG over PDF file with Weaviate In this part of the workflow, you can enter your query by running the Chat Node and get a RAG response grounded in context via the Question and Answer Chain node. How to run the workflow Go through the prerequisites, creating a Weaviate cluster (can be local or cloud), downloading self-hosted n8n, and adding your API keys and other credentials. Select the embedding and chat models you'd like to use. Upload a PDF file you want to ask questions about. Execute the rest of the workflow.
by Jay Emp0
MCP Tool ā Replicate (Flux) Image Generator ā WordPress/Twitter Generates images via Replicate Flux models and uploads to WordPress (and optionally Twitter/X). Built to act as an MCP module that other agents/workflows call for on-demand image creation. Models configured in this workflow:\ black-forest-labs/flux-schnell, black-forest-labs/flux-dev, black-forest-labs/flux-1.1-pro Switch rationale: lower cost š°, broader model choice šÆ, full control of parameters āļø Leonardo API credits cannot be used in the web UI š āāļø; separate spend for API vs UI Links: š Prior Leonardo-based workflow: https://n8n.io/workflows/6363-generate-and-upload-images-with-leonardo-ai-wordpress-and-twitter/ š° Blog automation consuming these images: https://n8n.io/workflows/6734-ai-blog-automation-publish-hourly-seo-articles-to-wordpress-and-twitter-v3/ š„ Inputs | Field | Type | Description | | ------ | ------ | --------------------------------- | | prompt | string | Text description for the image | | slug | string | Filename slug for WP media | | model | string | One of the configured Flux models | Example: { "prompt":"Joker watching a Batman movie on his laptop", "slug":"joker-watching-batman", "model":"black-forest-labs/flux-dev" } š¤ Output { "public_image_url": "https://your-wp.com/wp-content/uploads/2025/08/img-joker-watching-batman.webp", "wordpress": {...}, "twitter": {...} } š Flow Trigger with prompt, slug, model Build model payload (quality/steps/ratio/output format) Call Replicate: POST /v1/models/{model}/predictions (Prefer: wait) Download the generated image URL Upload to WordPress (returns public URL) Optional: upload to Twitter/X Return URL + metadata š¤ MCP Use at Scale (emp0.com) Operational pattern: I currently use this setup for my blog where i generate 300 posts/month, each with 4 images (banner + 2 to 3 inline images) ā 1,000 images/month produced by this MCP. š” Hybrid Cost-Optimized Setup: High-priority images* (banners, main visuals): Generated using *Flux Dev** on Leonardo for slightly better prompt adherence. Low-priority images* (inline blog visuals): Generated using *Flux Schnell** on Replicate for maximum cost efficiency. š° Pricing Comparison (per image) Leonardo per-image cost uses API Basic math: $9 / 3,500 credits = $0.0025714 per credit. Flux Schnell (Leonardo)** = 7 credits Flux Dev (Leonardo)** = 7 credits Flux 1.1 Pro equivalent in Leonardo* = *Leonardo Phoenix** based on my experience = 10 credits | Flux Model | Replicate | Leonardo API* | | ------------------------ | ------------------------- | ------------------------------- | | flux-schnell | $0.0030 (=$3/1,000) | $0.0180 (7 Ć $0.0025714) | | flux-dev | $0.0250 | $0.0180 (7 Ć $0.0025714) | | flux-1.1-pro / Phoenix | $0.0400 | $0.0257 (10 Ć $0.0025714) | Replicate pricing: https://replicate.com/pricing\ Leonardo pricing: https://leonardo.ai/pricing/\ Leonardo API usage: https://docs.leonardo.ai/docs/commonly-used-api-values š Monthly Cost Example (1,000 images/month) Mix: 300 Ćflux-dev on Leonardo, 700 Ćflux-schnell on Replicate. | Platform/Model | Images | Price per Image | Total | | ------------------------ | ------ | --------------- | ---------- | | Leonardo flux-dev | 300 | $0.0180 | $5.40 | | Replicate flux-schnell | 700 | $0.0030 | $2.10 | | Total Monthly Spend | 1000 | ā | $7.50 | šµ If using Leonardo for both: 300 Ć $0.0180 = $5.40 700 Ć $0.0180 = $12.60 Total = $18.00** Savings: $10.50/month (ā58% lower) with the hybrid setup. š Notes More Replicate models can be added in Code1 node. Parameters tuned for aspect ratio, inference steps, quality, guidance. Leonardo credit model is API-only; credits are not spendable in Leonardo's web UI.
by Arlin Perez
AI Research Assistant via Telegram (GPT-4o mini + DeepSeek R1 + SerpAPI) š„ Whoās it for This workflow is perfect for anyone who wants to receive AI-powered research summaries directly on Telegram. Ideal for people asking frequent product, tech, or decision-making questions and want up-to-date answers sourced from the web. š¤ What it does Users send a question via Telegram. An AI agent (DeepSeek R1) reformulates and understands the intent, while a second agent (GPT-4o mini) performs live research using SerpAPI. The most relevant answers, including links and images, are delivered back via Telegram. āļø How it works š² Telegram Trigger ā Starts when a user sends a message to your Telegram bot. š§ DeepSeek R1 Agent ā Understands, clarifies, or reformulates the user query. š§ Research AI Agent (GPT-4o mini + SerpAPI) ā Searches the web and summarizes the best results. š¤ Send Telegram Message ā Sends the response back to the same user. š Requirements Telegram bot (via BotFather) with API token set in n8n credentials OpenAI account with API key and balance for GPT-4o mini SerpAPI account (100 free searches/month) with API key DeepSeek account with API key and balance š ļø How to set up Create your Telegram bot using BotFather and connect it using the Telegram Trigger node Set up DeepSeek credentials and add a Chat Model AI Agent node using DeepSeek R1 to reformulate the userās question Set up OpenAI credentials and add a second ChatGPT AI Agent node using GPT-4o mini In the GPT-4o node, enable the SerpAPI Tool and add your SerpAPI API key Pass the reformulated question from DeepSeek to the GPT-4o agent for live search and summarization Format the response (text, links, optional images) Send the final reply to the user using the Telegram Send Message node Ensure your n8n instance is publicly accessible Test the workflow by sending a message to your Telegram bot ā
by Don Jayamaha Jr
This advanced agent analyzes long-term price action in the Binance Spot Market using 1-day candles. It calculates key macro indicators like RSI, MACD, BBANDS, EMA, SMA, and ADX to identify high-confidence trend setups and market momentum. Used by the Quant AI system for directional bias and macro-level signal validation. š„ Watch Tutorial: šÆ Purpose Detect major trend reversals, consolidation zones, and macro bias Support long-term swing trading decisions Provide reliable 1-day signals for downstream agents š§ Core Features | Feature | Description | | --------------------------- | ------------------------------------------------------------ | | š Trigger | Called by parent workflows via Execute Workflow | | š„ Input Format | { "message": "MATICUSDT", "sessionId": "telegram_id" } | | š” Webhook Call | Sends request to internal 1d indicators webhook | | š§® Technical Indicators | RSI, MACD, BBANDS, EMA, SMA, ADX (based on 40 daily candles) | | š§ GPT (gpt-4.1-mini) Agent | Interprets numerical data into human-readable trend signals | | š¬ Output | Summary suitable for Telegram or further agent consumption | š External Tools Called https://treasurium.app.n8n.cloud/webhook/1d-indicators Sends: { "symbol": "SOLUSDT" } š Indicator Calculations | Indicator | Purpose | | -------------- | ------------------------------- | | RSI (14) | Overbought / Oversold Signals | | MACD (12,26,9) | Trend Reversals / Momentum | | BBANDS (20, 2) | Volatility Expansion | | EMA (20) | Short-Term Trend Confirmation | | SMA (20) | Macro-Level Support/Resistance | | ADX (14) | Trend Strength + Directional DI | š¦ Setup Import the JSON into n8n. Add your OpenAI API credentials. Ensure webhook /1d-indicators is connected and working. Use this agent as a sub-workflow in: Binance SM Financial Analyst Tool Binance Spot Market Quant AI Agent š¤ Output Example š 1D Overview ā MATICUSDT ⢠RSI: 71 ā Overbought ⢠MACD: Bearish Cross forming ⢠BBANDS: Widening Volatility ⢠EMA < SMA ā Downtrend Momentum ⢠ADX: 33 ā High Trend Strength š Notes Not user-facing ā outputs are structured JSON or Telegram-style summaries. Pairs well with shorter timeframe tools (15mā4h) for confidence stacking. š§¾ Licensing & Attribution Ā© 2025 Treasurium Capital Limited Company Architecture, prompts, and trade report structure are IP-protected. No unauthorized rebranding permitted. š Need help? Reach out on LinkedIn ā Don Jayamaha
by Hunyao
What it does Pulls up to 700 Amazon reviews per product (recent and top-rated) and writes them straight into a Google Sheet tab you choose. Perfect for ⢠Brand and product managers tracking sentiment ⢠Marketplace sellers analysing competitor feedback ⢠Agencies building product-review dashboards Apps used RapidAPI Real-Time Amazon Data, Google Sheets, n8n Form Trigger How it works Form Trigger collects brand, product and sheet info. Code node extracts the ASIN and builds 70 API requests (10 pages Ć star ratings). Split-in-batches loops through the request list, throttled by two Wait nodes. HTTP Request fetches reviews from RapidAPI. IF node drops empty or error responses. Split Out breaks arrays into single reviews. Google Sheets appends every review to the target tab. Loop continues until all pages finish. Setup Fill in Brand name, Product / Model Name, Amazon Product URL, Tab URL to insert reviews in the form. Grab your X-RapidAPI-Key from RapidAPI ā Add as httpHeaderAuth credential. Connect Google Sheets OAuth2 and make the spreadsheet Anyone with the link can edit. Open Workflow Settings ā set timezone if you plan to schedule runs. Hit Execute workflow or share the form link. Credentials ⢠Real-Time Amazon Data (RapidAPI HTTP Header Auth) ⢠Google Sheets OAuth2 Limits and notes ⢠\~100 RapidAPI calls for the free plan. Plan quota accordingly. ⢠Assumes Amazon returns 10 pages per star rating; fewer pages skip silently. ⢠Large sheets may hit Google API write quotas. If you have any questions in running the workflow, feel free to reach out to me at my youtube channel: https://www.youtube.com/@lifeofhunyao
by Naveen Choudhary
Who is this template for? Growth teams, SDRs, recruiters, or anyone whoāÆroutinely hunts for hardātoāfind business emails and would rather spend time reaching out than guessing formats. What problem does this workflow solve? Manually piecing together email patterns, crossāchecking them in a verifier, and updating a tracking sheet is slow and errorāprone. This template automates theāÆentire loopāresearch, guess, verify, and logāso you hit Start and watch rows fill up with readyātoāsend addresses. What this workflow does Pull fresh leads ā Grabs only the rows in your GoogleāÆSheet where StatusāÆ=āÆFALSE. Find the company pattern ā Queries Serper.dev for snippets and feeds them to GeminiāÆFlash (via OpenRouter) to spot the dominant email format. Build the address ā Constructs a likely email for every first/last name. Verify in real time ā Pings Prospeo by default (API) or lets you bulkāclean in Sparkle.io. Write it back ā Updates the sheet with pattern, email, confidence, verification status, and flips Status toāÆTRUE. Loop until done ā Runs batchābyābatch so you never hit API limits. š Work freeātier magic (up to \~2,500 contacts/month) | Service | Free allowance | How this template uses it | | -------------- | ----------------------------- | ------------------------------------------------------------------------------------ | | Serper.dev | 2,500 searches/mo | Scrapes three public email snippets per domain to learn the pattern | | Sparkle.io | 10,000 bulk verifications/day | Manual uploadādownload optionāperfect to clean your first 2.5k emails at zero cost | | Prospeo | 75 API calls/mo | Builtāin if you prefer fully automated verification | Quick Sparkle workflow: Let the template generate emails. Export the āEmailā column toāÆCSV ā upload to Sparkle.io. Download the results and paste the "verification\_status" back into the sheet (or add a small n8n import subāflow). Setup (5āÆminutes) Copy the GoogleāÆSheet linked in the sticky note and paste its ID into the Get Rows and Update Rows nodes. Add credentials for GoogleāÆSheets, Serper (XāAPIāKEY), OpenRouter, and optionally Prospeo. Hit Execute Workflowāthatās it. How to customise Prefer Sparkle for volume:** Skip the Prospeo node, export emails in one click, bulkāverify in Sparkle, and reāimport results. Swap the search source:* Replace the *Get Email Pattern HTTP node with Bing, Brave, etc. Extend enrichment:* Add phone lookāups or LinkedIn scrapers before the *Update Rows node. Autoārun:** Replace the Manual Trigger with a Cron node so the sheet cleans itself every morning. AdditionalāÆresources | Tool | Purpose | Link | | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | -------------------------------------------------------- | | Prospeo ā APIāready email verificationSpecial offer: 20āÆ% free credits for the firstāÆ3āÆmonths on any plan using this link! | Realātime, singleācall mailbox validation | prospeo.io | | Sparkle.io ā highāvolume bulk verifier (manual upload) | Free daily quota of 10āÆ000 verifications | app.sparkle.io/signāup | | OpenRouter ā API gateway for GeminiĀ Flash & other LLMs | One key unlocks multiple frontier models | openrouter.ai | | Serper.dev ā Google Search API | 2āÆ500 searches/month on the free tier | serper.dev | Add the relevant keys or signup details from these links, drop them into the matching n8n credentials, and youāre all set to enrich your first 2āÆ500 contacts at zero cost. Happy building!
by Vincent Belmehel
Purpose This workflow automatically creates a subscriber in a given Beehiiv publication when a new opt-in is registered in a given Systeme.io sales funnel. Good to know: the integration with Systeme.io is done at the sales funnel level, not at the account level. If you have several sales funnels, you can use the same workflow several times. Quick Setup Configure your sales funnel in Systeme.io to create and trigger a webhook after an opt-in Open the āOn New Systeme.io Optinā node to find the webhook URL needed to configure your sales funnel on Systeme.io Configure the āConfigure Workflowā node Add your Beehiiv publication ID If you know the subscriber's first and last name and want to send it to Beehiiv, configure the custom field names for first and last name Add one or more email addresses to which to send alert notifications in the event of a problem (separated by commas). If you have not already done so : Connect your Beehiiv account in the āCreate New Beehiiv Subscriberā node Connect your Gmail account in the āSend Email Alert (Beehiiv API error)ā node How It Works As soon as a new opt-in is registered on your sales funnel, Systeme.io triggers the workflow (via a webhook) Only requests actually coming from Systeme.io are considered (whitelisting of their IP addresses for security reasons) A new subscriber is added to your Beehiiv publication (via an API call) If available in Systeme.io, UTM tags (utm_source, utm_medium and utm_campaign) are transferred to Beehiiv to correctly track where your subscribers are coming from If an error occurs during the Beehiiv API call, an alert notification is sent to you (via email) Requirements A Systeme.io account A Beehiiv account with an active publication A Gmail account Benefits Automate & scale your email marketing efforts seamlessly No more manual tasks to keep your subscriber list always up-to-date Focus on creating a newsletter that stands out, not on the technical side Check Out My Other Templates š https://n8n.io/creators/belmehel/
by Jimleuk
This n8n workflow demonstrates an approach to parsing bank statement PDFs with multimodal LLMs as an alternative to traditional OCR. This allows for much more accurate data extraction from the document especially when it comes to tables and complex layouts. Multimodal Parsing is better than traditiona OCR because: It reduces complexity and overhead by avoiding the need to preprocess the document into text format such as markdown before passing to the LLM. It handles non-standard PDF formats which may produce garbled output via traditional OCR text conversion. It's orders of magnitude cheaper than premium OCR models that still require post-processing cleanup and formatting. LLMs can format to any schema or language you desire! How it works You can use the example bank statement created specifically for this workflow here: https://drive.google.com/file/d/1wS9U7MQDthj57CvEcqG_Llkr-ek6RqGA/view?usp=sharing A PDF bank statement is imported via Google Drive. For this demo, I've created a mock bank statement which includes complex table layouts of 5 columns. Typically, OCR will be unable to align the columns correctly and mistake some deposits for withdrawals. Because multimodal LLMs do not accept PDFs directly, well have to convert the PDF to a series of images. We can achieve this by using a tool such as Stirling PDF. Stirling PDF is self-hostable which is handy for sensitive data such as bank statements. Stirling PDF will return our PDF as a series of JPGs (one for each page) in a zipped file. We can use n8n's decompress node to extract the images and ensure they are ordered by using the Sort node. Next, we'll resize each page using the Edit Image node to ensure the right balance between resolution limits and processing speed. Each resized page image is then passed into the Basic LLM node which will use our multimodal LLM of choice - Gemini 1.5 Pro. In the LLM node's options, we'll add a "user message" of type binary (data) which is how we add our image data as an input. Our prompt will instruct the multimodal LLM to transcribe each page to markdown. Note, you do not need to do this - you can just ask for data points to extract directly! Our goal for this template is to demonstrate the LLMs ability to accurately read the page. Finally, with our markdown version of all pages, we can pass this to another LLM node to extract required data such as deposit line items. Requirements Google Gemini API for Multimodal LLM. Google Drive access for document storage. Stirling PDF instance for PDF to Image conversion Customising the workflow At time of writing, Gemini 1.5 Pro is the most accurate in text document parsing with a relatively low cost. If you are not using Google Gemini however you can switch to other multimodal LLMs such as OpenAI GPT or Antrophic Claude. If you don't need the markdown, simply asking what to extract directly in the LLM's prompt is also acceptable and would save a few extra steps. Not parsing any bank statements any time soon? This template also works for Invoices, inventory lists, contracts, legal documents etc.