by Tom
This workflow identifies new rows in Google Sheets using a separate column keeping track of already processed rows. For this approach to work, the sheet needs to meet two requirements: A unique identifier for each row is required A column used to differentiate new/processed rows is present Our example sheet looks like this: So the row identifier is named ID, the new/processed column is called Processed. Update the workflow accordingly if your columns have different names. Now if the workflow runs, it discovers all three rows as new. After processing them, it will add a timestamp to the Processed column: The next time the workflow is executed it will skip the existing rows and only process newly added data:
by Firecrawl
Turn any prompt into structured web data. Send a POST request with a natural language prompt and an optional JSON schema, and get back clean, structured results scraped from the web by an AI agent powered by Firecrawl. Use Cases Data Enrichment**: Feed company names or URLs from your CRM and get back structured firmographic data (industry, funding, team size, tech stack). Lead Generation**: Ask the agent to find pricing, contact pages, or product details for a list of competitors. Market Research**: Extract structured pricing plans, feature comparisons, or product catalogs from any website. Content Aggregation**: Pull structured news, events, or job postings from across the web on a schedule. Sales Intelligence**: Enrich prospect lists with company info, recent news, or tech stack details before outreach. How It Works POST /webhook/scrape-agent Receive Scrape Request receives a POST request with prompt and an optional output_schema. Validate Output Schema checks the schema. If none is provided, it falls back to a permissive default. If the schema is malformed, it returns a clear error via Return Schema Error. Research & Extract Web Data takes the prompt and uses the full Firecrawl toolkit to research the web: Search (/search): Finds relevant pages and sources across the web. Scrape (/scrape): Extracts clean, structured content from any URL. Interact (interactContext, interact, interactStop): Lets the agent interact with scraped pages in a live session. After scraping a page, the agent can click buttons, fill forms, navigate dynamic content, and extract data that static scraping cannot reach, all without managing sessions manually. This combination gives the AI agent complete web navigation capabilities. It can discover sources, read pages, and interact with dynamic content autonomously. Format Response to Schema (Structured Output Parser) formats the agent's response to match the provided (or default) schema. Return Structured Results sends the structured JSON back to the caller. Setup Requirements Firecrawl API Key**: Sign up at firecrawl.dev and grab your API key. Connect it in the Firecrawl credential nodes. LLM Provider**: Configure your Primary Chat Model and Fallback Chat Model nodes (e.g., OpenRouter, OpenAI, Anthropic). The template uses two model nodes for reliability, plus a separate Parser Chat Model for the output parser. n8n Instance**: Self-hosted or cloud. Make sure the webhook node is set to accept POST requests. API Reference Endpoint POST https://your-n8n-instance/webhook/scrape-agent Request Body | Field | Type | Required | Description | |-------|------|----------|-------------| | prompt | string | Yes | Natural language instruction for the agent | | output_schema | object | No | JSON Schema defining the desired output structure | Response Returns a JSON object matching the provided schema, or a flexible object if no schema was given. Testing Examples 1. Basic Request (No Schema) The agent decides the output structure on its own. curl -X POST "https://your-n8n-instance/webhook/scrape-agent" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Find the latest pricing for Firecrawl" }' | jq Expected output: A JSON object with whatever structure the agent finds most appropriate for the data. Since no schema was provided, the internal default ({ "type": "object", "additionalProperties": true }) is used. 2. Request With a Custom Schema You define exactly the shape of data you want back. curl -X POST "https://your-n8n-instance/webhook/scrape-agent" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Find the latest pricing for Firecrawl", "output_schema": { "type": "object", "properties": { "source": { "type": "string" }, "plans": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "price": { "type": "string" }, "credits": { "type": "string" }, "highlights": { "type": "array", "items": { "type": "string" } } } } } } } }' | jq Expected output: { "output": { "source": "https://www.firecrawl.dev/pricing", "plans": [ { "name": "Free", "price": "$0 (one-time)", "credits": "500 credits (one-time)", "highlights": [ "Scrape up to 500 pages", "2 concurrent requests", "Low rate limits", "No credit card required" ] }, { "name": "Hobby", "price": "$16/month (billed yearly, save $38)", "credits": "3,000 credits / month", "highlights": [ "Scrape up to 3,000 pages", "5 concurrent requests", "Basic support", "$9 per extra 1k credits" ] } ] } } 3. Invalid Schema (String Instead of Object) curl -X POST "https://your-n8n-instance/webhook/scrape-agent" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Find the latest pricing for Firecrawl", "output_schema": "not a valid schema" }' | jq Expected output: { "error": true, "message": "Invalid output_schema: must be a JSON object with a valid 'type' property (object, array, string, number, boolean)", "example_schema": { "type": "object", "properties": { "name": { "type": "string" }, "price": { "type": "number" } } } } 4. Invalid Schema (Array Instead of Object) curl -X POST "https://your-n8n-instance/webhook/scrape-agent" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Find the latest pricing for Firecrawl", "output_schema": [1, 2, 3] }' | jq Expected output: Same error response as above. 5. Invalid Schema (Missing type Property) curl -X POST "https://your-n8n-instance/webhook/scrape-agent" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Find the latest pricing for Firecrawl", "output_schema": { "properties": { "name": { "type": "string" } } } }' | jq Expected output: Same error response as above. 6. Invalid Schema (Invalid type Value) curl -X POST "https://your-n8n-instance/webhook/scrape-agent" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Find the latest pricing for Firecrawl", "output_schema": { "type": "banana" } }' | jq Expected output: Same error response as above. Workflow Architecture Receive Scrape Request (POST) | v Validate Output Schema |--- Error --> Return Schema Error (error JSON) |--- Success --> Research & Extract Web Data (AI Agent) | |--- Primary Chat Model |--- Fallback Chat Model |--- Search & Scrape: | - /search with Firecrawl | - /scrape with Firecrawl |--- Interact Tool: | - Interact context with Firecrawl | - Execute interaction with Firecrawl | - Stop interaction with Firecrawl | v Return Structured Results | |--- Format Response to Schema (Output Parser) | |--- Parser Chat Model Schema Validation Logic The Validate Output Schema node runs this validation before passing data to the agent: If output_schema is missing or null, the default permissive schema is used: { "type": "object", "additionalProperties": true }. If output_schema is present, it must be a JSON object (not a string, array, or primitive). It must have a type property with a valid value: object, array, string, number, or boolean. If validation fails, the workflow returns an error response with a helpful message and example schema. Notes The Format Response to Schema node (Structured Output Parser) requires the schema to be passed as a JSON string. The expression {{ JSON.stringify($('Validate Output Schema').item.json.output_schema) }} handles this conversion. The agent has access to Firecrawl's full toolkit: search, scrape, and interact. With all three connected, the agent has complete web navigation powers. It can discover sources via search, extract content via scrape, and interact with dynamic JavaScript-heavy pages via interact. The interact tools let the agent scrape a page first and then continue working with it in a live session, clicking buttons, filling forms, and navigating deeper, all without manual session management. The agent autonomously decides which tools to use based on the prompt. Response times vary depending on the complexity of the prompt and how many pages the agent needs to visit. Simple lookups take a few seconds; deep research can take longer.
by Jimleuk
Mistral OCR is a super convenient way to parse and extract data from multi-page PDFs or single images using AI. What makes it special and differs it from the competition is that Mistral OCR also performs document page splitting and markdown conversion. This helps reduce dependencies required for document parsing workflows where tools like StirlingPDF. Read the official documentation on Mistral OCR API here: https://docs.mistral.ai/capabilities/document/#tag/ocr/operation/ocr_v1_ocr_post How it works To access Mistral-OCR, you'll need to use Mistral Cloud API via the HTTP request node Mistral OCR can only accept 2 file types: PDF and Image. Here, we use 2 different request to the Mistral-OCR API to parse a bank statement PDF and an screenshot of a bank statement to extract the tables. Next, we explore a more secure method of uploading documents to the Mistral OCR API by using Mistral's cloud storage. In example 2, we first store a copy of our documents to Mistral cloud and then generate a signed URL to retreive the file before sending it to Mistral OCR. This ensures the file is not accessible publicly and protects it from unauthorised access. Finally, another way to use Mistral-OCR is via document understanding. This allows you to ask questions about the document rather than extract contents from it. In example 3, I demonstrate this use-case asking Mistral-small to tell me how many deposits are shown in the bank statement. How to use Ensure your documents are either publicly accessible for Mistral-OCR or upload them to Mistral Cloud. Alternatively, signed urls from AWS S3 or Cloudflare R2 should also work. Requirements Mistral Cloud account and API Key. You'll also need credit on your account to use Mistral-OCR. Customising the workflow Mistral-OCR also works for images such as charts and diagrams so try using it on Financial Reports. Mistral-OCR is even cheaper with batching enabled. This returns your results within 24hrs but is half the price per page.
by Joseph LePage
Transform your local N8N instance into a powerful chat interface using any local & private Ollama model, with zero cloud dependencies βοΈ. This workflow creates a structured chat experience that processes messages locally through a language model chain and returns formatted responses π¬. How it works π π Chat messages trigger the workflow π§ Messages are processed through Llama 3.2 via Ollama (or any other Ollama compatible model) π Responses are formatted as structured JSON β‘ Error handling ensures robust operation Set up steps π οΈ π₯ Install N8N and Ollama βοΈ Download Ollama 3.2 model (or other model) π Configure Ollama API credentials β¨ Import and activate workflow This template provides a foundation for building AI-powered chat applications while maintaining full control over your data and infrastructure π.
by simonscrapes
Use Case Generate accurate search volume data for SEO keyword research: You have a list of potential keywords to target for your website SEO but don't know their actual search volume You need historical data to identify seasonal trends in keyword popularity You want to assess keyword difficulty to prioritize your content strategy You need data-driven insights for planning your SEO campaigns What this Workflow Does The workflow connects to Google's Keyword Planner API to retrieve keyword metrics for your SEO research: Fetches monthly search volume for each keyword Provides historical trends data for the past 12 months Calculates keyword difficulty scores Delivers competition metrics from Google Ads Setup Fill the Set 20 Keywords with up to 20 Keywords of your choosing in an array e.g. ["keyword 1", "keyword 2",...] Create a Google Ads API account and add credentials to Get Search Data node Replace the Connect to your own database with your own database for the output How to Adjust it to Your Needs Change the Set 20 Keywords node input to a source of your choosing e.g. Airtable database with 20 keywords Connect to output source of your choosing More templates and n8n workflows >>> @simonscrapes
by Mihai Farcas
How it works: The workflow starts by sending a request to a website to retrieve its HTML content. It then parses the HTML extracting the relevant information The extracted data is storted and converted into a CSV file. The CSV file is attached to an email and sent to your specified address. The data is simultaneously saved to both Google Sheets and Microsoft Excel for further analysis or use. Set-up steps: Change the website to scrape in the "Fetch website content" node Configure Microsoft Azure credentials with Microsoft Graph permissions (required for the Save to Microsoft Excel 365 node) Configure Google Cloud credentials with access to Google Drive, Google Sheets and Gmail APIs (the latter is required for the Send CSV via e-mail node).
by n8n Team
This template quickly shows how to use RAG in n8n. Who is this for? This template is for everyone who wants to start giving knowledge to their Agents through RAG. Requirements Have a PDF with custom knowledge that you want to provide to your agent. Setup No setup required. Just hit Execute Workflow, upload your knowledge document and then start chatting. How to customize this to your needs Add custom instructions to your Agent by changing the prompts in it. Add a different way to load in knowledge to your vector store, e.g. by looking at some Google Drive files or loading knowledge from a table. Exchange the Simple Vector Store nodes with your own vector store tools ready for production. Add a more sophisticated way to rank files found in the vector store. For more information read our docs on RAG in n8n.
by Joseph LePage
π This n8n workflow integrates Tavily's search and extract APIs with AI summarization capabilities to process web content efficiently. Quick Setup Get your Tavily API key from https://app.tavily.com/home Replace tvly-YOUR_API_KEY in the "Tavily API Key" node Connect your OpenAI credentials to the "OpenAI Chat Model" node Deploy the workflow and start the chat trigger Core Features Search & Extract π― Intelligent web searching with relevance filtering Automated content extraction from top results AI-powered content summarization in markdown format User Interaction π¬ Chat-based search topic input Real-time processing pipeline Structured markdown output The workflow demonstrates practical implementation of Tavily's API endpoints while handling the complete process from search to summarization in a single automated pipeline.
by InfraNodus
Set Up ElevenLabs Voice Chat Agent using Graph RAG Knowledge Graphs as Experts This workflow creates an AI voice 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. We use ElevenLabs to set up a voice agent that can be embedded to any website or used via their API. The advantages of using GraphRAG instead of the standard vector stores for knowledge are: Easy and quick to set up (no complex data import workflows needed) and to update with new knowledge A knowledge graph has a holistic overview of your knowledge base Better retrieval of relations between the document chunks = higher quality responses Ability to reuse in other n8n workflows 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. The user's prompt is received from the ElevenLabs Conversational AI agent via an n8n Webhook, which also takes care of the voice interaction. The response from n8n is then sent to the Webhook, which is polled by the ElevenLabs voice agent. This agent processes the response and provides the final answer. Here's a description step by step: The user submits a question using ElevenLabs voice interface The question is sent via the knowledge_base tool in ElevenLabs to the n8n Webhook with the POST request containing the user's prompt and sessionID for Chat Memory node in n8n. The n8n AI agent node checks a list of tools it has access to. Each tool has a description of the knowledge auto-generated by InfraNodus (we call each tool an "expert"). The n8n 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 Webhook endpoint ElevenLabs conversational AI agent picks up the response arriving from the knowledge_base tool via the webhook and then condenses it for conversational format and transforms text into voice. 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 and launch the workflow You will also need to set up an ElevenLabs account and to set up a conversational AI agent there. See the Post note in the n8n workflow for a complete step-by-step description or our support article on setting up ElevenLabs AI voice agent Once the voice AI agent is ready, you might want to combine it with a text AI chatbot workflow so your users have a choice between the text and voice interaction. In that case, you may be interested to use our free open-source website popup chat widget popupchat.dev where you can create an embed code to add to your blog or website and allow the user to choose between the text and voice interaction. Requirements An InfraNodus account and API key An OpenAI (or any other LLM) API key An ElevenLabs account FAQ 1. How many "experts" should I aim for? We recommend to aim for the number of experts as the optimal number of people in a team, which is usually 2-7. If you add more experts, your AI orchestrating agent will have troubles choosing the most suitable "expert" tool for the user's query. You can mitigate this by specifying in the AI agent description that it can choose maximum 3-7 experts to provide a response. 2. Why use InfraNodus GraphRAG and not standard vector store for knowledge? First, vector stores are complex to set up and to update. You'd need a separate workflow for that, decide on the vector dimensions, add metadata to your knowledge, etc. With InfraNodus, you have a complete RAG / GraphRAG solution under the hood that is easy to set up and provides high-quality responses that takes the overall structure and the relations between your ideas into account. 3 Why not use ElevenLabs' own knowledge? One of the reasons is that you want your knowledge base to be in one place so you can reuse it in other n8n workflows. Another reason is that you will not have such a good separation between the "experts" when you converse with the agent. So the answers you get will be based on top matches from all the books / articles you upload, while with the InfraNodus GraphRAG setup you can better control which graphs are consulted as experts and have an explicit way to display this data. Customizing this workflow You can use this same workflow with a Telegram bot, so you can interact with it using Telegram. There are many more customizations available on our GitHub repo for n8n workflows. Check out the complete setup guide for this workflow at https://support.noduslabs.com/hc/en-us/articles/20318967066396-How-to-Build-a-Text-Voice-AI-Agent-Chatbot-with-n8n-Elevenlabs-and-InfraNodus Also check out the video tutorial with a demo:
by darrell_tw
How it works Fetch all workflows from your n8n instance. Filter workflows that contain nodes with a modelId setting. Extract the node names, model IDs, model names, workflow names, and workflow URLs. Save the extracted information into a connected Google Sheet. Set up steps Connect your n8n API credentials. Connect your Google Sheets account. Replace "Your n8n domain" with your actual domain URL. Use this Google Sheet template to create a new sheet for results. Setup typically takes 5 minutes. Be cautious: if you have over 100 workflows, performance may be impacted. Notes Sticky notes inside the workflow provide extra guidance. This workflow clears old sheet data before writing new results. Make sure your n8n instance allows API access. Result Example Update: It didn't detect the AI model in tool originally. Now it's fixed! Update 20250429: Support 1.91.0 with open node directly! Optimize the url with node id.
by Automate With Marc
π§ Google Drive Upload Trigger β Pinecone Vector Upsert for Document Indexing Category: AI & LLM / Document Indexing Level: Intermediate Tags: Google Drive, Pinecone, OpenAI, Embeddings, Vector Store, LangChain, RAG π What This Workflow Does This workflow watches a specific Google Drive folder and automatically uploads any newly added document to a Pinecone vector database β complete with OpenAI-generated embeddings. Perfect for setting up retrieval-augmented generation (RAG) pipelines, semantic search, or document Q&A systems. Once configured, your knowledge base stays up-to-date with zero manual effort. Watch Full Step By Stey Tutorial Video Here: https://www.youtube.com/@Automatewithmarc π§ How It Works π Google Drive Trigger Watches a specific folder and triggers when new documents are uploaded. π Google Drive File Search & Download Finds and fetches all files in the folder. π Loop Over Each File Handles batch processing for multiple files. π Document Loader Parses each file as binary and applies custom metadata like document type. βοΈ Text Splitter Breaks content into manageable chunks for embedding (e.g., 600 characters, 60 overlap). π§ OpenAI Embeddings Generates vector embeddings using OpenAI. π¦ Pinecone Vector Store Inserts/upserts documents into a specific Pinecone namespace for search-ready indexing. π§ Why This is Useful This is a production-grade setup for: Building vector search tools over internal docs Feeding up-to-date data into RAG agents or chatbots Auto-tagging and chunking files for scalable AI workflows Whether youβre indexing course outlines, SOPs, or technical docs β this automation keeps your vector store fresh and organized. πͺ Setup Instructions Connect your Google Drive, OpenAI, and Pinecone accounts. Specify the Google Drive folder to monitor. Customize metadata, chunk size, or vector namespace as needed. Activate the workflow and drop a file into the folder β magic happens behind the scenes. π Notes Works best with PDFs or text-based documents. You can swap out OpenAI with other embedding models if needed. Consider adding notifications or logging (e.g., via Slack or email) for better observability.
by Mutasem
Use Case This workflow aims to enrich new contacts in Intercom. The more relevant the Intercom profile, the more useful it is. Once active, this n8n workflow will update contact data (phone, email) as well as location data from ExactBuyer. Setup Add a webhook url in Intercom to call this workflow Add your Exact Buyer API key Add your Intercom API key Activate workflow How to adjust this template There's plenty of interesting info that ExactBuyer returns that could be helpful. Take a look and update this workflow to add what you need.