> ## 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.issues

This event occurs when there is activity on a Linear issue, such as creation, editing, or state changes.

```python theme={null}
@on("linear.issues")
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": "47d4ba46-0f09-4216-97d8-350bb0bfc99f",
          "number": 14,
          "title": "Remove secrets from logs",
          "description": "During log processing, the same way we remove \"/#/\" log lines, we need to remove blocks secrets that are registered. Use the global and local environment variable / secret fetching logic we have and only mask secrets.",
          "priority": 0,
          "priorityLabel": "No priority",
          "state": {
              "id": "bfce67a7-30df-414a-a7d5-6a879f40d79e",
              "name": "Todo",
              "type": "unstarted",
              "color": "#e2e2e2"
          },
          "team": {
              "id": "8a193230-9912-4df9-ac1c-b712c36e9ca8",
              "key": "BLO",
              "name": "BlocksOrg"
          },
          "creator": {
              "id": "95e51d16-13d4-481e-bac9-9b0d6ef528ee",
              "name": "dev@blocks.team",
              "email": "dev@blocks.team"
          },
          "labels": [],
          "url": "https://linear.app/blocksorg/issue/BLO-14/remove-secrets-from-logs",
          "identifier": "BLO-14",
          "createdAt": "2025-06-04T03:17:18.674Z",
          "updatedAt": "2025-06-04T17:52:00.525Z"
      },
      "organization": {
          "id": "695d139f-6da4-46e0-a4ad-e6e5ba163b5a"
      },
  }
  ```

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

## Fields

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

  <Expandable title="action values">
    <ResponseField name="opened" type="string">
      The issue was opened.
    </ResponseField>

    <ResponseField name="edited" type="string">
      The issue was edited. For example, the title or description was changed.
    </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="color" type="string">
          The key of the team.
        </ResponseField>

        <ResponseField name="name" type="string">
          The name of the team.
        </ResponseField>
      </Expandable>
    </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="string">
  The orgnaization associated with the Linear project.

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