by Jimleuk
This n8n template demonstrates how to calculate the evaluation metric "Summarization" which in this scenario, measures the LLM's accuracy and faithfulness in producing summaries which are based on an incoming Youtube transcript. The scoring approach is adapted from https://cloud.google.com/vertex-ai/generative-ai/docs/models/metrics-templates#pointwise_summarization_quality How it works This evaluation works best for an AI summarization workflows. For our scoring, we simple compare the generated response to the original transcript. A key factor is to look out information in the response which is not mentioned in the documents. A high score indicates LLM adherence and alignment whereas a low score could signal inadequate prompt or model hallucination. Requirements n8n version 1.94+ Check out this Google Sheet for a sample data https://docs.google.com/spreadsheets/d/1YOnu2JJjlxd787AuYcg-wKbkjyjyZFgASYVV0jsij5Y/edit?usp=sharing
by andsync
Who is this template for? This template is for learners, researchers, students and professionals who want to quickly capture the essence of a YouTube video. Steps in the workflow: Gets the transcript from any YouTube video through Supadata. Process the result from Supadata to one text Process the text with AI (any LLM of your choice) Final result: Produces a summary accompanied with the most important lessons and interesting facts mentioned in the video. The workflow automatically creates a new Google Doc wiht this output, in a folder of your choice on your Google Drive. (If you want to convert the markdown text to real markup after the Google Doc is created: just select all text (Ctrl-A or CMD-A), Cut the text (Ctrl-X or CMD-X and then go to Edit > Paste from Markdown.) Setup Edit your Supadata credentials in the second node (you can start for free) Choose your favourite LLM for AI processing Edit your Google Drive credentials. How to adjust it to your needs If you want the outcome to be different, edit the Prompt in "Proces transcript to summary template". The file name is a combination of ‘transcript ‘ and the date and time. You can change this to whatever you need in the Google Drive node. Supadata offers more details and options (or even translation) when working with transcripts. Check the options here: https://supadata.ai/documentation/youtube/get-transcript
by Marcelo Abreu
What this workflow does Runs automatically every Monday morning at 8 AM Collects your Meta Ads data from the last 7 days for a given account (date range is configurable) Formats the data, aggregating it at the campaign, ad set, and ad levels Generates AI-driven analysis and insights on your results, providing actionable recommendations Renders the report as a visually appealing PDF with charts and tables Sends the report via Slack (you can also add email or WhatsApp) A sample for the first page of the report: Setup Guide Create an account of pdforge and use the pre-made Meta Ads template. Connect Meta Ads, OpenAI and Slack to n8n Set your Ad Account Id and date range (choose from 'last_7d', 'last_14d', 'last30d') (opcional) Customize the scheduling date and time Requirements Meta Ads (via Facebook Graph API): Documentation pdforge access: Integration guide AI API access (e.g. via OpenAI, Anthropic, Google or Ollama) Slack acces (via OAuth2): Documentation Feel free to contact me via Linkedin, if you have any questions! 👋🏻
by Jimleuk
This n8n workflow demonstrates how to automate image captioning tasks using Gemini 1.5 Pro - a multimodal LLM which can accept and analyse images. This is a really simple example of how easy it is to build and leverage powerful AI models in your repetitive tasks. How it works For this demo, we'll import a public image from a popular stock photography website, Pexel.com, into our workflow using the HTTP request node. With multimodal LLMs, there is little do preprocess other than ensuring the image dimensions fit within the LLMs accepted limits. Though not essential, we'll resize the image using the Edit image node to achieve fast processing. The image is used as an input to the basic LLM node by defining a "user message" entry with the binary (data) type. The LLM node has the Gemini 1.5 Pro language model attached and we'll prompt it to generate a caption title and text appropriate for the image it sees. Once generated, the generated caption text is positioning over the original image to complete the task. We can calculate the positioning relative to the amount of characters produced using the code node. An example of the combined image and caption can be found here: https://res.cloudinary.com/daglih2g8/image/upload/f_auto,q_auto/v1/n8n-workflows/l5xbb4ze4wyxwwefqmnc Requirements Google Gemini API Key. Access to Google Drive. Customising the workflow Not using Google Gemini? n8n's basic LLM node supports the standard syntax for image content for models that support it - try using GPT4o, Claude or LLava (via Ollama). Google Drive is only used for demonstration purposes. Feel free to swap this out for other triggers such as webhooks to fit your use case.
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.
by Aditya Gaur
Who is this template for? This template can be used by any automator who wants to create a workitem(incident/user story/bugs) in azure devops whenever an alert raised by systems. How it works Each time an alert raised in system( for ex: Elastic raises an alert for missing host or domain). Workflow reads an alert and creates a workitem in azure devops Workflow can be customized to send any required information as possible in azure devops Setup Instructions Azure DevOps Organization and Project:** Make sure you have access to an Azure DevOps organization and a project where the work item will be created. Personal Access Token (PAT):** You need a Personal Access Token with permissions to create work items. You can generate a PAT from the Azure DevOps user settings.
by simonscrapes
Use Case Transform and optimize images for web use: You need to host local images online You want to reduce image file sizes automatically You need image URLs for web content You want to generate and optimize AI-created images What this Workflow Does The workflow processes images through two services: Uploads images to ImgBB for hosting and URL generation (free but need API key) Optimizes images using ReSmush.it to reduce file size (free) Optional: Creates images using OpenAI's image generation Returns optimized image URLs ready for use Setup Create an ImgBB account and get your API key Add your ImgBB API key to the HTTP Request node (key parameter) Optional: Configure OpenAI credentials for image generation Connect your image input source How to Adjust it to Your Needs Skip OpenAI nodes if using your own image files Adjust image optimization parameters Customize image hosting settings Modify output format for your needs More templates and n8n workflows >>> @simonscrapes
by Yulia
This workflow shows how to use a self-hosted Large Language Model (LLM) with n8n's LangChain integration to extract personal information from user input. This is particularly useful for enterprise environments where data privacy is crucial, as it allows sensitive information to be processed locally. 📖 For a detailed explanation and more insights on using open-source LLMs with n8n, take a look at our comprehensive guide on open-source LLMs. 🔑 Key Features Local LLM Connect Ollama to run Mistral NeMo LLM locally Provide a foundation for compliant data processing, keeping sensitive information on-premises Data extraction Convert unstructured text to a consistent JSON format Adjust the JSON schema to meet your specific data extraction needs. Error handling Implement auto-fixing for LLM outputs Include error output for further processing ⚙️ Setup and сonfiguration Prerequisites n8n AI Starter Kit installed Configuration steps Add the Basic LLM Chain node with system prompts. Set up the Ollama Chat Model with optimized parameters. Define the JSON schema in the Structured Output Parser node. 🔍 Further resources Run LLMs locally with n8n Video tutorial on using local AI with n8n Apply the power of self-hosted LLMs in your n8n workflows while maintaining control over your data processing pipeline!
by Dustin
Are you a cord-cutter? Do you find yourself looking through the many titles of videos uploaded to Youtube, just to find the ones you want to watch? Even when you subscribe to the channels you like, do you find that you want to watch the news now and my tech/n8n videos later? Well, now you can have n8n grab the last 8 videos, posted in the last 24 hours, and put them in a playlist for the day; and, each day the old playlist is deleted. Are you tired of a channel filling your subscriptions with tons of videos a day; this workflow can be used for any channel, whether you are subscribed to the channel or not. It's a YouTube playlist automation. How it works: Create your list of prefered Youtube Channels in a Google Sheet and it will create you a daily playlist; and, it will delete the playlist created yesterday. Instructions To set this up, you need to create a Google Sheet with the following headings in line 1: Channel User Name Channel Name Channel Link Channel ID Copy the 'Create your Channel List' into it's own workflow and link the Sheets links to your new sheet. To get the 'Create your Channel List' to work, you need to visit each channel's page that you want included in your playlist; you need to get the "@" name of the channel and add it to the 'Channel User Name' column of your Google Sheet. For example: if you wanted to include this channel: Recruit Training Videos - Corporal Stock, you would search for the name, to add to the next available row of the 'Channel User Name' column: @CorporalStock Once you add all Channel User Names, run the 'Create your Channel list workflow, and it will fill in the remaining details. Now the 'YT Playlist Creator' can be run. Note: The first time the workflow us run, disconnect the 'Delete Yesterday's Playlist' leg, or the workflow will error and stop (because there is no 'Yesterday's Playlist'. Note: this was made to create a playlist every day, delete yesterday's playlist, and only get the last 8 videos posted within the last 24 hours. I choose to put the date (YYMMDD format) in front of the playlist, to ensure that it doesn't conflict with another playlist. Also, I have it notifying me in Telegram, so I know that the new playlist is posted.
by merfy
Use Case Manually extracting images from PDF files for analysis is often slow and inefficient. Many users resort to taking screenshots of each page, uploading them to an AI tool like OpenAI for image analysis, and then manually copying the insights into a document. This manual process is time-consuming and prone to errors. This workflow streamlines the entire process by automatically extracting images from a PDF, analyzing them using the GPT-4o model, and saving the results in seconds—eliminating the need for manual effort. What This Workflow Does Extracts all images from the uploaded PDF file automatically The workflow scans each page of the PDF and identifies embedded images without manual intervention. Uses the GPT-4o model to analyze each extracted image Each image is processed through GPT-4o to generate descriptive insights, summaries, or context-specific analysis depending on the use case. Saves the analysis results to a .txt file, including image URLs The final output is a plain text file containing both the image URLs (e.g., hosted on cloud storage) and the corresponding GPT-4o analysis, ready for further use or sharing. Setup 1.Set up your credentials when you first open the workflow. You’ll need accounts for OpenAI, Convert API, and Google Drive. 2.Convert API does not rate-limit your API, sometimes you may receive 503 service unavailable error. Nevertheless, it doesn’t mean that you cannot convert your file. It simply means that you should retry the conversion in a few seconds. 3.Upload a PDF with images to Google Drive. 4.Remove unnecessary parts and retrieve image-related information. 5.Integrate image and image analysis information together. 6.Analyze each image using the OPENAI GPT-4o model. 7.Retrieve all image analysis content and image URL 8.Integrate multiple image URLs and analysis content 9.Output content to a .txt file. Template was created in n8n v1.83.2 How to Customize Replace the manual trigger with a Google Drive trigger or other automation triggers Change the image analysis model (e.g., switch or fine-tune GPT-4o) Send the results to other platforms (e.g., Slack, Telegram, LINE, etc.) instead of saving to a .txt file
by InfraNodus
Using the knowledge graphs instead of RAG vector stores This workflow creates a Telegram chatbot agent that has access to several knowledge bases at the same time (used as "experts"). These knowledge bases are provided using the InfraNodus GraphRAG using the knowledge graphs and providing high-quality responses without the need to set up complex RAG vector store workflows. The advantages of using GraphRAG instead of the standard vector stores for knowledge are: Easy and quick to set up and update (no complex data import workflows or vector stores needed) A knowledge graph has a holistic view of your knowledge base and knows what it's about Better retrieval of relations between the document chunks = higher quality responses How it works This template uses the n8n AI agent node as an orchestrating agent that decides which tool (knowledge graph) to use based on the user's prompt. Here's a description step by step: The user submits a question using the Telegram bot, which is then received in the n8n workflow via the Telegram trigger node. The AI agent node checks a list of tools it has access to. Each tool has a description of the knowledge it has auto-generated by InfraNodus. The AI agent decides which tool should be used to generate a response. It may reformulate user's query to be more suitable for the expert. The query is then sent to the InfraNodus HTTP node endpoint, which will query the graph that corresponds to that expert. Each InfraNodus GraphRAG expert provides a rich response that takes the whole context into account and provides a response from each expert (graph) along with a list of relevant statements retrieved using a combination or RAG and GraphRAG. The n8n AI Agent node integrates the responses received from the experts to produce the final answer. The final answer is sent back to the Telegram bot who delivers it back to the private chat or a Telegram group. How to use You need an InfraNodus GraphRAG API account and key to use this workflow. Create an InfraNodus account Get the API key at https://infranodus.com/api-access and create a Bearer authorization key for the InfraNodus HTTP nodes. Create a separate knowledge graph for each expert (using PDF / content import options) in InfraNodus For each graph, go to the workflow, paste the name of the graph into the body name field. Keep other settings intact or learn more about them at the InfraNodus access points page. Once you add one or more graphs as experts to your flow, add the LLM key to the OpenAI node Create a Telegram bot (the instructions are in the workflow Post note) — it takes 30 seconds. Get its API key and create the Telegram credentials to use in the Telegram nodes in this workflow. Requirements An InfraNodus account and API key An OpenAI (or any other LLM) API key A Telegram account Customizing this workflow You can use this same workflow with a standard AI chatbot via a URL that can also be embedded to any website. You can also use it with ElevenLabs AI voice agent. There are many more customizations available. Check out the complete guide at https://support.noduslabs.com/hc/en-us/articles/20174217658396-Using-InfraNodus-Knowledge-Graphs-as-Experts-for-AI-Chatbot-Agents-in-n8n Also check out the video tutorial with a demo: Support If you have any questions, contact us via the support portal at https://support.noduslabs.com or via our Discord channel. More n8n workflows are available on our support portal: n8n x InfraNodus AI automation workflows.
by Davide
This workflow automates the process of removing backgrounds from WooCommerce product images using the BackgroundCut API, and then updates the product images in both WooCommerce and a Google Sheet. Once set up, the workflow processes product images in bulk, removing backgrounds and updating WooCommerce seamlessly. This workflow is perfect for online stores that sell: Clothing and fashion items Jewelry and accessories General consumer products Any product that benefits from clean, background-free images for a professional storefront presentation will see improved visual appeal and potentially higher conversions. Benefits ⏱ Time-saving:** Automates what would otherwise be a manual and repetitive task of editing images and updating product listings. 🔄 Fully Integrated:** Connects Google Sheets, BackgroundCut API, FTP server, and WooCommerce in a seamless loop. 📦 Scalable:** Supports batch processing, making it suitable for stores with hundreds of products. 📁 Organized Tracking:** Updates the Google Sheet with the new image and a “DONE” flag for easy monitoring. 🔧 Customizable:** You can change the image processing API, storage server, or eCommerce platform if needed. How It Works Data Retrieval: The workflow starts by fetching product data (ID and IMAGE URL) from a Google Sheets document. Only rows without a "DONE" marker are processed to avoid duplicates. Background Removal: Each product image URL is sent to the BackgroundCut API, which removes the background and returns the edited image. File Handling: The processed image is uploaded to an FTP server with the original filename preserved. A new URL for the edited image is generated and assigned to the product. WooCommerce Update: The product in WooCommerce is updated with the new image URL. Sheet Update: The Google Sheet is marked as "DONE" for the processed row, and the new image URL is recorded. Batch Processing: The workflow loops through all rows in the sheet until all products are processed. Set Up Steps Prepare the Google Sheet: Clone the provided Google Sheet template. Fill in the ID (product ID) and IMAGE (original image URL) columns. API & Credentials Setup: Get an API key from BackgroundCut.co. Configure the HTTP Request node ("Remove from Image URL") with: Header Auth: Authorization = API_KEY. Set up WooCommerce API credentials in the "Update product" node. FTP Configuration: Replace YOUR_FTP_URL in the "New Image Url" node with your FTP/CDN base URL. Ensure FTP credentials are correctly set in the FTP node. Execution: Run the workflow manually via "When clicking ‘Execute workflow’". The process automatically handles background removal, file upload, and WooCommerce updates. Need help customizing? Contact me for consulting and support or add me on Linkedin.