Skip to main content

Find step-by-step recipes from API Ninjas Recipe API in an n8n AI agent

Workflow preview

Workflow preview
100%
Find step-by-step recipes from API Ninjas Recipe API in an n8n AI agent preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Video Introduction Want to automate your i...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.httprequesttool, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Milan Vasarhelyi - SmoothWork.

Original n8n.io source

1.1 Workflow description

Title
Find step-by-step recipes from API Ninjas Recipe API in an n8n AI agent
Workflow name
Find step-by-step recipes from API Ninjas Recipe API in an n8n AI agent

Video Introduction

Want to automate your inbox or need a custom workflow? πŸ“ž Book a Call | πŸ’¬ DM me on Linkedin

Workflow Overview

This workflow creates an intelligent AI chatbot that retrieves recipes from an external API through natural conversation. When users ask for recipes, the AI agent automatically determines when to use the recipe lookup tool, fetches real-time data from the API Ninjas Recipe API, and provides helpful, conversational responses. This demonstrates the powerful capability of API-to-API integration within n8n, allowing AI agents to access external data sources on demand.

Key Features

  • Intelligent Tool Calling: The AI agent automatically decides when to use the HTTP Request Tool based on user queries
  • External API Integration: Connects to API Ninjas Recipe API using Header Authentication for secure access
  • Conversational Memory: Maintains context across multiple turns for natural dialogue
  • Dynamic Query Generation: The AI model automatically generates the appropriate search query parameters based on user input

Common Use Cases

  • Build AI assistants that need access to real-time external data
  • Create chatbots with specialized knowledge from third-party APIs
  • Demonstrate API-to-API integration patterns for custom automation
  • Prototype AI agents with tool-calling capabilities

Setup & Configuration

Required Credentials:

  1. OpenAI API: Sign up at OpenAI and obtain an API key for the language model. Configure this in n8n's credential manager.
  2. API Ninjas: Register at API Ninjas to get your free API key for the Recipe API (supports 400+ calls/day). This API uses Header Authentication with the header name "X-Api-Key".

Agent Configuration:

The AI Agent includes a system message instructing it to "Always use the recipe tool if i ask you for recipe." This ensures the agent leverages the external API when appropriate. The HTTP Request Tool is configured with the API endpoint (https://api.api-ninjas.com/v1/recipe) and set to accept query parameters automatically from the AI model. The tool description "Use the query parameter to specify the food, and it will return a recipe" helps the AI understand when and how to use it.

Language Model: Currently configured to use OpenAI's gpt-5-mini, but you can change this to other compatible models based on your needs and budget.

Memory: Uses a window buffer to maintain conversation context, enabling natural multi-turn conversations where users can ask follow-up questions.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Chat Trigger - Receive Message

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.3

Block 2 - AI Agent - Route to Tools

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 3 - LLM - OpenAI Chat

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 4 - Recipe Tool - Fetch from API Ninjas

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 5 - Memory - Recent Messages (Window)

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 6 - Creator Contact Info

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Workflow Description

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Video Walkthrough

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Find step-by-step recipes from API Ninjas Recipe API in an n8n AI agent
Complexity intermediate
Nodes 8
Categories Support Chatbot, AI Chatbot
Author Milan Vasarhelyi - SmoothWork
Published 25 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7837/7837.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Find step-by-step recipes from API Ninjas Recipe API in an n8n AI agent do?

Video Introduction Want to automate your i...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.