On this page
Sommatic Docs
Open portal

Append Audit Log

Appends an immutable entry to the secure audit trail.

View as Markdown
Open in
Operations Partial audit.append Version 1.0.0 Execution: async

Writes one [AUDIT] <action> by <actor> on <resource> line to the orchestrator log and returns { success: true }. The record is not signed, hash-chained or stored anywhere else.

This operator ensures compliance and traceability by recording key decisions, data access, or modifications. Entries are signed and stored in a tamper-evident audit log.

Fields:

  • Actor: Who performed the action (User/Service).
  • Action: What happened (e.g., "Approved Loan").
  • Resource: Target entity (e.g., "Loan #123").
  • Evidence: JSON payload proving the action.

Use Cases:

  • Regulatory compliance (GDPR, HIPAA).
  • Debugging security incidents.
  • Tracking approval chains.

How it works

  1. Merges the input item with the resolved config (config wins).
  2. Throws Missing 'action', Missing 'actor' or Missing 'resource' when one of them is empty.
  3. Logs [AUDIT] <action> by <actor> on <resource> at info level. The audit object passed with it (decision, evidence, timestamp) is not written, because the runtime logger prints only the message.
  4. Returns { success: true } with no port, so the engine routes through out.

In a workflow

The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.

{
  "node_id": "node-audit-approval",
  "label": "Audit approval",
  "operator_slug": "audit.append",
  "operator_version": "1.0.0",
  "config": {
    "action": "INVOICE_APPROVED",
    "actor": "{{ $json.approver_id }}",
    "resource": "invoice:{{ $json.invoice_id }}",
    "decision": "Permit"
  }
}

Configuration

action string Required

The specific action identifier (e.g. "ITEM_DELETED").

Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.

Behaviour in the code

What the implementation does with these keys beyond what the schema says.

actor
Not in the config schema (only in the input contract), but read from the node config or, when unset there, from the input item: actor, resource, decision, evidence.

Output ports

success default

Never emitted: the worker returns no port, so the engine routes through out, which this node does not declare. Edges drawn from success never fire.

error

Never emitted: failures throw instead, which fails the run.

In expressions

What a later node can read from this node's output with $("Append Audit Log").item.json.<path>, as the workflow editor suggests it under Previous Nodes (the output contract).

Expression
$("Append Audit Log").item.json.successboolean

Errors

Message Port Cause and fix
Missing 'action' error action is set neither on the node nor in the input item. Thrown: the run fails.
Missing 'actor' error actor is set neither on the node nor in the input item. Thrown: the run fails.
Missing 'resource' error resource is set neither on the node nor in the input item. Thrown: the run fails.

Input contract

actor string Required

User ID or Service Name

resource string Required

Target Resource ID

decision string Optional

Outcome (e.g. Permit/Deny)

evidence object Optional

Supporting context/data

Output contract

success boolean Optional

Contracts (JSON Schema)

The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.

{
  "slug": "audit.append",
  "name": "Append Audit Log",
  "category": "ops",
  "version": "1.0.0",
  "description": "Appends an immutable entry to the secure audit trail.\n\n  This operator ensures compliance and traceability by recording key decisions, data access, or modifications. Entries are signed and stored in a tamper-evident audit log.\n\n  **Fields:**\n  - **Actor:** Who performed the action (User/Service).\n  - **Action:** What happened (e.g., \"Approved Loan\").\n  - **Resource:** Target entity (e.g., \"Loan #123\").\n  - **Evidence:** JSON payload proving the action.\n\n  **Use Cases:**\n  - Regulatory compliance (GDPR, HIPAA).\n  - Debugging security incidents.\n  - Tracking approval chains.",
  "capabilities": [
    "audit",
    "compliance",
    "security",
    "log"
  ],
  "config_schema": {
    "type": "object",
    "required": [
      "action"
    ],
    "properties": {
      "action": {
        "type": "string",
        "title": "Action Name",
        "description": "The specific action identifier (e.g. \"ITEM_DELETED\")."
      },
      "execution": {
        "type": "object",
        "title": "Execution Settings",
        "properties": {
          "alwaysOutputData": {
            "type": "boolean",
            "title": "Always Output Data",
            "description": "Always output data, even on error (if configured).",
            "default": false
          },
          "retryOnFail": {
            "type": "boolean",
            "title": "Retry On Fail",
            "description": "Retry the execution if it fails.",
            "default": false
          },
          "maxTries": {
            "type": "integer",
            "title": "Max Retries",
            "description": "Number of retries.",
            "default": 3,
            "displayOptions": {
              "show": {
                "retryOnFail": [
                  true
                ]
              }
            }
          },
          "waitBetweenTries": {
            "type": "integer",
            "title": "Wait Between Retries (ms)",
            "default": 1000,
            "displayOptions": {
              "show": {
                "retryOnFail": [
                  true
                ]
              }
            }
          },
          "continueOnFail": {
            "type": "boolean",
            "title": "Continue On Fail",
            "description": "Do not crash workflow on error.",
            "default": false
          },
          "timeout_ms": {
            "type": "integer",
            "title": "Timeout (ms)",
            "description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
            "default": 300000
          }
        }
      }
    }
  },
  "input_contract_schema": {
    "type": "object",
    "properties": {
      "actor": {
        "type": "string",
        "description": "User ID or Service Name"
      },
      "resource": {
        "type": "string",
        "description": "Target Resource ID"
      },
      "decision": {
        "type": "string",
        "description": "Outcome (e.g. Permit/Deny)"
      },
      "evidence": {
        "type": "object",
        "description": "Supporting context/data"
      }
    },
    "required": [
      "actor",
      "resource"
    ]
  },
  "output_contract_schema": {
    "type": "object",
    "description": "Confirmation of audit persistence.",
    "properties": {
      "success": {
        "type": "boolean"
      }
    }
  },
  "ports": [
    {
      "port_id": "success",
      "label": "Success",
      "is_default": true,
      "description": "Audit logged successfully."
    },
    {
      "port_id": "error",
      "label": "Error",
      "description": "Failed to write audit log."
    }
  ],
  "execution_mode": "async",
  "tags": [
    "audit",
    "compliance",
    "security"
  ],
  "is_stateful": false,
  "publisher": {
    "identity": "org_vectry",
    "profile": {
      "name": "Vectry Analytics",
      "verified": true,
      "url": "https://me.veripass.com/vectry",
      "logo_url": null
    }
  }
}

Execution

Execution
async
Stateful
No
Retries (retryOnFail)
No
Capabilities
auditcompliancesecuritylog
Tags
auditcompliancesecurity

Notes and limits

  • Partial: no signature, no hash chain, no tamper evidence and no database write. The only trace is a log line of the orchestrator, and its content is limited to action, actor and resource.
  • Use it as the last node of a branch: nodes wired after success never run. The node output in the run is { success: true }.
  • A thrown error fails the whole run with Node <node_id> (<slug>) failed: <message> and edges from error do not fire. Inside a flow.try scope the engine sends it to the catch node instead.
  • The execution settings (retryOnFail, maxTries, waitBetweenTries, continueOnFail, timeout_ms) are accepted, but neither this worker nor the engine applies them.

Reviewed against the orchestrator code · 31e874b · 2026-11-26

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs