AI Agent with API Tools
detail.loadingPreview
This workflow demonstrates how an AI agent can leverage API tools to scrape webpages and suggest activities.
About This Workflow
This n8n workflow showcases the power of AI agents integrated with external API tools, specifically focusing on web scraping and activity suggestion.
It's a remake of existing n8n workflows, re-implementing them using Langchain's agent capabilities and the new HTTP Request tool (available since v1.47.0), which significantly reduces the need for complex subworkflows or manual parameter definitions. The workflow is triggered manually and demonstrates two distinct use cases:
- Web Scraping: An AI agent is prompted to fetch the latest issues from a GitHub repository. It utilizes the
Webscraper Tool(Firecrawl) to scrape the provided URL. - Activity Suggestion: An AI agent is prompted to suggest an activity. It uses the
Activity Tool(Bored API) to find a suitable activity based on the user's preference for learning.
The workflow highlights the efficiency of the HTTP Request tool in simplifying API integrations within AI agents.
Key Features
- AI Agent Capabilities: Leverages Langchain's agent node to process natural language prompts.
- Web Scraping Tool Integration: Uses a dedicated tool (
Webscraper Tool) to fetch and parse webpage content. - API Tool for Suggestions: Integrates with an external API (
Activity Tool) to provide dynamic suggestions. - Simplified API Calls: Employs the
toolHttpRequestnode, which streamlines API interactions compared to previous methods. - Reduced Workflow Complexity: Eliminates the need for
Execute Workflow ToolandSubworkflownodes, making the workflow more concise. - Manual Trigger: Easily testable via the 'Test workflow' button.
- Clear Input Definition: Uses
Setnodes to define the AI agent's input prompts.
How To Use
- Trigger: Click the 'Test workflow' button in n8n to initiate the workflow.
- Web Scraping Scenario: The
Set ChatInputnode provides a prompt for theAI Agentto fetch GitHub issues from a specific URL. TheWebscraper Toolis invoked to perform the scraping. - Activity Suggestion Scenario: The
Set ChatInput1node provides a prompt for theAI Agent1to suggest an activity. TheActivity Toolis invoked to fulfill the request. - AI Model: Both AI agents are configured to use the
OpenAI Chat Model(credentials required). - Tool Descriptions: Each tool node (
Webscraper Tool,Activity Tool) includes atoolDescriptionthat guides the AI agent on how to use them.
Apps Used
Workflow JSON
{
"id": "4e84f959-8a99-437e-9fb2-7a62ca6f9bef",
"name": "AI Agent with API Tools",
"nodes": 14,
"category": "AI",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 4e84f959-8a99...
About the Author
N8N_Community_Pick
Curator
Hand-picked high quality workflows from the global community.
Statistics
Related Workflows
Discover more workflows you might like
Build an AI Documentation Expert Chatbot with Gemini RAG
This n8n workflow automates the creation of an AI-powered expert chatbot capable of answering questions based on your documentation. It intelligently ingests, cleans, and processes your knowledge base, preparing it for a Retrieval Augmented Generation (RAG) pipeline with Google Gemini.
Generate Multilingual Image Captions and Overlay
This workflow generates captions for images using Google Gemini and overlays them onto the image, with support for multilingual output.
LangChain Workflow Retriever Example
Demonstrates using LangChain's Retriever QA Chain to query data retrieved from another workflow.