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

# linear.issue_comment

```python theme={null}
@on("linear.issue_comment")
def agent(input):
    pass
```

The following is an example payload which is passed in as an argument to your agent's entrypoint:

<CodeGroup>
  ```json json theme={null}
  {
    "action": "create",
    "issue": {
      "id": "12345678-1234-1234-1234-123456789012",
      "number": 13,
      "title": "Support multiple agents",
      "description": "When I mention Blocks on slack like `@BlocksOrg /codex /gemini do xyz` \n\nWe want to be able to resolve multiple agents during the Trigger resolution service, and furthermore we want to ensure that we submit independent tasks for each (note the `is_allowed` and task session \"grouping\" logic w.r.t to uniq values / session URNs)\n\n> This might already be in place but want to double check this is the case ",
      "priority": 0,
      "priorityLabel": "No priority",
      "state": {
        "id": "abcd1234-5678-9012-3456-abcdef123456",
        "name": "Todo",
        "type": "unstarted",
        "color": "#e2e2e2"
      },
      "team": {
        "id": "team1234-5678-9012-3456-123456789012",
        "key": "TEAM",
        "name": "Example Team"
      },
      "assignee": undefined,
      "creator": {
        "id": "user1234-5678-9012-3456-123456789012",
        "name": "user@example.com",
        "email": "user@example.com"
      },
      "labels": [],
      "url": "https://linear.app/example-org/issue/TEAM-13/support-multiple-agents",
      "identifier": "TEAM-13",
      "createdAt": "2025-06-04T00:28:24.140Z",
      "updatedAt": "2025-09-10T01:35:32.510Z"
    },
    "organization": {
      "id": "org12345-1234-1234-1234-123456789012"
    },
    "$raw": {
      "action": "create",
      "createdAt": "2025-09-10T01:35:32.510Z",
      "data": {
        "id": "comment1-2345-6789-0123-456789012345",
        "createdAt": "2025-09-10T01:35:32.519Z",
        "updatedAt": "2025-09-10T01:35:32.510Z",
        "body": "@blocks  can you look into this?",
        "issueId": "12345678-1234-1234-1234-123456789012",
        "userId": "user1234-5678-9012-3456-123456789012",
        "reactionData": [],
        "botActor": null,
        "user": {
          "id": "user1234-5678-9012-3456-123456789012",
          "name": "user@example.com",
          "email": "user@example.com",
          "url": "https://linear.app/example-org/profiles/user"
        },
        "issue": {
          "id": "12345678-1234-1234-1234-123456789012",
          "title": "Support multiple agents",
          "teamId": "team1234-5678-9012-3456-123456789012",
          "team": {
            "id": "team1234-5678-9012-3456-123456789012",
            "key": "TEAM",
            "name": "Example Team"
          },
          "identifier": "TEAM-13",
          "url": "https://linear.app/example-org/issue/TEAM-13/support-multiple-agents"
        }
      },
      "url": "https://linear.app/example-org/issue/TEAM-13/support-multiple-agents#comment-comment1",
      "type": "Comment",
      "organizationId": "org12345-1234-1234-1234-123456789012"
    },
    "new_comment": {
      "id": "comment1-2345-6789-0123-456789012345",
      "body": "@blocks  can you look into this?",
      "user": {
        "id": "user1234-5678-9012-3456-123456789012",
        "name": "user@example.com",
        "email": "user@example.com"
      },
      "issue": {
        "id": "12345678-1234-1234-1234-123456789012",
        "identifier": "TEAM-13",
        "title": "Support multiple agents"
      },
      "createdAt": "2025-09-10T01:35:32.519Z",
      "updatedAt": "2025-09-10T01:35:32.510Z"
    }
  }
  ```

  ```python agent.py theme={null}
  def agent(input):
      action = input.get("action")
      issue = input.get("issue")
      organization = input.get("organization")
      raw_data = input.get("$raw")
      new_comment = input.get("new_comment")
  ```
</CodeGroup>

## Fields

<ResponseField name="action" type="string">
  The action that occurred on the issue comment.

  <Expandable title="action values">
    <ResponseField name="create" type="string">
      A comment was created on the issue.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="issue" type="object">
  The issue that the event is on.

  <Expandable title="issue properties">
    <ResponseField name="id" type="string">
      The id of the issue.
    </ResponseField>

    <ResponseField name="number" type="number">
      The number of the issue.
    </ResponseField>

    <ResponseField name="title" type="string">
      The title of the issue.
    </ResponseField>

    <ResponseField name="description" type="string">
      The description of the issue.
    </ResponseField>

    <ResponseField name="priority" type="number">
      The priority of the issue.
    </ResponseField>

    <ResponseField name="priorityLabel" type="string">
      The label for the priority.
    </ResponseField>

    <ResponseField name="state" type="object">
      The issue state.

      <Expandable title="state properties">
        <ResponseField name="id" type="string">
          The id of the state.
        </ResponseField>

        <ResponseField name="name" type="string">
          The name of the state.
        </ResponseField>

        <ResponseField name="type" type="string">
          The type of the state.
        </ResponseField>

        <ResponseField name="color" type="string">
          The color of the state.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="team" type="object">
      The issue team.

      <Expandable title="team properties">
        <ResponseField name="id" type="string">
          The id of the team.
        </ResponseField>

        <ResponseField name="key" type="string">
          The key of the team.
        </ResponseField>

        <ResponseField name="name" type="string">
          The name of the team.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="assignee" type="object|undefined">
      The assigned user for the issue. May be undefined if no one is assigned.
    </ResponseField>

    <ResponseField name="creator" type="object">
      The issue creator.

      <Expandable title="creator properties">
        <ResponseField name="id" type="string">
          The id of the creator.
        </ResponseField>

        <ResponseField name="name" type="string">
          The name of the creator.
        </ResponseField>

        <ResponseField name="email" type="string">
          The email of the creator.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="labels" type="object[]">
      The labels attached to the issue.
    </ResponseField>

    <ResponseField name="url" type="string">
      The url of the issue.
    </ResponseField>

    <ResponseField name="identifier" type="string">
      The identifier of the issue.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      The date/time the issue was created.
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      The date/time the issue was updated.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="organization" type="object">
  The organization associated with the Linear project.

  <Expandable title="organization properties">
    <ResponseField name="id" type="string">
      The Linear organization id.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="$raw" type="object">
  Raw webhook data from Linear containing additional metadata.

  <Expandable title="$raw properties">
    <ResponseField name="action" type="string">
      The action that triggered the webhook.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      When the webhook event was created.
    </ResponseField>

    <ResponseField name="url" type="string">
      Direct URL to the comment.
    </ResponseField>

    <ResponseField name="type" type="string">
      The type of Linear object (e.g., "Comment").
    </ResponseField>

    <ResponseField name="organizationId" type="string">
      The organization ID.
    </ResponseField>

    <ResponseField name="data" type="object">
      Detailed comment data from Linear.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="new_comment" type="object">
  The comment that was created on the issue.

  <Expandable title="new_comment properties">
    <ResponseField name="id" type="string">
      The id of the comment.
    </ResponseField>

    <ResponseField name="body" type="string">
      The content/body of the comment.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      When the comment was created.
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      When the comment was last updated.
    </ResponseField>

    <ResponseField name="user" type="object">
      The user who created the comment.

      <Expandable title="user properties">
        <ResponseField name="id" type="string">
          The id of the user.
        </ResponseField>

        <ResponseField name="name" type="string">
          The name of the user.
        </ResponseField>

        <ResponseField name="email" type="string">
          The email of the user.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="issue" type="object">
      Basic issue information for the comment.

      <Expandable title="issue properties">
        <ResponseField name="id" type="string">
          The id of the issue.
        </ResponseField>

        <ResponseField name="identifier" type="string">
          The identifier of the issue (e.g., "BLO-13").
        </ResponseField>

        <ResponseField name="title" type="string">
          The title of the issue.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>
