> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Log Message

Write a message to the workflow run log. Supports variables like {{node.result.field}}. Helpful for debugging and tracking execution.

Built-in action Built In

Write a message to the workflow run log. Supports variables like &#123;&#123;node.result.field&#125;&#125;. Helpful for debugging and tracking execution.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `log` |
| Category | Built In |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `logging`, `debugging`, `output`, `utility` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | `string` | Yes | Message to log. Supports template variables like &#123;&#123;node.result.field&#125;&#125;, &#123;&#123;$item&#125;&#125;, &#123;&#123;$index&#125;&#125; |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | `string` | Yes | The formatted log message with resolved template variables |
| `loggedAt` | `string` | Yes | ISO 8601 timestamp when the log was created |

## Examples

**Workflow node**

```json
{
  "type": "log",
  "payload": {
    "message": "Processing item {{$item}} at index {{$index}}"
  },
  "children": []
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/log/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "message": "Processing item {{$item}} at index {{$index}}"
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.