> For the complete documentation index, see [llms.txt](https://api-docs.intratool.help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.intratool.help/api-reference/automation/action-types/create-task-assignment.md).

# CreateTaskAssignment

Creates a new [`TaskAssignment`](/api-reference/tasks-2/task-assignments.md) when the [action](/api-reference/automation/actions.md) is executed.

The `description` config key uses the shared [Rich Text](/introduction/rich-text.md) HTML format and can contain [system variables](/introduction/system-variables.md).

## Type key

`createTaskAssignment`

## Start Date Types <a href="#start-date-types" id="start-date-types"></a>

* `now` - Uses the time at which the Action runs.
* `form_field_result` - Resolves the start date from a form-field result.
* `task_execution_ended_at` - Uses the related Task Execution's completion time.
* `task_execution_for_execution_date` - Resolves the start date from a Task Execution for the execution date.
* `null` - Does not apply a start-date strategy.

## Config keys

| Key                                            | Type                  | Required | Description                                                                                                                                           |
| ---------------------------------------------- | --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title`                                        | `string`              | yes      | Title of the created task assignment using a validated [rendered template](/introduction/system-variables.md#rendered-templates).                     |
| `description`                                  | `string` \| `null`    | no       | Rich-text description using a validated [rendered template](/introduction/system-variables.md#rendered-templates).                                    |
| `task_template_id`                             | `integer`             | yes      | ID of the task template used for the created assignment.                                                                                              |
| `start_date_type`                              | `string` \| `null`    | no       | Selects one of the supported [Start Date Types](#start-date-types).                                                                                   |
| `start_date_type_form_field_id`                | `integer` \| `null`   | no       | Form field ID used by specific start-date strategies.                                                                                                 |
| `start_date_shift_interval`                    | `string` \| `null`    | no       | ISO 8601 duration string (`DateInterval` compatible) that shifts the resolved start date (e.g. `PT2H`, `P1D`) or `null`.                              |
| `executable_before_interval`                   | `string` \| `null`    | no       | ISO 8601 duration string (`DateInterval` compatible) used as execution window before start date (e.g. `PT30M`) or `null`.                             |
| `executable_after_interval`                    | `string` \| `null`    | no       | ISO 8601 duration string (`DateInterval` compatible) used as execution window after start date (e.g. `P1D`) or `null`.                                |
| `show_before_interval`                         | `string` \| `null`    | no       | ISO 8601 duration string (`DateInterval` compatible) that defines how long before start date the assignment becomes visible (e.g. `PT15M`) or `null`. |
| `computed_targetables_workflow_node_index`     | `integer` \| `null`   | no       | Workflow node index used by workflow-node targetable computation.                                                                                     |
| `computed_targetables_system_variable`         | `string` \| `null`    | no       | [Key-only System Variable](/introduction/system-variables.md#key-only-values) used for computed targetables.                                          |
| `computed_targetables_entity_select_field_ids` | `integer[]` \| `null` | no       | Entity-select field IDs used for computed targetables.                                                                                                |
| `exclude_executing_targetable`                 | `boolean`             | yes      | Excludes the currently executing user/department from targetables.                                                                                    |
| `user_confirmation_required`                   | `boolean`             | yes      | Whether assignees must explicitly confirm.                                                                                                            |
| `delayed_reason_required`                      | `boolean`             | yes      | Whether a delay reason is mandatory.                                                                                                                  |
| `deny_reason_required`                         | `boolean`             | yes      | Whether a deny reason is mandatory.                                                                                                                   |
| `reset_allowed`                                | `boolean`             | yes      | Whether resetting assignment execution is allowed.                                                                                                    |

## Example config

```json
{
  "title": "Follow-up",
  "description": "<p>Please verify completion.</p>",
  "task_template_id": 12,
  "start_date_type": "now",
  "start_date_shift_interval": "PT2H",
  "executable_before_interval": "PT30M",
  "executable_after_interval": "P1D",
  "show_before_interval": "PT15M",
  "exclude_executing_targetable": false,
  "user_confirmation_required": true,
  "delayed_reason_required": false,
  "deny_reason_required": false,
  "reset_allowed": true
}
```

## Available computed targetable types

All of [computed targetable types](/introduction/assignment-and-targeting.md) are available for `createTaskAssignment` Action type.
