Using External Workflows as Tools in n8n
This guide will show you how to use a workflow as a reusable tool in n8n, such as integrating an AI Agent or other specialized processes into your workflows.
By the end of this example, you'll have a simple, reusable workflow that can be easily plugged into larger projects, making your automations more efficient and scalable.
With this approach, you can create reusable workflows like "Scrape a Page," "Search Brave," or "Generate an Image," which you can then call whenever needed.
While n8n makes it easy to build these workflows from scratch, setting them up as reusable components saves time as your automations grow in complexity.
Setup
Add the "Execute Workflow Trigger" node
Add the node(s) to perform the desired tasks in the workflow
Add a final "Set" or "Edit Fields" node at the end to ensure all external workflows return a consistent output format
Details
In this example, the "Execute Workflow Trigger" expects input in the following JSON format:
[ { "query": { "url": "https://en.wikipedia.org/wiki/some_info" } } ]
Once your external workflow is ready, you can instruct the AI Agent to use this tool by connecting it to the external workflow. Set up the schema type to "Generate from JSON Example" using this structure:
{ "url": "URL_TO_GET" }
Finally, ensure your external workflow includes a "Set" or "Edit Fields" node at the end to define the response format. This helps keep the outputs of your reusable workflows consistent and predictable.
Related Templates
Get Airtable data via AI and Obsidian Notes
I am submitting this workflow for the Obsidian community to showcase the potential of integrating Obsidian with n8n. Whi...
Task Deadline Reminders with Google Sheets, ChatGPT, and Gmail
Intro This template is for project managers, team leads, or anyone who wants to automatically remind teammates of tasks ...
Use OpenRouter in n8n versions <1.78
What it is: In version 1.78, n8n introduced a dedicated node to use the OpenRouter service, which lets you to use a lot...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments