n8n Log AI Agent Runs with Hash-Chained Receipts & OpenAI
n8n Log AI Agent Runs with Hash-Chained Receipts & OpenAI
Regular price
£36.99
Regular price
£36.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Log AI Agent Runs with Hash-Chained Receipts & OpenAI
Regular price
£36.99
Regular price
£36.99
Sale price
Unit price
/
per
Run an OpenAI AI agent with tamper-evident logging—every request gets a hash-chained receipt
This n8n workflow exposes secure webhook endpoints that run an OpenAI-powered agent per client, then records each run into an n8n Data Table using a SHA-256 hash chain. It also generates daily integrity reports and anchors and provides a verification endpoint for clients.
What this workflow does
-
Receives webhook runs via POST with
client_idandprompt, validating client and prompt rules and rejecting invalid requests immediately. - Executes a LangChain AI agent using OpenAI Chat (with an optional Calculator tool) to produce an answer or capture an agent failure.
- Creates a logged receipt by hashing the prompt and answer (optionally storing clipped text), counting model/tool calls, and tagging the outcome as ok, refused, or error.
-
Appends a new hash-chained entry into the
agent_run_logtable by linking to the latest entry’s hash, computing the nextentry_hash, and confirming canonical sequence (with short backoff retries on collisions). -
Returns the result with integrity proof including
seqandentry_hash. If reliable logging fails, it withholds the agent output and returns HTTP 503. -
Notifies the owner and verifies daily: a scheduled run recomputes and verifies all clients’ hash chains in
agent_run_log, stores anchors inagent_run_anchors, and emails a report (or failure notice).
Use cases
- SaaS operators needing auditable AI responses for compliance and dispute resolution.
- Automation engineers implementing tamper-evident agent logs for multi-tenant n8n apps.
- Teams that want client-accessible verification of each run via a dedicated endpoint.
Technical details
- n8n nodes/tools:
webhook,if,set,code,wait,switch - AI stack: LangChain AI agent with OpenAI Chat and optional Calculator tool
- Storage:
agent_run_logandagent_run_anchorsn8n Data Tables - Integrity: SHA-256 hash chaining, sequence verification, daily recomputation/anchoring
