by Lucas Peyrin
How it works This workflow is a robust and forgiving JSON parser designed to handle malformed or "dirty" JSON strings often returned by AI models or scraped from web pages. It takes a text string as input and attempts to extract and parse a valid JSON object from it. Cleans Input: It starts by trimming whitespace and removing common Markdown code fences (like ` Applies Multiple Fixes: It systematically attempts to correct common JSON errors in a specific order: Escapes unescaped control characters (like newlines) within strings. Fixes invalid backslash escape sequences. Removes trailing commas. Intelligently attempts to fix unescaped double quotes inside string values. Parses Strategically: If a direct parse fails, it tries to extract a potential JSON object from the text (e.g., finding a {...} block inside a larger sentence) and then re-applies the cleaning logic to that extracted portion. Outputs Clean Data: If successful, it outputs the parsed JSON fields. By default, it removes the detailed parsing_status object, but you can deactivate the final "Set" node to keep it for debugging. Set up steps Setup time: ~1 minute This workflow is designed to be used as a sub-workflow and requires no internal setup. In your main workflow, add an Execute Sub-Workflow node where you need to parse a messy JSON string. In the Workflow parameter, select this "Robust JSON Parser" workflow. Ensure the data you send to the node is a JSON object containing a text field, where the value of text is the string you want to parse. For example: { "text": "{\\\"key\\\": \\\"some broken json...\\\"}" }. The workflow will return the successfully parsed data. To see a detailed log of the cleaning process, simply deactivate the final Remove parsing_status node inside this workflow.
by SamirLiu
π Overview This workflow leverages Google Gemini 2.0 Flash multimodal AI to automatically generate detailed descriptions of video content from any public URL. It streamlines video understanding, making it ideal for content cataloging, accessibility, and content moderation. π‘ Use Cases βΏ Accessibility: Automatically generate detailed video descriptions for visually impaired users. π‘οΈ Content Moderation: Detect inappropriate or off-brand material without manual watching. ποΈ Media Cataloging: Enrich your media library with automatically extracted metadata. π Marketing & Branding: Gain fast insights into key elements, tone, and branding in video content. βοΈ Setup Instructions π Get a Gemini API Key Register at ai.google.dev and create an API key. Before running the workflow, set your Gemini API key as an environment variable named GeminiKey for secure access within the workflow. In the Set Input node, reference this environment variable instead of hardcoding the key. π Configure Video URL Replace the sample URL in the Set Input node with your desired public video URL. Ensure the video is directly accessible (no login or special permissions required). π Optional: Customize the Analysis Edit the prompt in the Analyze video Gemini node to focus on the most relevant video details for your use case (e.g., branding, key actions, visual elements). π Security Tip Use n8n's credentials manager or environment variables (like GeminiKey) to store your API key securely. Avoid hardcoding API keys directly in workflow nodes, especially in production environments. π How It Works π₯ Download the video from the provided URL. βοΈ Upload the video to Geminiβs server for processing. β³ Wait for Gemini to complete processing. π€ Analyze the video with Gemini AI using your customized prompt. π Output a comprehensive description of the video as videoDescription. β‘ Technical Details Uses HTTP Request nodes to interact with Gemini API endpoints. Handles file download, upload, status checking, and result retrieval. Customizable Gemini AI parameters for fine-tuned response. Main output: videoDescription (detailed text describing video content). π Quickstart Set your Gemini API key as the GeminiKey environment variable and configure your video URL in the workflow. Execute the workflow. Retrieve your rich, AI-generated video description for downstream use such as automation, tagging, or reporting.
by Damian Karzon
This workflow randomly select recipes from a Mealie instance (can use a specific category) and then creates a meal plan in Mealie with those recipes. How it works: Workflow has a scheduled trigger (set to run weekly on a Friday) Config node sets a few properties to configure the workflow A call to the Mealie API to get the list of recipes The code node holds most of the logic, this will loop through the number of recipes defined in the config node and randomly select a recipe from the list (making sure not to double up any recipes) Once all the recipes are selected it will call the Mealie API to set up the meal plan on the days Setup Add your Mealie API token as a credential and set it on the Http Request nodes Set the relevant schedule trigger to run when you like Update the Config node with the config you want numberOfRecipes - Number of recipes to populate for the meal plan offsetPlanDays - Number of days in the future to start the plan (0 will start it today, 1 tomorrow, etc.) mealieCategoryId - A category id of the category you want to pull in recipes from (default to select from all recipes) mealieBaseUrl - The base url of your Mealie instance
by Jimleuk
This n8n demonstrates how to build a simple PostgreSQL MCP server to manage your PostgreSQL database such as HR, Payroll, Sale, Inventory and More! This MCP example is based off an official MCP reference implementation which can be found here -https://github.com/modelcontextprotocol/servers/tree/main/src/postgres How it works A MCP server trigger is used and connected to 5 tools: 2 postgreSQL and 3 custom workflow. The 2 postgreSQL tools are simple read-only queries and as such, the postgreSQL tool can be simply used. The 3 custom workflow tools are used for select, insert and update queries as these are operations which require a bit more discretion. Whilst it may be easier to allow the agent to use raw SQL queries, we may find it a little safer to just allow for the parameters instead. The custom workflow tool allows us to define this restricted schema for tool input which we'll use to construct the SQL statement ourselves. All 3 custom workflow tools trigger the same "Execute workflow" trigger in this very template which has a switch to route the operation to the correct handler. Finally, we use our standard PostgreSQL node to handle select, insert and update operations. The responses are then sent back to the the MCP client. How to use This PostgreSQL MCP server allows any compatible MCP client to manage a PostgreSQL database by supporting select, create and update operations. You will need to have a database available before you can use this server. Connect your MCP client by following the n8n guidelines here - https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger/#integrating-with-claude-desktop Try the following queries in your MCP client: "Please help me check if Alex has an entry in the users table. If not, please help me create a record for her." "What was the top selling product in the last week?" "How many high priority support tickets are still open this morning?" Requirements PostgreSQL for database. This can be an external database such as Supabase or one you can host internally. MCP Client or Agent for usage such as Claude Desktop - https://claude.ai/download Customising this workflow If the scope of schemas or tables is too open, try restrict it so the MCP serves a specific purpose for business operations. eg. Confine the querying and editing to HR only tables before providing access to people in that department. Remember to set the MCP server to require credentials before going to production and sharing this MCP server with others!
by Jimleuk
This n8n template demonstrates how to get started with Gemini 2.0's new Bounding Box detection capabilities in your workflows. The key difference being this enables prompt-based object detection for images which is pretty powerful for things like contextual search over an image. eg. "Put a bounding box around all adults with children in this image" or "Put a bounding box around cars parked out of bounds of a parking space". How it works An image is downloaded via the HTTP node and an "Edit Image" node is used to extract the file's width and height. The image is then given to the Gemini 2.0 API to parse and return coordinates of the bounding box of the requested subjects. In this demo, we've asked for the AI to identify all bunnies. The coordinates are then rescaled with the original image's width and height to correctl align them. Finally to measure the accuracy of the object detection, we use the "Edit Image" node to draw the bounding boxes onto the original image. How to use Really up to the imagination! Perhaps a form of grounding for evidence based workflows or a higher form of image search can be built. Requirements Google Gemini for LLM Customising the workflow This template is just a demonstration of an experimental version of Gemini 2.0. It is recommended to wait for Gemini 2.0 to come out of this stage before using in production.
by Agent Studio
This workflow is a experiment to build HTML pages from a user input using the new Structured Output from OpenAI. How it works: Users add what they want to build as a query parameter The OpenAI node generate an interface following a structured output defined in the body The JSON output is then converted to HTML along with a title The HTML is encapsulated in an HTML node (where the Tailwind css script is added) The HTML is rendered to the user via the Webhook response. Set up steps Create an OpenAI API Key Create the OpenAI credentials Use the credentials for both nodes HTTP Request (as Predefined Credential type) and OpenAI Activate your workflow Once active, go to the production URL and add what you'd like to build as the parameter "query" Example: https://production_url.com?query=a%20signup%20form Example of generated page
by Aitor | 1Node
This n8n workflow captures Partnerstack events via a webhook, logs the event data into a Google Sheet, and sends a Telegram notification. How it Works: Webhook Node (Trigger): Listens for incoming POST requests. When an event occurs in Partnerstack (e.g., a new referral signs up), the workflow is triggered, capturing the event data. Append Row in Sheets Node: Takes the received Partnerstack event data and appends it as a new row to a designated Google Sheet. This creates a historical log of all captured events. Set Chat ID Node: Defines the specific Telegram chat ID where notifications will be sent. Send Notification Node (Telegram): Sends a message to the specified Telegram chat. The message content includes details from the Partnerstack event, providing real-time alerts. Setup Requirements: Partnerstack Postback: Configure a postback in Partnerstack (My account > Postbacks > Create a postback). Paste the URL provided by n8n's **Webhook node. Select the Partnerstack events you wish to track. Google Sheets Authentication**: Provide n8n with Google credentials that have write access to your target Google Sheet. Specify the sheet name. Telegram Integration**: You'll need a Telegram bot token (from BotFather) and the specific chat ID for the destination Telegram chat/channel. Additional Notes: This workflow efficiently automates logging of Partnerstack activities and provides immediate team awareness through Telegram notifications, streamlining event monitoring and response. π Need Help? Feel free to contact us at 1 Node. Get instant access to a library of free resources we created.
by Viktor Klepikovskyi
Reusable and Independently Testable Sub-workflow This n8n workflow provides a standardized structure for building and testing sub-workflows in isolation. Its purpose is to help you create robust, reusable, and maintainable automations by enabling you to test the sub-workflow's logic without needing a separate parent workflow. Setup Instructions: Define Sub-workflow Inputs: Double-click the Execute Sub-workflow Trigger node to define the parameters (e.g., color) that your sub-workflow will expect from a parent workflow. Configure Test Data: Use the Test Input node (an Edit Fields (Set) node connected to the Manual Trigger) to provide sample data for isolated testing. Connect Inputs: The Combine Input node (an Edit Fields (Set) node) is the entry point for your sub-workflow's core logic. It should have two inputs: one from the Execute Sub-workflow Trigger and one from the Test Input node. Merge Inputs: Ensure the Combine Input node has the 'Include Other Input Fields' option enabled to merge data from both the live and test paths seamlessly. You can read the full blog post that explains this workflow setup in detail here.
by Artur
Overview This automated workflow fetches Upwork job postings using Apify, removes duplicate job listings via MongoDB, and sends new job opportunities to Slack. Key Features: Automated job retrieval** from Upwork via Apify API Duplicate filtering** using MongoDB to store only unique jobs Slack notifications** for new job postings Runs every 20 minutes** during working hours (9 AM - 5 PM) This workflow requires an active Apify subscription to function, as it uses the Apify Upwork API to fetch job listings. Who is This For? This workflow is ideal for: Freelancers looking to track Upwork jobs in real time Recruiters automating job collection for analytics Developers who want to integrate Upwork job data into their applications What Problem Does This Solve? Manually checking Upwork for jobs is time-consuming and inefficient. This workflow: Automates job discovery based on your keywords Filters out duplicate listings, ensuring only new jobs are stored Notifies you on Slack when new jobs appear How the Workflow Works 1. Schedule Trigger (Every 20 Minutes) Triggers the workflow at 20-minute intervals Ensures job searches are only executed during working hours (9 AM - 5 PM) 2. Query Upwork for Jobs Uses Apify API to scrape Upwork job posts for specific keywords (e.g., "n8n", "Python") 3. Find Existing Jobs in MongoDB Searches MongoDB to check if a job (based on title and budget) already exists 4. Filter Out Duplicate Jobs The Merge Node compares Upwork jobs with MongoDB data The IF Node filters out jobs that are already stored in the database 5. Save Only New Jobs in MongoDB The Insert Node adds only new job listings to the MongoDB collection 6. Send a Slack Notification If a new job is found, a Slack message is sent with job details Setup Guide Required API Keys Upwork Scraper (Apify Token) β Get your token from Apify MongoDB Credentials β Set up MongoDB in n8n using your connection string Slack API Token β Connect Slack to n8n and set the channel ID (default: #general) Configuration Steps Modify search keywords in the 'Assign Parameters' node (startUrls) Adjust the Working Hours in the 'If Working Hours' node Set your Slack channel in the Slack node Ensure MongoDB is connected properly Adjust the 'If Working Hours' node to match your timezone and hours, or remove it altogether to receive notifications and updates constantly. How to Customize the Workflow Change keywords: update the startUrls in the 'Assign Parameters' node to track different job categories Change 'If Working Hours': Modify conditions in the IF Node to filter times based on your needs Modify Slack Notifications: Adjust the Slack message format to include additional job details Why Use This Workflow? Automated job tracking without manual searches Prevents duplicate entries in MongoDB Instant Slack notifications for new job opportunities Customizable β adapt the workflow to different job categories Next Steps Run the workflow and test with a small set of keywords Expand job categories for better coverage Enhance notifications by integrating Telegram, Email, or a dashboard This workflow ensures real-time job tracking, prevents duplicates, and keeps you updated effortlessly.
by felipe biava cataneo
What this template does This template uses GROQ LLAVA V1.5 7B API that offers fast inference for multimodal models with vision capabilities for understanding and interpreting visual data from images. . The users send a image and get a description of the image from the model. Setup Open the Telegram app and search for the BotFather user (@BotFather) Start a chat with the BotFather Type /newbot to create a new bot Follow the prompts to name your bot and get a unique API token Save your access token and username Once you set your bot, you can send the image, and get the descriptions.
by Dr. Firas
Who Is This For This workflow is ideal for content creators, bloggers, marketers, and professionals seeking to automate the creation and publication of SEO-optimized articles. It's particularly beneficial for those utilizing Notion for content management and WordPress for publishing.β What Problem Does This Workflow Solve Manually creating SEO-friendly articles is time-consuming and requires consistent effort. This workflow streamlines the entire processβfrom detecting updates in Notion to publishing on WordPressβby leveraging AI for content generation, thereby reducing the time and effort involved.β What This Workflow Does Monitor Notion Updates: Detects changes in a specified Notion database.β AI Content Generation: Utilizes an AI model to produce an SEO-optimized article based on Notion data.β Publish to WordPress: Automatically posts the generated article to a WordPress site.β Email Notification: Sends an email containing the article's title and URL.β Update Notion Database: Updates the corresponding entry in the Notion database with the article details.β Setup Guide Prerequisites WordPress account with API access.β API key for the AI model used.β Notion integration with the relevant database ID.β Credentials for the email service used (e.g., Gmail).β Community Node Requirement: This workflow utilizes the n8n-nodes-mcp community node, which is only compatible with self-hosted instances of n8n. For more information on installing and managing community nodes, refer to the n8n documentation.β n8n Docs Steps Import the workflow into your self-hosted n8n instance.β Install the required community node (n8n-nodes-mcp).β Configure API credentials for WordPress, the AI service, Notion, and the email service.β Define necessary variables, such as the notification email address and Notion database IDs.β Activate the workflow to automate the process.β How to Customize This Workflow AI Prompt: Adjust the prompt used for content generation to align with your preferred tone and style.β Article Structure: Modify the structure of the generated article by tweaking settings in the content generation node.β Notifications: Customize the content and recipients of the emails sent post-publication.β Notion Updates: Tailor the fields updated in Notion to suit your specific requirements.
by Dave Bernier
This n8n workflow template uses community nodes and is only compatible with the self-hosted version of n8n. This template aims to ease the process of deploying workflows from github. It has a companion repository that developers might find useful{. See below for more details How it works Automatically import and deploy n8n workflows from your GitHub repository to your production n8n instance using a secured webhook-based approach. This template enables teams to maintain version control of their workflows while ensuring seamless deployment through a CI/CD pipeline. Receives webhook notifications from GitHub when changes are pushed to your repository Lists all files in the repository and filters for .json workflow files Downloads each workflow file and saves it locally Imports all workflows into n8n using the CLI import command Cleans up temporary files after successful import To trigger the deployment, send a POST request to your webhook with the set up credentials (basic auth) with the following body: { "owner": "GITHUB_REPO_OWNER_NAME", "repository": "GITHUB_REPOSITORY_NAME" } Set up steps Once importing this template in n8n : Setup the webhook basic auth credentials Setup the github credentials Activate the workflow ! Companion repository There is a companion repository located at https://github.com/dynamicNerdsSolutions/n8n-git-flow-template that has a Github action already setup to work with this workflow. It provides a complete development environment with: Local n8n instance via Docker Automated workflow export and commit scripts Version control integration CI/CD pipeline setup This setup allows teams to maintain a clean separation between development and production environments while ensuring reliable workflow deployment.