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

# action_log.completed

Triggered when an action log completes successfully.

## Event Type

`action_log.completed`

## Description

This event is fired whenever an action log (such as a message, tool call, or follow-up) completes successfully. Use this event to track agent activity and respond to completed actions in real-time.

## Payload Structure

<ResponseField name="event" type="string" required>
  The event type: `action_log.completed`
</ResponseField>

<ResponseField name="actionLog" type="object">
  The completed action log object

  <Expandable title="actionLog">
    <ResponseField name="id" type="string" required>
      Unique identifier for the action log
    </ResponseField>

    <ResponseField name="type" type="string" required>
      Type of action: `SYSTEM_NOTE`, `MESSAGE`, `FOLLOW_UP_MESSAGE`, `TOOL_CALL`, `DOCUMENT_UPLOAD`, `MANUAL_UPDATE`, `PORTAL_UPDATE`, `PORTAL_SUBMISSION`
    </ResponseField>

    <ResponseField name="status" type="string" required>
      Status of the action: `COMPLETED`
    </ResponseField>

    <ResponseField name="leadId" type="string" required>
      ID of the lead associated with this action
    </ResponseField>

    <ResponseField name="summary" type="string">
      Brief summary of the action
    </ResponseField>

    <ResponseField name="input" type="object">
      Input data for the action (varies by action type)
    </ResponseField>

    <ResponseField name="output" type="object">
      Output data from the action (if applicable)
    </ResponseField>

    <ResponseField name="messages" type="array">
      Array of messages if the action type is `MESSAGE` or `FOLLOW_UP_MESSAGE`

      <Expandable title="messages">
        <ResponseField name="id" type="string">
          Unique identifier for the message
        </ResponseField>

        <ResponseField name="channel" type="string">
          Channel of the message
        </ResponseField>

        <ResponseField name="direction" type="string">
          Direction of the message
        </ResponseField>

        <ResponseField name="subject" type="string">
          Subject of the message
        </ResponseField>

        <ResponseField name="body" type="string">
          Body of the message
        </ResponseField>

        <ResponseField name="documents" type="array">
          Array of documents associated with the message

          <Expandable title="documents">
            <ResponseField name="id" type="string">
              Unique identifier for the document
            </ResponseField>

            <ResponseField name="filename" type="string">
              Filename of the document
            </ResponseField>

            <ResponseField name="mimeType" type="string">
              MIME type of the document
            </ResponseField>

            <ResponseField name="size" type="number">
              Size of the document
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="completedAt" type="string">
      ISO 8601 timestamp when the action was completed
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="workspaceId" type="string" required>
  ID of the workspace this event belongs to
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "event": "action_log.completed",
    "actionLog": {
      "id": "59ac65a5-33fe-43a6-924b-134c582a285e",
      "type": "MESSAGE",
      "status": "COMPLETED",
      "leadId": "4cc8af99-b313-4c1f-b98b-009f38a4721a",
      "summary": "Incoming email: docs",
      "input": {
        "channel": "EMAIL",
        "direction": "INBOUND",
        "metadata": {
          "agentMailData": {
            "to": ["Mark Ding <mark-local@agent.getomni.ai>"],
            "from": "Mark Ding <markdingkl@gmail.com>",
            "subject": "docs"
          }
        }
      },
      "output": null,
      "messages": [
        {
          "id": "2421bef7-95bc-4546-92a3-c7e5600fbb6a",
          "body": "<div dir=\"ltr\"><br></div>\n",
          "channel": "EMAIL",
          "subject": "docs",
          "direction": "INBOUND",
          "documents": [
              {
                  "id": "2421bef7-95bc-4546-92a3-c7e5600fbb6a",
                  "filename": "docs.pdf",
                  "mimeType": "application/pdf",
                  "size": 1000
              }
          ]
        }
      ],
      "completedAt": "2025-10-30T20:07:17.553Z"
    },
    "workspaceId": "6048d78a-584a-4f1e-9e39-e011ca4cc48c"
  }
  ```
</ResponseExample>
