Templates / Log AI agent runs in hash-chained receipts with OpenAI and Data Tables

Log AI agent runs in hash-chained receipts with OpenAI and Data Tables

Ready for 3.0

by Alexander Englund ✓ · 0 views · created 2026-10-09 · Engineering, AI Chatbot

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 39 nodes and runs when an HTTP POST request hits its webhook URL (plus 2 other triggers). Along the way it connects OpenAI Chat Model.

How it runs

Trigger: When an HTTP POST request hits its webhook URL (plus 2 other triggers).

  1. Settings (Edit Fields (Set)): sets 12 fields: model, system_message, max_output_tokens…
  2. Daily check settings (Edit Fields (Set)): sets 4 fields: owner_email, sender_email, email_when_intact…
  3. Load the client's chain (Data table): get
  4. Validate request (Code): runs custom JavaScript code
  5. Load the whole log (Data table): get
  6. Load the client's anchors (Data table): get
  7. Route the request (Switch): routes items into 3 branches
  8. Load saved anchors (Data table): get
  9. Verify the chain (Code): runs custom JavaScript code
  10. Client AI agent (AI Agent): runs an AI agent, with model: Chat model; 1 tool (Calculator)

…plus 24 more steps. See the full node list below.

Services it uses

OpenAI Chat Model

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (13)

From the author

Quick overview This workflow exposes webhook endpoints to run an OpenAI-powered agent per client, log each run into an n8n Data Table as a SHA-256 hash chain, and email daily integrity reports and anchors, with an additional verification endpoint clients can…

Excerpt from Alexander Englund's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.