AutomationFlowsWeb Scraping › Fedshield Auditbot V2 (s16)

Fedshield Auditbot V2 (s16)

FedShield AuditBot v2 (S16). Uses httpRequest. Webhook trigger; 5 nodes.

Webhook trigger★★★★☆ complexity5 nodesHTTP Request
Web Scraping Trigger: Webhook Nodes: 5 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": "FedShield AuditBot v2 (S16)",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "fedshield-chatbot-query",
        "responseMode": "responseNode",
        "authentication": "headerAuth",
        "options": {}
      },
      "id": "0a0a0a0a-0000-0000-0000-000000000001",
      "name": "FedShield Chatbot Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        240,
        300
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const body = $input.first().json.body || $input.first().json;\nconst question = body.question || '';\nconst companyId = body.companyId || null;\nconst inspectionId = body.inspectionId || null;\nconst history = Array.isArray(body.history) ? body.history : [];\nconst ctx = body.enrichedContext || {};\n\nconst systemPrompt = `Sei un consulente HSE esperto italiano per il software FedShield. Rispondi in italiano citando sempre il riferimento normativo esatto (D.Lgs 81/08, Reg. CE 852/2004, D.Lgs 231/01, ecc.). Per ogni non conformita rilevata suggerisci gravita (1-4), sanzionabilita (si/no) e servizio consigliato. NON inventare norme: se non sei sicuro dichiaralo. Risposte max 300 parole.`;\n\nconst companyLine = ctx.company ? `Nome: ${ctx.company.name}, ATECO: ${ctx.company.atecoCode}, Citta: ${ctx.company.city || 'N/D'}, Rischio: ${ctx.company.riskLevel || 'N/D'}` : 'N/D';\nconst trainingLine = ctx.training ? JSON.stringify(ctx.training).slice(0, 1500) : 'N/D';\nconst inspectionLine = ctx.inspection ? `Titolo: ${ctx.inspection.title}, Stato: ${ctx.inspection.status}` : 'Nessun audit attivo';\nconst historyLines = history.slice(-5).map((h) => `${h.role || 'user'}: ${h.content || h.message || ''}`).join('\\n');\n\nconst userPrompt = `CONTESTO AZIENDA:\\n${companyLine}\\n\\nSTATO FORMAZIONE:\\n${trainingLine}\\n\\nAUDIT IN CORSO:\\n${inspectionLine}\\n\\nSTORICO RECENTE:\\n${historyLines}\\n\\nDOMANDA CONSULENTE: ${question}`;\n\nreturn [{ json: { systemPrompt, userPrompt, _meta: { companyId, inspectionId, hasContext: !!ctx.company } } }];"
      },
      "id": "0a0a0a0a-0000-0000-0000-000000000002",
      "name": "Build AI Prompt",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://ollama.com/v1/chat/completions",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ model: 'gpt-oss:120b', messages: [{ role: 'system', content: $json.systemPrompt }, { role: 'user', content: $json.userPrompt }], stream: false, max_tokens: 800, temperature: 0.3 }) }}",
        "options": {
          "timeout": 30000
        }
      },
      "id": "0a0a0a0a-0000-0000-0000-000000000003",
      "name": "Ollama Cloud Chat",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        680,
        300
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const aiResp = $input.first().json || {};\nconst choices = aiResp.choices || [];\nconst content = choices[0] && choices[0].message ? (choices[0].message.content || '') : '';\nconst answer = String(content).trim() || 'Il modello AI non ha prodotto una risposta utilizzabile.';\nreturn [{ json: { answer, source: 'n8n', citations: [], timestamp: new Date().toISOString() } }];"
      },
      "id": "0a0a0a0a-0000-0000-0000-000000000004",
      "name": "Format Response Zod",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        900,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify($json) }}",
        "options": {}
      },
      "id": "0a0a0a0a-0000-0000-0000-000000000005",
      "name": "Respond to FedShield",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1120,
        300
      ]
    }
  ],
  "connections": {
    "FedShield Chatbot Webhook": {
      "main": [
        [
          {
            "node": "Build AI Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build AI Prompt": {
      "main": [
        [
          {
            "node": "Ollama Cloud Chat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Cloud Chat": {
      "main": [
        [
          {
            "node": "Format Response Zod",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Response Zod": {
      "main": [
        [
          {
            "node": "Respond to FedShield",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}

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

FedShield AuditBot v2 (S16). Uses httpRequest. Webhook trigger; 5 nodes.

Source: https://github.com/SkaRomance/FedShield/blob/19db549eb6d203ff7191d26ee796ccc000330fbc/infra/n8n/workflows/auditbot-workflow.json — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

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

Web Scraping

This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di

n8n, Execute Workflow Trigger, HTTP Request +1
Web Scraping

This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .

HTTP Request, Ssh
Web Scraping

This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c

HTTP Request
Web Scraping

Sign PDF documents with legally-compliant digital signatures using X.509 certificates. Supports multiple PAdES signature levels (B, T, LT, LTA) with optional visible stamps.

Execute Command, HTTP Request, Read Write File +1
Web Scraping

📡 This workflow serves as the central Alpha Vantage API fetcher for Tesla trading indicators, delivering cleaned 20-point JSON outputs for three timeframes: , , and . It is required by the following a

HTTP Request