Code Workflows
147 Ergebnisse — ausschließlich quellenverknüpfte n8n-Referenzen
Vector Database as a Big Data Analysis Tool for AI Agents [2/3 - anomaly]
Vector Database as a Big Data Analysis Tool for AI Agents Workflows from the webinar "Build production-ready AI Agents with Qdrant and n8n". This series of workflows shows how to build big data analysis tools for production-ready AI agents with the help of vector databases. These pipelines are adaptable to any dataset of images, hence, many production use cases. Uploading (image) datasets to Qdrant Set up meta-variables for anomaly detection in Qdrant Anomaly detection tool KNN classifier tool For anomaly detection The first pipeline to upload an image dataset to Qdrant. 2. This is the second pipeline to set up cluster (class) centres & cluster (class) threshold scores needed for anomaly detection. The third is the anomaly detection tool, which takes any image as input and uses all preparatory work done with Qdrant to detect if it's an anomaly to the uploaded dataset. For KNN (k nearest neighbours) classification The first pipeline to upload an image dataset to Qdrant. The second is the KNN classifier tool, which takes any image as input and classifies it on the uploaded to Qdrant dataset. To recreate both You'll have to upload crops and lands datasets from Kaggle to your own Googl
Weekly dinner meal plan using recipes from Mealie
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
Send a welcome private message to your new BlueSky followers
Who is this for? BlueSky users who are looking to send a "welcome message" to their new followers as a private message. What this workflow does This worflow will check for new followers on BlueSky every 60 minutes and send a private message to the new ones. Setup You need to create a BlueSky app password with private messages access. Fill your credentials and the message text on the corresponding nodes (see sticky notes). Manually run once the `Save followers to file` node to generate your initial followers list. Enable the workflow How to customize this workflow to your needs You can adjust the check frecuency, but be careful to avoid hitting the 100 createSession per day rate limit Feedback or comments You can leave comments, feedback or improvements about this workflow on the n8n forums
Simple Bluesky multi-image post using native Bluesky API
Who is this workflow for? This workflow is the baseline workflow for anyone who needs to automate the process of posting 1-4 images to Bluesky using the Bluesky API. It is ideal for anyone looking to streamline their social media posting process, saving time and ensuring consistent content delivery. Use Case / Problem Solved Manually posting images and captions on Instagram can be time-consuming, especially for businesses and content creators managing multiple accounts. This workflow automates the process from image preparation to publishing, reducing manual effort and increasing efficiency. What this workflow does Trigger Initialization: The workflow starts with a manual trigger that can be adapted to other triggers (e.g., HTTP webhook or schedule). Set Parameters: The workflow includes a node that sets essential parameters, such as the Bluesky account ID, image URLs, and caption. Prepare Bluesky Session: A node creates the authenticated session data used by the upload and post operations later in the workflow. Publish Media: Nodes retrieve image files from the specified URLS and uploads them as blobs to Bluesky, a necessary pre-requisite for a Bluesky post to have images attached
Demo Workflow - How to use workflowStaticData()
This workflow demonstrates how to use the workflowStaticData() function to set any type of variable that will persist within workflow executions. https://docs.n8n.io/code/cookbook/builtin/get-workflow-static-data/ This can be useful for example when working with access tokens that expire after a certain time period. Using staticData we can keep a record of that access token and the expiry time and build our workflow logic around it. Important Static Data only persists across production executions, i.e. triggered by Webhooks or Schedule Triggers (not manual executions!) For this the workflow will have to be activated. Setup configure HTTP Request node to fetch access token from your API (optional) activate workflow test the workflow with the webhook production link you can check the population of the static data in the single executions Feedback If you found this useful or want to report some missing information - I'd be happy to hear from you at [email protected]
Pattern for Parallel Sub-Workflow Execution Followed by Wait-For-All Loop
What this workflow does This (set of) workflow(s) shows how to start multiple sub-workflows, asynchronously, in parallel, and then wait for all of them to complete. Normally sub-workflows would need to be run synchronously, in series, or, if they are executed asynchronously (to run concurrently, in parallel), there is no easy way to merge/wait for an arbitrary number of them to complete. This is a "design pattern" template to show one approach for running multiple, data-driven instances of a sub-workflow "asynchronously," in parallel (instead of running them one at a time in series), but still prevent the later steps in the workflow from continuing until all of the sub-workflows have reported back that they are finished, via callback URL. There are other techniques involving messaging services, database tables, or other external "flow manager" helpers, but this technique accomplishes the goal fully within n8n. Setup To implement this pattern, examine the nodes in the template and modify the incoming data leading to: A split-out loop to acynchronously execute a sub-workflow multiple times, in parallel. For instance, each sub-workflow might process one of a list of incoming documents
Transfer credentials to other n8n instances using a Multi-Form
Purpose This workflow allows you to transfer credentials from one n8n instance to another. How it works A multi-form setup guides you through the entire process You get to choose one of your predefined (in the Settings node) remote instances first Then all credentials of the current instance are being retrieved using the Execute Command node On the next form page you can select one of the credentials by their name and initiate the transfer Finally the credential is being created on the remote instance using the n8n API. A final form ending indicates if that action succeeded or not. Setup Select your credentials in the nodes which require those Configure your remote instance(s) in the Settings node Every instance is defined as object with the keys name, apiKey and baseUrl. Those instances are then wrapped inside an array. You can find an example described within a note on the workflow canvas. How to use Grab the (production) URL of the Form from the first node Open the URL and follow the instructions given in the multi-form Disclaimer Please note, that this workflow can only run on self-hosted n8n instances, since it requires the Execute Command Node. Security: Beware, that all cred
Import workflows and map their credentials using a Multi-Form
Purpose This workflow allows you to import any workflow from a file or another n8n instance and map the credentials easily. How it works A multi-form setup guides you through the entire process At the beginning you have two options: Upload a workflow file (JSON) Copy workflow from a remote n8n instance If you choose the second option, you get to choose one of your predefined (in the Settings node) remote instances first, then it retrieves a list of all the workflows using the n8n API which you then can choose a workflow from. Now both initial options come together - the workflow file is being processed In parallel all credentials of the current instance are being retrieved using the Execute Command node The next form page enables a mapping of all the credentials used in the workflow. The matching happens between the names (because one workflow can contain different credentials of the same type) of the original credentials and the ones available on the current instance. Every option then shows all available credentials of the same type. In addition the user has always the choice to create a new credential on the fly. For every option which was set to create a new credential, an empt
Get Google Search Results (SERPs) for SEO Research
Use Case Research search engine rankings for SEO analysis: You need to track keyword rankings for your website You want to analyze competitor positions in search results You need data for SEO competition analysis You want to monitor SERP changes over time What this Workflow Does The workflow uses ScrapingRobot API to fetch Google search results: Retrieves SERP data for your target keywords Captures URL rankings and page titles Processes up to 5000 searches with free account Organizes results for SEO analysis Setup Create a ScrapingRobot account and get your API key Add your ScrapingRobot API key to the HTTP Request node's GET SERP token parameter Either connect your keyword database (column name "Keyword") or use the "Set Keywords" node Configure your preferred output database connection How to Adjust it to Your Needs Modify keyword source to pull from different databases Adjust the number of SERP results to capture Customize output format for your reporting needs More templates and n8n workflows >>> @simonscrapes
Public Webhook Relay
Disclaimer This template only works on n8n local instances! How it Works This workflow allows you to to receive webhooks from the public web and have your local workflow catch them, without any remote proxy. It is very useful for running quick tests without exposing your dev server. All you have to do is activate the workflow and use the public address as defined below. Set up steps If you use the default key-value storage, there are only three steps: Install the @horka.tv/n8n-nodes-storage-kv community node Put your n8n workflow address in Local Webhook Address Activate the workflow and, from Executions, note down your public webhook token from the inputs to Get Latest Requests. You can now use https://webhook.site/[YOUR TOKEN] as a webhook destination, to receive webhook requests from the public web.
Create Atlassian Confluence page from template
How it works creates a new page in Confluence based on a page template also defined in Confluence replaces any number of placeholders with data from your workflow generic implementation for maximum flexibility Set up steps All parameters you need to change are defined in the Set node Set your Atlassian-domain Set the template id you want to use as the basis for new pages Set the target space and parent page for new pages added based on that template. 🎥 Explainer video has all the details. =) Feedback Any feedback is welcome. If you have ideas for improvements, let me know.
Validate TOTP Token (without creating a credential)
TOTP Validation with Function Node This template allows you to verify if a 6-digit TOTP code is valid using the corresponding TOTP secret. It can be used in an authentication system. The inputs need to be: a base32 totp secret (String) a 6 digits code (String) ++Important:++ The 6-digit code must be in text format. If the code starts with zeros and is treated as a number, it could cause validation issues. The function node will generate a 6-digit code from the TOTP secret, then compare it with the provided code. If they match, it will return 1 otherwise, it will return 0. Example usage: You retrieve the user's TOTP secret from a database, then you want to verify if the 2FA code provided by the user is valid. Setup Guidelines You only need the ==TOTP VALIDATION== node. You will need to modify lines 39 and 40== of the node with the correct values for your specific context. Testing the Template You can define a sample secret and code in the EXAMPLE FIELDS node of the template, then click "Test Workflow". If the code is valid for the provided secret, the flow will proceed to the true branch of the IF CODE IS VALID node. Otherwise, it will go to the false branch.
🔍 Visualize Your n8n Workflows with Mermaid.js!
Are you a visual thinker working with n8n? 🎨 View and understand workflow structures at a glance with this template! Built with mermaid.js, Bootstrap 5 and AXAJ to create an interactive web page displaying n8n workflows as flowcharts. 🌟 Perfect for documentation, presentations, or just getting a clearer picture of your automation processes. Need customization help? Reach out to Eduard! Benefits 📊 Instant workflow visualization 📱 Responsive design 🔗 Direct links to n8n workflows 🧩 Special shapes for different node types 🚫 Disabled node indication 🔒 No external dependencies – just paste the workflow and call the webhook 🛠️ Easily customizable – enhance the JS script or add custom styling ⚠️ Important note for cloud users ⚠️ Since the cloud version doesn't support environmental variables, please make the following changes in the CONFIG node: Update the instance_url variable: Enter your n8n URL instead of {{$env["N8N_PROTOCOL"]}}://{{$env["N8N_HOST"]}} Change the webhook_path to simply "webhook" instead of {{$env["N8N_ENDPOINT_WEBHOOK"] || "webhook"}} 🌟 Examples Multiple flowcharts on a single page: Several shapes for different nodes: Langchain nodes with special connections
Access execution data from an error workflow
Sometimes you want to take a different action in your error workflow based on the data that was flowing through it. This template illustrates how you can do that (more specifically, how you can retrieve the data of a webhook node). How it works Use the 'n8n' node to fetch the data of the failed execution Parse that data to find webhook nodes and extract the data of the one that was executed
Convert HTML to PDF using ConvertAPI
Who is this for? For developers and organizations that need to convert HTML files to PDF. What problem is this workflow solving? The file format conversion problem. What this workflow does Converts HTML to file. Converts the HTML file to PDF. Stores the PDF file in the local file system. How to customize this workflow to your needs Open the HTTP Request node. Adjust the URL parameter (all endpoints can be found here). Use your API Token for authentication. Pass the token in the Authorization header as a Bearer token. You can manage your API Tokens in the User panel → Authentication. Optionally, additional Body Parameters can be added for the converter.
Check if workflows contain build-in nodes that are not of the latest version
How it works it will return workflows that have buil-in nodes not of latest version with information of node name, type, current version and latest version for that type Set up steps: You need to have n8n credentials set, you can get n8n API key under settings set your instance base URL in "instance base url" node Disclaimar: Only check build-in nodes, community nodes are not supported
Dynamically replace images in Google Slides via API
🎉 Do you want to master AI automation, so you can save time and build cool stuff? I’ve created a welcoming Skool community for non-technical yet resourceful learners. 👉🏻 Join the AI Atelier 👈🏻 This workflow exposes an API endpoint that lets you dynamically replace an image in Google Slides, perfect for automating deck presentations like updating backgrounds or client logos. *📺 Youtube Overview 📺 * Here's how to get started: Step 1: Set Up a Key Identifier in Google Slides Add a unique key identifier to the images you want to replace. Click on the image. Go to Format Options and then Alt Text. Enter your unique identifier, like client_logo or background. Step 2: Use a POST Request to Update the Image Send a POST request to the workflow endpoint with the following parameters in the body: presentation_id: The ID of your Google Slides presentation. You can find it in the URL of your Google presentation: https://docs.google.com/presentation/d/<this-part>/edit) image_key: The unique identifier you created. image_url: The URL of the new image. That's it! The specified image in your Google Slides presentation will be replaced with the new one from the provided URL. This workfl
YouTube Advanced RSS Generator with Telegram Formation
Overview The [n8n] YouTube Channel Advanced RSS Feeds Generator workflow facilitates the generation of various RSS feed formats for YouTube channels without requiring API access or administrative permissions. It utilizes third-party services to extract data, making it extremely user-friendly and accessible. Key Use Cases and Benefits Content Aggregation**: Easily gather and syndicate content from any public YouTube channel. No API Key Required**: Avoid the complexities and limitations of Google's API. Multiple Formats**: Supports ATOM, JSON, MRSS, Plaintext, Sfeed, and direct YouTube XML feeds. Flexibility**: Input can be a YouTube channel or video URL, ID, or username. Services/APIs Utilized This workflow integrates with: commentpicker.com**: For retrieving YouTube channel IDs. rss-bridge.org**: To generate various RSS formats. Configuration Instructions Start the Workflow: Activate the workflow in your n8n instance. Input Details: Enter the YouTube channel or video URL, ID, or username via the provided form trigger. Run the Workflow: Execute the workflow to receive links to 13 different RSS feeds, including community and video content feeds. Screenshots Additional Notes Customiza
Real-time lead routing in Webflow
This workflow will allow you to enrich in real-time a form submission from Webflow using Datagma. Based on the result of this workflow, a specific Calendly link will be shown on the website. If the process outcome is '1', a link for a one-on-one demo will be provided. If the process outcome is '2', a link for a group demo will be shown. Full guide here: Real-time Lead Routing
Perform an email search with Icypeas (single)
This template can be used to search for an email address with Icypeas. Be sure to have an active account to use this template. How it works This workflow can be divided into three steps : The workflow initiates with a manual trigger (On clicking 'execute'). It connects to your Icypeas account. It performs an HTTP request to search for an email address. Set up steps You will need a working icypeas account to run the workflow and get your API Key, API Secret and User ID. You will need a personn firstname, lastname and domain/company name to perform the search.
Perform a domain search with Icypeas (single)
This template can be used to scan a domain/company with Icypeas. Be sure to have an active account to use this template. How it works This workflow can be divided into three steps : The workflow initiates with a manual trigger (On clicking 'execute'). It connects to your Icypeas account. It performs an HTTP request to scan a domain/company name. Set up steps You will need a working icypeas account to run the workflow and get your API Key, API Secret and User ID. You will need a domain/company name to perform the search.
Verify an email adress with Icypeas (single)
This template can be used to verify an email address with Icypeas. Be sure to have an active account to use this template. How it works This workflow can be divided into three steps : The workflow initiates with a manual trigger (On clicking 'execute'). It connects to your Icypeas account. It performs an HTTP request to verify an email address. Set up steps You will need a working icypeas account to run the workflow and get your API Key, API Secret and User ID. You will need an email address to perform the verification.
Analyze Email Headers for IPs and Spoofing
This n8n workflow is designed to analyze email headers received via a webhook. The workflow splits into two main paths based on the presence of the received and authentication results headers. In the first path, if received headers are present, the workflow extracts IP addresses from these headers and then queries the IP Quality Score API to gather information about the IP addresses, including fraud score, abuse history, organization, and more. Geolocation data is also obtained from the IP-API API. The workflow collects and aggregates this information for each IP address. In the second path, if authentication-results headers are present, the workflow extracts SPF, DKIM, and DMARC authentication results. It then evaluates these results and sets fields accordingly (e.g., SPF pass/fail/neutral). The paths merge their results, and the workflow responds to the original webhook with the aggregated analysis, including IP information and authentication results. Potential issues during setup include ensuring proper configuration of the webhook calls with header authentication, handling authentication and API keys for the IP Quality Score API, and addressing any discrepancies or errors in th
Comparing data with the Compare Datasets node
This workflow is designed to compare two datasets (Dataset 1 and Dataset 2) based on a common field, "fruit," and provide insights into the differences. Here are the steps: Manual Trigger: The workflow begins when a user clicks "Execute Workflow." Dataset 1: This node generates the first dataset containing information about fruits, such as apple, orange, grape, strawberry, and banana, along with their colors. Dataset 2: This node generates the second dataset, also containing information about fruits, but with some variations in color. For example, it includes a "kiwi" with the color "mostly green." Compare Datasets: The "Compare Datasets" node takes both datasets and compares them based on the "fruit" field. It identifies any differences or matches between the two datasets. In summary, this workflow is used to compare two datasets of fruits and their colors, identify differences, and provide guidance on how to explore the comparison results.