by Jesse Davids
Workflow Documentation Description: This workflow is designed to optimize prompts by enhancing user inputs for clarity and specificity using AI. The workflow takes a user-provided prompt as input and uses a Natural Language Processing (NLP) model to refine and improve the prompt. The optimized prompt is then sent back to the user, ready for use in further workflows or processes. Setup: This workflow is suitable for users who want to improve their prompts for better communication and understanding in their workflows. The workflow utilizes an AI Agent powered by an OpenAI Chat Model to enhance user prompts. Expected Outcomes: Users can provide vague or imprecise prompts as input to the workflow. The AI Agent will refine and optimize the prompt, adding clarity and specific details. The optimized prompt will be delivered back to the user via Telegram or can be input for the next nodes. Extra Information: A. A Telegram node is used to deliver the optimized prompt back to the user. B. Ensure you have the necessary credentials set up for Telegram and OpenAI accounts. C. Customize the workflow's settings, such as the AI model used for prompt optimization, to suit your requirements. D. Activate the workflow once all configurations are set to start optimizing prompts efficiently.
by n8n Team
This workflow automatically adds closed deals from Pipedrive as new customers into Stripe. Prerequisites Pipedrive account and Pipedrive credentials Stripe account and Stripe credentials How it works Pipedrive trigger node starts the workflow when a deal gets updated in Pipedrive. IF node checks that the current won time is not equal to the previuos one in the deal and continues the workflow if it's true. Pipedrive node extracts the organization's details to pass it further. HTTP Request node searches for the same organization's details within Stripe. If a customer doesn't exist within Stripe, Merge node passes a new customer details to Stripe. Stripe node creates a new customer.
by Thomas Janssen
Build an AI Agent which accesses two MCP Servers: a RAG MCP Server and a Search Engine API MCP Server. This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Tutorial Click here to watch the full tutorial on YouTube! How it works We build an AI Agent which has access to two MCP servers: An MCP Server with a RAG database (click here for the RAG MCP Server An MCP Server which can access a Search Engine, so the AI Agent also has access to data about more current events Installation In order to use the MCP Client, you also have to use MCP Server Template. Open the MCP Client "MCP Client: RAG" node and update the SSE Endpoint to the MCP Server workflow Install the "n8n-nodes-mcp" community node via settings > community nodes ONLY FOR SELF-HOSTING: In Docker, click on your n8n container. Navigate to "Exec" and execute the below command to allow community nodes: N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true Navigate to Bright Data and create a new "Web Unlocker API" with the name "mcp_unlocker". Open the "MCP Client" and add the following credentials: How to use it Run the Chat node and start asking questions More detailed instructions Missed a step? Find more detailed instructions here: Personal Newsfeed With Bright Data and n8n What is Retrievel Augmented Generation (RAG)? Large Language Models (LLM's) are trained on data until a specific cutoff date. Imagine a model is trained in December 2023 based data until September 2023. This means the model doesn't have any knowledge about events which happened in 2024. So if you ask the LLM who was the Formula 1 World Champion of 2024, it doesn't know the answer. The solution? Retrieval Augmented Generation. When using Retrieval Augmented Generation, a user's question is being sent to a semantic database. The LLM will use the information retrieved from the semantic database to answer the user's question. What is Model Context Protocol (MCP)? MCP is a communication protocol which is used by AI agents to call tools hosted on external servers. When an MCP client communicates with an MCP server, the server will provide an overview of all its tools, prompts and resources. The MCP server can then choose which tools to execute (based on the user's request) and execute the tools. An MCP client can communicate with multiple MCP servers, which can all host multiple tools.
by Yang
Who is this for? This workflow is perfect for marketers, SEO specialists, product teams, and competitive analysts who want to monitor and summarize public reviews of their competitors. It’s especially helpful for small teams who want fast insights from Google reviews without spending hours manually reading and sorting them. What problem is this workflow solving? Manually going through competitor reviews is time-consuming and repetitive. You risk missing patterns or insights, and it’s hard to share summaries with your team quickly. This workflow automatically scrapes reviews from Google and generates a structured summary of pain points and positive feedback. That way, you can focus on strategy instead of sorting through dozens of reviews. What this workflow does This automation watches for new competitor entries in a Google Sheet, then: Uses Dumpling AI to scrape the latest Google reviews (up to 20) for each business. Splits and cleans the reviews for analysis. Sends them to GPT-4o, which summarizes the most common complaints and praises. Saves the structured result back to the same Google Sheet. You’ll instantly get an overview of what people are saying about any competitor. Setup Google Sheet Setup Create a Google Sheet with at least one column: Business Add names or search queries for the competitors you want to analyze Optional: Add columns for Summary of Reviews and Pain Points Connect Dumpling AI Sign up at Dumpling AI Create an agent using the get-google-reviews endpoint Copy your agent key Use it in the HTTP Request node in this workflow OpenAI Setup Use your API key with GPT-4o access The prompt is already structured to generate grouped summaries from reviews Run the Workflow Trigger it manually or schedule it Make sure your Google Sheets, OpenAI, and Dumpling AI connections are active How to customize this workflow to your needs You can expand the number of reviews retrieved by changing the Dumpling AI agent config Replace Google Sheets with Airtable if you want more robust data views Add more fields like star ratings or review dates in your agent for richer analysis Change the GPT prompt to highlight emotional tone, urgency, or feature mentions 🧠 Node Details Google Sheets Trigger**: Watches for new competitor names HTTP Request (Dumpling AI)**: Scrapes 20 recent reviews from Google SplitOut Node**: Breaks review array into individual items Code Node**: Extracts and combines review text Edit Fields Node**: Structures the review content before GPT GPT-4o Node**: Analyzes and summarizes top pain points and praise Google Sheets Output**: Saves the summary back to the same sheet Dependencies Dumpling AI account and review scraping agent setup OpenAI API key with GPT-4o access Google Sheets OAuth2 credentials
by n8n Team
This workflow syncs Outlook Calendar events to a Notion database. The Outlook Calendar event must be within a specific time frame (default of within next year) for the workflow to pick up the event. The event subject will be the title of the Notion page, and the event link will be added to the Notion page as a property. Prerequisites Notion account and Notion credentials. Microsoft account and Microsoft credentials. How it works On scheduled intervals, find all Outlook Calendar events within a specific time frame. For each event, check if the event already exists in the Notion database. If it does not exist, create a new page in the Notion database, otherwise update the existing page. Setup This workflow requires that you set up a Notion database or use an existing one with at least the following fields: Title (title) Date (date) Event ID (text) Link (URL)
by Jihene
AI-Agent Code Review for GitHub Pull Requests Description: This n8n workflow automates the process of reviewing code changes in GitHub pull requests using an OpenAI-powered agent. It connects your GitHub repo, extracts modified files, analyzes diffs, and uses an AI agent to generate a code review based on your internal code best practices (fed from a Google Sheet). It ends by posting the review as a comment on the PR and tagging it with a visual label like ✅ Reviewed by AI. 🔧 What It Does Triggered on PR creation Extracts code diffs from the PR Formats and feeds them into an OpenAI prompt Enriches the prompt using a Google Sheet of Swift best practices Posts an AI-generated review as a comment on the PR Applies a PR label to visually mark reviewed PRs ✅ Prerequisites Before deploying this workflow, ensure you have the following: n8n Instance (Self-hosted or Cloud) GitHub Repository with PR activity OpenAI API Key** for GPT-4o, GPT-4-turbo, or GPT-3.5 GitHub OAuth App** (or PAT) connected to n8n to post comments and access PR diffs (Optional) Google Sheets API credentials if using the code best practices lookup node. ⚙️ Setup Instructions 1. Import the Workflow in n8n, click on Workflows → Import from file or JSON Paste or upload the JSON code of this template 2. Configure Triggers and Connections 🔁 GitHub Trigger Node**: PR Trigger Repository**: Select the GitHub repo(s) to monitor Events**: Set to pull_request Auth**: Use GitHub OAuth2 credentials 📥 HTTP Request Node: Get file's Diffs from PR No authentication needed; it uses dynamic path from trigger 🧠 OpenAI Model Node**: OpenAI Chat Model Model**: Select gpt-4o, gpt-4-turbo, or gpt-3.5-turbo Credential**: Provide your OpenAI API Key 🧑💻 Code Review Agent Node : Code Review Agent Connected to OpenAI and optionally to tools like Google Sheets 💬 GitHub Comment Poster Uses GitHub API to post review comments back on PR Node: GitHub Robot Credential: Use the agent Github account (OAuth or PAT) Repo : Pick your owen Github Repository 🏷️ PR Labeler (optional) Adds label ReviewedByAI after successful comment Node: Add Label to PR Label : you ca customize the label text of your owen tag. 📊 Google Sheet Best Practices config (optional) Connects to a Google Sheet for coding guideline lookups, we can replace Google sheet by another tool or data base First prepare your best practices list with the clear description and the code bad/good examples Add al the best practices in your Google Sheet Configure* the Code *Best Practices node** in the template : Credential : Use your Google Sheet account by OAuth2 URL : Add your Google Sheet document URL Sheet : Add the name of the best practices sheet
by Mariano Kostelec
A fully automated content engine that researches, writes, scores, and visualizes LinkedIn posts — built with n8n, OpenAI, Perplexity, and Replicate. What it does: ✅ Researches any topic using real-time data ✅ Writes a personalized post in your voice ✅ Refines tone and structure ✅ Generates abstract, high-quality visual assets ✅ Scores the output and saves it to Google Sheets How it works: Triggered when you change a row status in Google Sheets Uses Perplexity to research GPT-4o (OpenAI) to create and polish content Replicate (FLUX Pro) to generate images Scores the post using heuristics Appends everything back to your sheet
by AlQaisi
Template for Kids' Story in Arabic The n8n template for creating kids' stories in Arabic offers a versatile platform for storytellers to captivate young audiences with educational and interactive tales. It allows for customization to suit various use cases and can be set up effortlessly. Check this example: https://t.me/st0ries95 Use Cases Educational Platforms: Educational platforms can automate the creation and distribution of educational stories in Arabic for children using this template. By incorporating visual and auditory elements into the storytelling process, educational platforms can enhance learning experiences and engage young learners effectively. Children's Libraries: Children's libraries can utilize this template to curate and share a diverse collection of Arabic stories with young readers. The automated generation of visual content and audio files enhances the storytelling experience, encouraging children to immerse themselves in new worlds and characters through captivating narratives. Language Learning Apps: Language learning apps focused on Arabic can integrate this template to offer culturally rich storytelling experiences for children learning the language. By translating stories into Arabic and supplementing them with visual and auditory components, these apps can facilitate language acquisition in an enjoyable and interactive manner. Configuration Guide for Nodes OpenAI Chat Model Nodes: Functionality**: Allows interaction with the OpenAI GPT-4 Turbo model. Purpose**: Enables communication with advanced chat capabilities. Create a Prompt for DALL-E Node: Customization**: Tailor prompts for generating relevant visual content. Summarization**: Define prompts for visual content generation without text. Generate an Image for the Story Node: Resource Type**: Specifies image as the resource. Prompt Setup**: Configures prompt for textless image creation within the visual content. Generate Audio for the Story Node: Resource Type**: Chooses audio as the resource. Input Definition**: Sets input text for audio file generation. Translate the Story to Arabic Node: Chunking Mode Selection**: Allows advanced chunking mode choice. Summarization Configuration**: Sets method and prompts for story translation into Arabic. Send the Story To Channel Node: Channel ID**: Specifies the channel ID for sending the story text. Text Configuration**: Sets up the text to be sent to the channel. By following these node descriptions, users can effectively configure the n8n template for kids' stories in Arabic, tailoring it to specific use cases for a seamless and engaging storytelling experience for young audiences.
by Keith Rumjahn
WordPress Post Auto-Categorization Workflow 💡 Click here to read detailed case study 📺 Click here to watch youtube tutorial 🎯 Purpose Automatically categorize WordPress blog posts using AI, saving hours of manual work. This workflow analyzes your post titles and assigns them to predefined categories using artificial intelligence. 🔄 What This Workflow Does • Connects to your WordPress site • Retrieves all uncategorized posts • Uses AI to analyze post titles • Automatically assigns appropriate category IDs • Updates posts with new categories • Processes dozens of posts in minutes ⚙️ Setup Requirements WordPress site with admin access Predefined categories in WordPress OpenAI API credentials (or your preferred AI provider) n8n with WordPress credentials 🛠️ Configuration Steps Add your WordPress categories (manually in WordPress) Note down category IDs Update the AI prompt with your category IDs Configure WordPress credentials in n8n Set up AI API connection 🔧 Customization Options • Modify AI prompts for different categorization criteria • Adjust for multiple category assignments • Add tag generation functionality • Customize for different content types • Add additional metadata updates ⚠️ Important Notes • Backup your WordPress database before running • Test with a few posts first • Review AI categorization results initially • Categories must be created manually first 🎁 Bonus Features • Can be modified for tag generation • Works with scheduled posts • Handles bulk processing • Maintains categorization consistency Perfect for content managers, bloggers, and website administrators looking to organize their WordPress content efficiently. #n8n #WordPress #ContentManagement #Automation #AI Created by rumjahn
by Greg Evseev
This n8n workflow template allows you to upload a photo to a SharePoint folder using the Microsoft Graph API. The workflow includes steps for authentication, retrieving a photo for testing purposes, setting the destination folder and file name, and uploading the photo. Who is this for? This workflow is ideal for users who need to automate the process of uploading images to SharePoint. It is particularly useful for developers, IT administrators, and anyone managing digital assets within a SharePoint environment. What problem is this workflow solving? / Use Case This workflow addresses the need to automate the uploading of photos to a specific SharePoint folder. By using the Microsoft Graph API, it ensures secure and efficient file management, reducing manual effort and potential errors. What this workflow does Trigger the Workflow: The workflow starts when the user clicks the 'Test workflow' button. Set Configuration: Sensitive data such as TENANT_ID, CLIENT_ID, and CLIENT_SECRET are set. Authentication: Obtains an access token from Microsoft Graph API using the provided credentials. Get Photo: Retrieves a sample photo from a URL for testing purposes. Set Destination: Sets the target folder and file name for the photo upload. Upload Photo: Uploads the photo to the specified SharePoint folder using the Microsoft Graph API. Setup Prerequisites Create an Application User: Follow this guide to create an application user. Set Permissions: Ensure the following permissions are set: Sites.ReadWrite.All: For SharePoint site access. Files.ReadWrite.All: For file upload operations. Authentication For successful authentication, provide the following: TENANT_ID CLIENT_ID CLIENT_SECRET Note: For demonstration purposes, these values are stored in a 'Set' node. In a production environment, ensure the safety of such data using credentials, secure vaults, or other safe methods. Set Destination The destination is defined by two parameters: TARGET_FOLDER: The folder path in SharePoint where the photo will be uploaded. FILE_NAME: The name of the file to be uploaded. Example: Desired file location: https://contoso.sharepoint.com/uploads/pictures from n8n/example.jpg Set the following: TARGET_FOLDER = /uploads/pictures from n8n FILE_NAME = example.jpg How to Customize This Workflow to Your Needs Update Sensitive Data: Replace the placeholder values for TENANT_ID, CLIENT_ID, and CLIENT_SECRET with your actual credentials. Change Destination: Modify the TARGET_FOLDER and FILE_NAME parameters to match your desired upload location and file name. Test with Different Photos: Update the URL in the 'Get Photo' node to test with different images. Sticky Notes Workflow Overview This sticky note explains the overall purpose and dependencies of the workflow. Authentication Details This sticky note provides details on the authentication process and the importance of securing sensitive data. Set Destination Details This sticky note explains how to set the destination folder and file name for the photo upload. By following these guidelines, you can easily customize and use this workflow to automate photo uploads to SharePoint using the Microsoft Graph API.
by Dmytro
AI-Powered Product Assistant for E-commerce Transform your online store customer service with an intelligent AI assistant that automatically processes customer inquiries, searches your product database, and provides personalized responses about product availability, pricing, and specifications. Perfect for shoe stores, fashion retailers, and any business with extensive product catalogs - this workflow eliminates manual customer service while increasing response speed and accuracy. How it works Customer sends product inquiry via webhook (Instagram DM, website chat, or messaging app) AI extracts key product details (brand, model, size, color) from natural language text System searches your Google Sheets product database with smart filtering AI generates friendly, personalized response with availability, pricing, and stock information Automatic response sent back to customer with product details or alternatives Screenshots: Customer inquiry: "Do you have Nike Air Max 40 size?" AI response: "Nike Air Max 90, size 40 - in stock 3 pieces, price 120$" Set up steps Prepare your product database - Create Google Sheets with columns: Brand, Model, Size, Color, Price, Quantity Configure AI settings - Connect OpenAI API for natural language processing Set up webhook endpoint - Configure trigger for your messaging platform (Instagram, Telegram, website chat) Test with sample inquiries - Verify AI correctly parses requests and finds products Deploy and monitor - Launch your automated assistant and track performance Time investment: 30-45 minutes setup, works immediately with any product catalog up to 1000+ items.
by Jimleuk
This n8n workflow shows how using multimodal LLMs with AI vision can tackle tricky image validation tasks which are near impossible to achieve with code and often impractical to be done by humans at scale. You may need image validation when users submitted photos or images are required to meet certain criteria before being accepted. A wine review website may require users only submit photos of wine with labels, a bank may require account holders to submit scanned documents for verification etc. In this demonstration, our scenario will be to analyse a set of portraits to verify if they meet the criteria for valid passport photos according to the UK government website (https://www.gov.uk/photos-for-passports). How it works Our set of portaits are jpg files downloaded from our Google Drive using the Google Drive node. Each image is resized using the Edit Image node to ensure a balance between resolution and processing speed. Using the Basic LLM node, we'll define a "user message" option with the type of binary (data). This will allow us to pass our portrait to the LLM as an input. With our prompt containing the criteria pulled off the passport photo requirements webpage, the LLM is able to validate the photo does or doesn't meet its criteria. A structured output parser is used to structure the LLM's response to a JSON object which has the "is_valid" boolean property. This can be useful to further extend the workflow. Requirements Google Gemini API key Google Drive account Customising this workflow Not using Gemini? n8n's LLM node works with any compatible multimodal LLM so feel free to swap Gemini out for OpenAI's GPT4o or Antrophic's Claude Sonnet. Don't need to validate portraits? Try other use cases such as document classification, security footage analysis, people tagging in photos and more.