> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/action-center/linear/create-task.md).

# Create Task

Creates one issue in a Linear team through the Linear GraphQL API. The issue description is a Markdown table of the matched device assets, with one column for each workflow column. Use it to hand a list of devices to the team that works the issue.

### Before you begin

* A Linear API key, and the exact name of the Linear team that should receive the issue.
* Asset type: **Device** (the only type this job accepts).
* No required columns. The table uses the device columns set for the workflow (see **Edit Columns** in [About Action Center](broken://pages/d730f9ced4283c28e39df4474a6a0d1b7a6854df)).
* Defaults: you can save the connection fields once under **Action Center** > **Settings** > **Linear**. See [Action Center Settings](broken://pages/63525047ef94772e1e2604cf772a9dc45e74117f).

### Settings

| Setting   | Type   | Required | Default | Description                                                                                                      |
| --------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------------------- |
| Api key   | Text   | Yes      | None    | Your Linear API key.                                                                                             |
| Title     | Text   | Yes      | None    | Issue Title.                                                                                                     |
| Team name | Text   | Yes      | None    | The team name you enter must exactly match the existing team name (the comparison ignores upper and lower case). |
| Priority  | Text   | No       | None    | The priority of the issue. 0 = No priority, 1 = Urgent, 2 = High, 3 = Normal, 4 = Low.                           |
| Timeout   | Number | No       | 30      | Timeout for Linear API requests in seconds.                                                                      |

{% hint style="warning" %}
The API key field is a plain text field, not a masked one. Restrict who can view Action Center settings accordingly.
{% endhint %}

### How it works

* The job first asks Linear for the list of teams and picks the one whose name equals **Team name**. If none matches, the job fails with `No team found, check your team name`.
* It then sends one issue creation request (an `issueCreate` mutation) with your **Title**, the team, the table as description and, when filled in, the **Priority**. One issue is created for all assets, not one per asset.
* The table has a header row with the workflow's device columns and one row per device. List values are joined with commas.
* The job does not check whether any asset matched. With no matched devices the issue is still created, with only the header row.
* If Linear cannot be reached or returns an error, the job fails with `Failed to connect to Linear API` or `Linear API error: <message>`. When Linear answers without an error but does not report success, the job only writes a warning to the log.
* The job passes on all assets it received, unchanged, through the **NEXT** edge.

### Example

```
Api key: YOUR_LINEAR_API_KEY
Title: Devices missing the EDR agent
Team name: Security
Priority: 2
Timeout: 30
```

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/d730f9ced4283c28e39df4474a6a0d1b7a6854df">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save defaults such as the Linear API key and team name.</td><td><a href="broken://pages/63525047ef94772e1e2604cf772a9dc45e74117f">Broken link</a></td></tr><tr><td><strong>Create Issue on Github</strong></td><td>Another job that opens a ticket with the matched assets.</td><td><a href="broken://pages/1c2e5047af1a3e3185cdf6b664a0417d87c0aa6f">Broken link</a></td></tr></tbody></table>

{% hint style="info" %}
Available starting from version 6.0.0.
{% endhint %}
