# Audit Event

Audit Event writes a persistent, structured business event to the audit trail. Use it to retain evidence of an important action such as a lead qualification, order approval, payment decision, document export, or human approval.

## Configuration

### Event name

Enter a stable business name describing what happened:

```text
lead.qualified
order.approved
document.exported
```

### Business target

The target identifies the business object concerned by the event.

- **Automatic (recommended):** no technical value is required. The workflow and node are attached to the audit record automatically.
- **Custom business target:** use a readable identifier such as `customer:{input.email}`, `order:{item.id}`, or `document:{state.document_id}`.

The internal value `workflow:{_workflow_ref}:node:{_active_node_id}` is a system identifier. Users do not need to enter or understand it.

### Event details

Add the business information to retain as a JSON object:

```json
{
  "email": "{state.customer.email}",
  "score": "{state.customer.score}",
  "decision": "qualified"
}
```

The payload must be a JSON object and cannot exceed 64 KB after rendering.

## Security and reliability

- Sensitive keys and values such as tokens, passwords, API keys, authorization headers, cookies, and signatures are automatically redacted.
- Replaying the same node in the same run does not create a duplicate audit row.
- The workflow, run, node, actor, execution surface, and creation time are recorded automatically.

## Runtime output

```json
{
  "audit_id": 123,
  "event_name": "lead.qualified",
  "action": "lead.qualified",
  "target": "customer:awa@example.com"
}
```

The result is available through `last_output_parsed` and `{outputs.<node_id>.parsed}`.

## Example workflow

The workflow card below loads a sample customer with Set State, then records a `lead.qualified` audit event.

---

*Source: https://agentbuilder.systalink.sn/docs/node-audit-event — human documentation.*
*Other language: [/docs-md/fr/node-audit-event.md](/docs-md/fr/node-audit-event.md).*
*Machine-readable index: [/llms.txt](/llms.txt).*
