AutomationFlowsAI & RAG › Automated Agent Orchestration & Failure Alerts

Automated Agent Orchestration & Failure Alerts

Original n8n title: Gfm 03 — Agent Orchestration

GFM 03 — Agent Orchestration. Uses httpRequest. Scheduled trigger; 8 nodes.

Cron / scheduled trigger★★★★☆ complexity8 nodesHTTP Request
AI & RAG Trigger: Cron / scheduled Nodes: 8 Complexity: ★★★★☆ Added:

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": "GFM 03 \u2014 Agent Orchestration",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 */2 * * *"
            }
          ]
        }
      },
      "id": "node-cron-2h",
      "name": "Schedule \u2014 every 2h (T1+T2)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.1,
      "position": [
        220,
        240
      ]
    },
    {
      "parameters": {
        "url": "={{$env.API_BASE || 'https://fdi-backend-api.gentleglacier-ae9701ca.uaenorth.azurecontainerapps.io'}}/api/v1/admin/run-agents?tier=t1t2",
        "method": "POST",
        "sendBody": false,
        "options": {
          "timeout": 120000,
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        }
      },
      "id": "node-http-run-agents",
      "name": "POST /admin/run-agents?tier=t1t2",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        460,
        240
      ]
    },
    {
      "parameters": {
        "functionCode": "// Track 3 consecutive zero-insert runs in n8n static data\nconst staticData = $getWorkflowStaticData('global');\nconst inserted = Number($json.inserted_count || 0);\nstaticData.zero_streak = inserted === 0 ? (staticData.zero_streak || 0) + 1 : 0;\nstaticData.last_inserted = inserted;\nstaticData.last_run_at = new Date().toISOString();\nreturn [{ json: { inserted_count: inserted, zero_streak: staticData.zero_streak, last_run_at: staticData.last_run_at, raw: $json } }];"
      },
      "id": "node-track",
      "name": "Track zero-insert streak",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        700,
        240
      ]
    },
    {
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{$json.zero_streak}}",
              "operation": "largerEqual",
              "value2": 3
            }
          ]
        }
      },
      "id": "node-if-streak",
      "name": "IF zero_streak >= 3",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        940,
        240
      ]
    },
    {
      "parameters": {
        "url": "={{$env.N8N_BASE_URL || 'http://localhost:5678'}}/webhook/failure-alert",
        "method": "POST",
        "sendBody": true,
        "contentType": "json",
        "jsonBody": "={\"severity\": \"critical\", \"source\": \"orchestration_t1t2\", \"title\": \"3 consecutive runs with 0 inserted signals\", \"details\": $json, \"timestamp\": $now}",
        "options": {}
      },
      "id": "node-fire-alert-orch",
      "name": "Fire Failure Alert",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1180,
        160
      ]
    },
    {
      "parameters": {
        "functionCode": "return [{ json: { ok: true, inserted: $json.inserted_count } }];"
      },
      "id": "node-noop-orch",
      "name": "OK \u2014 no action",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        1180,
        320
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 3 * * *"
            }
          ]
        }
      },
      "id": "node-cron-daily",
      "name": "Schedule \u2014 daily 03:00 UTC",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.1,
      "position": [
        220,
        480
      ]
    },
    {
      "parameters": {
        "url": "={{$env.API_BASE || 'https://fdi-backend-api.gentleglacier-ae9701ca.uaenorth.azurecontainerapps.io'}}/api/v1/admin/run-gfr-compute",
        "method": "POST",
        "sendBody": false,
        "options": {
          "timeout": 300000,
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        }
      },
      "id": "node-http-gfr",
      "name": "POST /admin/run-gfr-compute",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        460,
        480
      ]
    }
  ],
  "connections": {
    "Schedule \u2014 every 2h (T1+T2)": {
      "main": [
        [
          {
            "node": "POST /admin/run-agents?tier=t1t2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "POST /admin/run-agents?tier=t1t2": {
      "main": [
        [
          {
            "node": "Track zero-insert streak",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Track zero-insert streak": {
      "main": [
        [
          {
            "node": "IF zero_streak >= 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF zero_streak >= 3": {
      "main": [
        [
          {
            "node": "Fire Failure Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "OK \u2014 no action",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule \u2014 daily 03:00 UTC": {
      "main": [
        [
          {
            "node": "POST /admin/run-gfr-compute",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "saveExecutionProgress": true,
    "saveManualExecutions": true,
    "saveDataErrorExecution": "all",
    "saveDataSuccessExecution": "all"
  },
  "tags": [
    {
      "name": "gfm"
    },
    {
      "name": "orchestration"
    }
  ],
  "versionId": "phase14-03"
}
Pro

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

About this workflow

GFM 03 — Agent Orchestration. Uses httpRequest. Scheduled trigger; 8 nodes.

Source: https://github.com/Masaadany/Global-FDI-Monitor/blob/5110168690d0d180b053794713790fcd619a82fc/n8n/03_orchestration.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

Master Agent - Orchestrator. Uses httpRequest, telegram, telegramTrigger. Scheduled trigger; 46 nodes.

HTTP Request, Telegram, Telegram Trigger
AI & RAG

Reputation Engine — Content Research Agent. Uses httpRequest. Scheduled trigger; 45 nodes.

HTTP Request
AI & RAG

Master Agent - Orchestrator. Uses httpRequest, telegram, telegramTrigger. Scheduled trigger; 43 nodes.

HTTP Request, Telegram, Telegram Trigger
AI & RAG

Linkedin Workflow. Uses httpRequest, googleSheets. Scheduled trigger; 39 nodes.

HTTP Request, Google Sheets
AI & RAG

I prepared a detailed guide that shows the whole process of building an AI tool to analyze Instagram Reels using n8n.

HTTP Request, Airtable, Execute Workflow Trigger