AutomationFlowsAI & RAG › Document Classification with Verifiable Decision Receipts

Document Classification with Verifiable Decision Receipts

Document Classification with Verifiable Decision Receipts. Uses openAi, n8n-nodes-signatrust. Webhook trigger; 5 nodes.

Webhook trigger★★☆☆☆ complexityAI-powered5 nodesOpenAIN8N Nodes Signatrust
AI & RAG Trigger: Webhook Nodes: 5 Complexity: ★★☆☆☆ AI nodes: yes 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": "Document Classification with Verifiable Decision Receipts",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "doc-classification",
        "options": {},
        "responseMode": "responseNode"
      },
      "id": "a09c0a1f-84c5-400c-9cd8-f3f3190c4640",
      "name": "Document Classification",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        0,
        300
      ]
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "GPT-4O"
        },
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=You are a document classification AI. Return JSON: {\"class\":\"...\",\"sensitivity\":\"PUBLIC|INTERNAL|CONFIDENTIAL\",\"reason\":\"...\"}."
            },
            {
              "content": "=Return JSON only.\n\nInput:\n{{ JSON.stringify($json.body) }}"
            }
          ]
        },
        "jsonOutput": true,
        "options": {}
      },
      "id": "ac9c309e-6093-4885-8088-d860ff28fc78",
      "name": "AI Decision",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 2.1,
      "position": [
        220,
        300
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "generateReceipt",
        "agentName": "DocClassifierAgent",
        "workflowName": "={{ $workflow.name }}",
        "action": "={{ 'AI decision: ' + ($json.message.content.decision || $json.message.content.recommendation || 'completed') }}",
        "decision": "={{ JSON.stringify($json.message.content) }}",
        "additionalFields": {
          "modelProvider": "openai",
          "modelUsed": "gpt-4o",
          "decisionType": "document_classification",
          "riskLevel": "medium",
          "humanReview": false,
          "policies": "data-classification-v2",
          "permissions": "document.classify",
          "tags": "ops, dlp, governance"
        }
      },
      "id": "ae62bf4b-23e2-4786-854f-e8f87144ec86",
      "name": "Signatrust: Receipt",
      "type": "n8n-nodes-signatrust.signatrust",
      "typeVersion": 1,
      "position": [
        440,
        300
      ],
      "credentials": {
        "signatrustApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { status:\"OK\", receipt_id:$json.id, decision:$('AI Decision').item.json.message.content } }}",
        "options": {}
      },
      "id": "e0c26ee1-210b-408d-9ce5-cca9904c6394",
      "name": "Respond",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        660,
        300
      ]
    },
    {
      "parameters": {
        "content": "## Document Classification with Verifiable Decision Receipts\n**Why Signatrust?** Every AI decision here becomes a tamper-evident, Ed25519-signed receipt \u2014 verifiable for audits and disputes.",
        "height": 170,
        "width": 420,
        "color": 5
      },
      "id": "2807a376-1808-4fc4-95df-bb765758cb9a",
      "name": "Sticky Note eeaf5f",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -40,
        40
      ]
    }
  ],
  "connections": {
    "Document Classification": {
      "main": [
        [
          {
            "node": "AI Decision",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Decision": {
      "main": [
        [
          {
            "node": "Signatrust: Receipt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Signatrust: Receipt": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [
    {
      "name": "Document Classification \u2014 ops"
    },
    {
      "name": "Document Classification \u2014 dlp"
    },
    {
      "name": "Document Classification \u2014 governance"
    },
    {
      "name": "Signatrust (18)"
    }
  ],
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "versionId": "861c3c92-6f99-45fd-8462-4b8ddc0e8678"
}

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

Document Classification with Verifiable Decision Receipts. Uses openAi, n8n-nodes-signatrust. Webhook trigger; 5 nodes.

Source: https://github.com/abokenan444/n8n-signatrust-workflows/blob/main/workflows/18-document-classification.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

Anyone who wants to automatically aggregate their invoices or receipts. Main beneficiaries: small business owners and freelancers. Creates a folder in Google Drive for uploading invoices and receipts.

OpenAI, Google Drive, Gmail +1
AI & RAG

Automatically classifies incoming cold email replies as HOT, WARM, or COLD using AI and sends priority Telegram notifications with auto-acknowledgment for fast response times.

Stop And Error, OpenAI, Telegram +2
AI & RAG

Use Case: Analyze images with multiple subjects. In this use case I have a bookshelf and am extracting and verifying book titles/authors from a bookshelf photo.

OpenAI, HTTP Request
AI & RAG

Paperless-ngx Document Chat. Uses httpRequest, extractPdfContent, openAi. Webhook trigger; 9 nodes.

HTTP Request, Extract Pdf Content, OpenAI
AI & RAG

PDF to TXT Translator. Uses readBinaryFile, pdfExtract, openAi, writeBinaryFile. Webhook trigger; 8 nodes.

Read Binary File, Pdf Extract, OpenAI +1