Production AI Playbook: Deterministic Steps & AI Steps (4 of 5)
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.
What this workflow does
This AI workflow has 11 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Guardrails and OpenAI Chat Model.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Extract Text (Code): runs custom JavaScript code
- Input Guardrails (Guardrails): uses Guardrails, with model: Input Guardrails LLM
- AI - Generate Response (AI Agent): runs an AI agent, with model: OpenAI Chat Model
- Respond - Input Blocked (Respond to Webhook): sends the response back to the webhook caller
- Output Guardrails (Guardrails): uses Guardrails, with model: Output Guardrails LLM
- Respond - Safe Output (Respond to Webhook): sends the response back to the webhook caller
- Respond - Flagged Output (Fallback) (Respond to Webhook): sends the response back to the webhook caller
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI - Generate Response (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI - Generate Response (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (6)
- Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - Guardrails
@n8n/n8n-nodes-langchain.guardrails - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Protect your workflows with n8n's native Guardrails node, placed before and after your AI step. The input guardrails catch jailbreak attempts and PII before they reach your model. The output guardrails scan AI responses for NSFW content and secret keys before…