AutomationFlowsAI & RAG › Jour 5 - Agents Et Validation Humaine

Jour 5 - Agents Et Validation Humaine

Jour 5 - Agents et validation humaine. Uses agent, lmChatOpenAi. Event-driven trigger; 8 nodes.

Event trigger★★★★☆ complexityAI-powered8 nodesAgentOpenAI Chat
AI & RAG Trigger: Event Nodes: 8 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Agent → OpenAI Chat recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Jour 5 - Agents et validation humaine",
  "nodes": [
    {
      "parameters": {},
      "id": "d5-trigger",
      "name": "D\u00e9clencheur Manuel",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        120,
        400
      ]
    },
    {
      "parameters": {
        "mode": "manual",
        "includeOtherFields": true,
        "assignments": {
          "assignments": [
            {
              "id": "d5-system-chat",
              "name": "chatInput",
              "value": "Agent r\u00e9dacteur : r\u00e9dige une synth\u00e8se courte \u00e0 partir du cas d'audit ci-dessous.\n\nCas: exception EXC_URSSAF_AMOUNT_INCONSISTENT.\nConstat: montant URSSAF observ\u00e9 different du montant attendu base_urssaf * taux_urssaf.\nLimites: pas d'invention de faits, pas de d\u00e9cision finale, pas de source externe.\nRetour attendu: un brouillon lisible pour revue humaine.",
              "type": "string"
            },
            {
              "id": "d5-system-role",
              "name": "systemMessage",
              "value": "Tu es un agent r\u00e9dacteur d'audit paie. Tu travailles sur un seul cas, tu restes factuel, tu ne fabriques aucune preuve et tu n'approuves jamais la d\u00e9cision finale. R\u00e9ponds en fran\u00e7ais avec un brouillon de synth\u00e8se, les limites et le statut de validation humaine requis.",
              "type": "string"
            },
            {
              "id": "d5-system-note",
              "name": "validation_humaine_requise",
              "value": "true",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "d5-system",
      "name": "Prompt syst\u00e8me",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        360,
        400
      ]
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "={{ $json.systemMessage }}"
        }
      },
      "id": "d5-agent-redacteur",
      "name": "Agent r\u00e9dacteur",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.9,
      "position": [
        900,
        400
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4.1-nano",
          "mode": "id"
        },
        "options": {
          "temperature": 0
        }
      },
      "id": "d5-openai",
      "name": "OpenAI Gateway",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        900,
        620
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resume": "form",
        "formTitle": "Validation humaine \u2014 Jour 5",
        "formDescription": "Validez ou rejetez la synth\u00e8se du brouillon produit par l'agent unique. La d\u00e9cision finale reste humaine.",
        "formFields": {
          "values": [
            {
              "fieldType": "dropdown",
              "fieldLabel": "D\u00e9cision",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Valider"
                  },
                  {
                    "option": "Rejeter"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Commentaire",
              "requiredField": false
            }
          ]
        },
        "options": {}
      },
      "id": "d5-validation",
      "name": "Validation humaine",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1180,
        400
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d5-decision",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json[\"D\u00e9cision\"] }}",
              "rightValue": "Valider"
            }
          ]
        },
        "options": {}
      },
      "id": "d5-if-decision",
      "name": "D\u00e9cision valid\u00e9e ?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1420,
        400
      ]
    },
    {
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "d5-ok-status",
              "name": "statut",
              "value": "synthese_validee",
              "type": "string"
            },
            {
              "id": "d5-ok-output",
              "name": "synthese_finale",
              "value": "={{ $('Agent r\u00e9dacteur').item.json.output ?? $('Agent r\u00e9dacteur').item.json.text ?? $('Agent r\u00e9dacteur').item.json }}",
              "type": "string"
            },
            {
              "id": "d5-ok-comment",
              "name": "commentaire_humain",
              "value": "={{ $json[\"Commentaire\"] ?? '' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "d5-valid",
      "name": "Synth\u00e8se valid\u00e9e",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1660,
        300
      ]
    },
    {
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "d5-ko-status",
              "name": "statut",
              "value": "synthese_rejetee",
              "type": "string"
            },
            {
              "id": "d5-ko-output",
              "name": "synthese_brouillon",
              "value": "={{ $('Agent r\u00e9dacteur').item.json.output ?? $('Agent r\u00e9dacteur').item.json.text ?? $('Agent r\u00e9dacteur').item.json }}",
              "type": "string"
            },
            {
              "id": "d5-ko-comment",
              "name": "motif_rejet",
              "value": "={{ $json[\"Commentaire\"] ?? 'Motif non renseign\u00e9' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "d5-rejected",
      "name": "Synth\u00e8se rejet\u00e9e",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1660,
        500
      ]
    }
  ],
  "connections": {
    "D\u00e9clencheur Manuel": {
      "main": [
        [
          {
            "node": "Prompt syst\u00e8me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prompt syst\u00e8me": {
      "main": [
        [
          {
            "node": "Agent r\u00e9dacteur",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agent r\u00e9dacteur": {
      "main": [
        [
          {
            "node": "Validation humaine",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validation humaine": {
      "main": [
        [
          {
            "node": "D\u00e9cision valid\u00e9e ?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "D\u00e9cision valid\u00e9e ?": {
      "main": [
        [
          {
            "node": "Synth\u00e8se valid\u00e9e",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Synth\u00e8se rejet\u00e9e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Gateway": {
      "ai_languageModel": [
        [
          {
            "node": "Agent r\u00e9dacteur",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "description": "Jour 5 - Agents et validation humaine: un seul agent, son n\u0153ud mod\u00e8le requis, un prompt syst\u00e8me, une pause HITL et une bifurcation valider/rejeter."
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Jour 5 - Agents et validation humaine. Uses agent, lmChatOpenAi. Event-driven trigger; 8 nodes.

Source: https://github.com/ssime-git/deloitte-ia-nocode/blob/a1a6947327f3668e93488e1724ce3147dcedf09b/n8n/workflows/day5_agents_hitl.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

K&S-Media Downloadliste SQL. Uses httpRequest, agent, googleSheets, lmChatOpenAi. Event-driven trigger; 97 nodes.

HTTP Request, Agent, Google Sheets +3
AI & RAG

🎯 Create viral TikToks, Shorts, Reels, podcasts, and ASMR videos in minutes — all on autopilot.

OpenAI, HTTP Request, Form Trigger +7
AI & RAG

BoomerBobBot.TP. Uses agent, telegramTrigger, telegram, memoryBufferWindow. Event-driven trigger; 95 nodes.

Agent, Telegram Trigger, Telegram +10
AI & RAG

Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.

@Blotato/N8N Nodes Blotato, Google Sheets, OpenAI Chat +9
AI & RAG

RAG CHATBOT Main. Uses telegram, telegramTrigger, lmChatOpenAi, n8n-nodes-mcp. Event-driven trigger; 87 nodes.

Telegram, Telegram Trigger, OpenAI Chat +8