Back to Catalog

Templates by Viktor Klepikovskyi

Run multiple tasks in parallel with asynchronous processing and webhooks

n8n Asynchronous Workflow with Wait Node POC This template contains a two-part workflow designed to demonstrate a proof-of-concept for asynchronous and parallel execution of tasks in n8n. Purpose The purpose of this template is to showcase how you can run multiple long-running tasks simultaneously without blocking your main workflow. It utilizes the "Wait For Sub-workflow Completion" option and the "Wait" node to effectively manage concurrent execution and collect results from sub-workflows via webhooks. This pattern is ideal for use cases involving batch processing or any scenario where a workflow needs to trigger multiple independent tasks and wait for all of them to report back. Setup Instructions Import: Import both the "Main Orchestrator" and "Asynchronous Worker" workflows into your n8n instance. Link Workflows: In the "Main Orchestrator" workflow, ensure the "Execute Workflow" node is correctly configured to call the "Asynchronous Worker" workflow. You can select it by its name from the dropdown menu. Configure: The template is pre-configured to run two parallel tasks with different wait durations to simulate a real-world scenario. You can adjust the parameters on the "Execute Workflow" node to test different wait times. Execution: Execute the "Main Orchestrator" workflow. You will see the workflow pause at the "Wait" nodes while the "Asynchronous Worker" workflows run in the background. Once they complete, they will call back via the webhook, allowing the main workflow to resume and summarize the results. For a detailed walkthrough of how this template works and an explanation of the underlying concepts, please read the full blog post here

Viktor KlepikovskyiBy Viktor Klepikovskyi
1140

Reusable and independently testable sub-workflow

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.

Viktor KlepikovskyiBy Viktor Klepikovskyi
653

Create a CRUD REST API with Google Sheets database

Simple REST API with Google Sheets Introduction This workflow template demonstrates how to quickly and easily create a simple REST API using n8n and a Google Sheet as a no-code database. It's a perfect starting point for building a backend for small applications, prototypes, or internal tools without writing any code. Purpose The purpose of this template is to provide a complete, ready-to-use n8n workflow that handles all fundamental CRUD (Create, Read, Update, Delete) operations. The workflow uses a single Webhook trigger to handle POST, GET, PUT, and DELETE requests, allowing you to manage data in your Google Sheet through standard API calls. Setup Instructions To get started with this template, follow these steps: Prepare your Google Sheet: Create a new Google Sheet and add the following column headers in the first row: name, email, and status. You can use this example Google Sheet as a starting point. This sheet will serve as your database. Authenticate: In the n8n workflow, connect your Google Account credentials to the Google Sheets nodes. Select your data: Choose the Google Sheet and the corresponding sheet name from the drop-down lists in each of the Google Sheets nodes. Activate: Save and activate the workflow. Test the API: Use a tool like curl, Postman, or Insomnia to test your new API endpoints. The base URL will be your n8n webhook URL followed by /items. Example curl Commands: POST (Create): curl -X POST YOURN8NWEBHOOK_URL/items -H "Content-Type: application/json" -d '{"name": "Alice", "email": "alice@example.com", "status": "active"}' GET (Read All): curl -X GET YOURN8NWEBHOOK_URL/items/all GET (Read Single): curl -X GET YOURN8NWEBHOOK_URL/items?id=2 PUT (Update): curl -X PUT YOURN8NWEBHOOK_URL/items?id=2 -H "Content-Type: application/json" -d '{"status": "inactive"}' DELETE (Delete): curl -X DELETE YOURN8NWEBHOOK_URL/items?id=2 For more detailed instructions, including building the workflow in n8n, check out the full blog post: Build a Simple REST API in 10 Minutes with n8n & Google Sheets

Viktor KlepikovskyiBy Viktor Klepikovskyi
460

Create nested data processing loops using n8n sub-workflows

Nested Loops with Sub-workflows Template Description This template provides a practical solution for a common n8n challenge: creating nested loops. While a powerful feature, n8n's standard Loop nodes don't work as expected in a nested structure. This template demonstrates the reliable workaround using a main workflow that calls a separate sub-workflow for each iteration. Purpose The template is designed to help you handle scenarios where you need to iterate through one list of data for every item in another list. This is a crucial pattern for combining or processing related data, ensuring your workflows are both clean and modular. Instructions for Setup This template contains both the main workflow and the sub-workflow on a single canvas. Copy the sub-workflow part of this template (starting with the Execute Sub-workflow Trigger node) and paste it into a new, empty canvas. In the Execute Sub-workflow node in the main workflow on this canvas, update the Sub-workflow field to link to the new workflow you just created. Run the main workflow to see the solution in action. For a detailed walkthrough of this solution, check out the full blog post

Viktor KlepikovskyiBy Viktor Klepikovskyi
357

Google Sheets UI for n8n Workflow

Google Sheets UI for Workflow Control This n8n template provides a practical and efficient way to manage your n8n workflows using Google Sheets as a user-friendly interface. It demonstrates how to leverage a simple spreadsheet to control inputs, capture outputs, and track the processing status of individual data rows, offering a clear and visual overview of your automation tasks. Purpose of This Template: The primary purpose of this template is to illustrate how Google Sheets can serve as a dynamic UI for your n8n automations. It's designed for n8n users who need: A structured method to feed specific data into their workflows. The ability to selectively trigger workflow execution based on data status. A centralized place to view and store workflow outputs alongside original inputs. A simple, no-code solution for managing workflow data without building custom applications. Setup Instructions: To use this template, follow these steps: Create a Google Sheet: Set up a new Google Sheet (see the template here) with three columns: Color, Status, and Number. Populate the Color column with some sample data (e.g., color names) and set the Status for the rows you want to process to READY. Import the n8n Workflow: Import this n8n template into your n8n instance. Configure Google Sheets Nodes: For the first Google Sheets node (Read operation), ensure it's connected to your newly created Google Sheet and configured to read rows where the Status column is READY. You will need to authenticate your Google Sheets account. For the second Google Sheets node (Update operation), ensure it's also connected to the same Google Sheet. The node should automatically map the row_number, Number, and Status fields from the preceding nodes. Execute the Workflow: Run the workflow. Observe how it reads READY rows, processes them (calculates string length), and updates the Number and Status columns in your Google Sheet to DONE. Control Execution: To process new data, simply add new rows to your Google Sheet and set their Status to READY. Rerunning the workflow will then only process these new entries. For more details and context on this approach, you can refer to the related blog post here.

Viktor KlepikovskyiBy Viktor Klepikovskyi
349

Convert multiple binary files to base64 JSON arrays with no custom code

No-Code: Convert Multiple Binary Files to Base64 Introduction This template provides a robust, purely no-code solution for a common integration challenge: converting multiple binary files contained within a single n8n item (e.g., after unzipping an archive) into a structured JSON array of Base64 encoded strings. Purpose Many external APIs, especially those handling batch file uploads or complex data structures, require files to be submitted as a single JSON payload. This payload typically needs an array containing two elements for each file: the reconstructed file path/name and the Base64 encoded content. This template automatically handles the file isolation, encoding, path reconstruction, and final JSON aggregation, replacing the need for complex custom JavaScript Code nodes. Configuration Steps Input: Connect your binary data source (e.g., an HTTP Request followed by a Compression node) to the first node in this template. Split Out: This node automatically separates the multiple binary files into individual items. Extract From File: This node uses the dynamic expression {{ $binary.keys()[0] }} to ensure the correct binary file is targeted and converted to Base64. Set: This node uses a conditional expression to reconstruct the full path (including the directory, if present) for each file. Aggregate: The final node merges all individual items into a single, clean JSON item containing a top-level files array, ready for your final API call. For a detailed walkthrough, including the explanation behind the dynamic expressions and why this is superior to the custom code solution, check out the full blog post: The No-Code Evolution: Base64 Encoding Multiple Files in n8n (Part 2).

Viktor KlepikovskyiBy Viktor Klepikovskyi
332

Scrape multi-page websites recursively with Google Sheets storage

Configurable Multi-Page Web Scraper Introduction This n8n workflow provides a robust and highly reusable solution for scraping data from paginated websites. Instead of building a complex series of nodes for every new site, you only need to update a simple JSON configuration in the initial Input Node, making your scraping tasks faster and more standardized. Purpose The core purpose of this template is to automate the extraction of structured data (e.g., product details, quotes, articles) from websites with multiple pages. It is designed to be fully recursive: it follows the "next page" link until no link is found, aggregates the results from all pages, and cleanly structures the final output into a single list of items. Setup and Configuration Locate the Input Node: The entire configuration for the scraper is held within the first node of the workflow. Update the JSON: Replace the existing JSON content with your target website's details: startUrl: The URL of the first page to begin scraping. nextPageSelector: The CSS selector for the "Next" or "Continue" link element that leads to the next page. This is crucial for the pagination loop. fields: An array of objects defining the data to extract on each page. For each field, specify the name (the output key), the selector (the CSS selector pointing to the data), and the value (the HTML attribute to pull, usually text or href). Run the Workflow: After updating the configuration, execute the workflow. It will automatically loop through all pages and deliver a final, structured list of the scraped data. For a detailed breakdown of the internal logic, including how the loop is constructed using the Set, If, and HTTP Request nodes, please refer to the original blog post: Flexible Web Scraping with n8n: A Configurable, Multi-Page Template

Viktor KlepikovskyiBy Viktor Klepikovskyi
185
All templates loaded