Create universal OpenAI-compatible API endpoints for multiple AI workflows
Ready for 3.0What this workflow does
This AI workflow has 18 nodes and runs when an HTTP GET request hits its webhook URL (plus 2 other triggers). Along the way it connects OpenAI Chat Model.
How it runs
Trigger: When an HTTP GET request hits its webhook URL (plus 2 other triggers).
- Get many workflows (n8n): uses n8n
- Remap to Response API Schema (Code): runs custom JavaScript code
- Powered By n8n Workflow Models (AI Agent): runs an AI agent, with model: n8n Webhooks; memory: Simple Memory
- Edit Fields (Edit Fields (Set)): sets 3 fields: name, id, path
- Is Stream? (If): checks a condition and branches into true / false
- Aggregate: combines items into one
- Call workflow webhook (HTTP Request): calls an HTTP API (POST)
- Call workflow webhook (HTTP Request): calls an HTTP API (POST)
- Models Response (Respond to Webhook): sends the response back to the webhook caller
- Format Stream Response (Code): runs custom JavaScript code
…plus 3 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (12)
- Aggregate
n8n-nodes-base.aggregate - Respond to Webhook
n8n-nodes-base.respondToWebhook - Webhook
n8n-nodes-base.webhook - n8n
n8n-nodes-base.n8n - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
From the author
N8n OpenAI-Compatible API Endpoints Transform your n8n workflows into OpenAI-compatible API endpoints, allowing you to access multiple workflows as selectable AI models through a single integration. What This Does This workflow creates two API endpoints that…