On this page
Sommatic Docs
Open portal

Create Task

Creates a human task in the Work Management system.

View as Markdown
Open in
Human in the loop Available human.task.create Version 1.0.0 Execution: async

Creates a Work Management task in the Sommatic AI backend and continues at once through created; the run does not wait for the person.

How it works

  1. Resolves the config and merges it over the incoming payload: every field can come from the config or from the same key in the payload (config wins).
  2. Checks organization_id, title, type.name and priority.name.
  3. Picks the dual-mode values: the assignee from assignee (assignee_mode specific_user) or assignee_custom (custom); the project from project_id (picker) or project_id_expression (expression); the due date from due_at (picker) or due_at_expression (expression).
  4. Builds sla: a due date (ISO 8601 or epoch milliseconds) becomes { due_at: "<epoch ms>", sla_ms: <due - now>, is_overdue }; a configured sla_ms replaces the computed one; an unparsable due date is stored as given.
  5. Builds the task with status queued, source workflow, the assignee as { assignee_type: "user", user: { identity, profile: { primary_email_address: identity } } } (or null), payload { summary, evidence, linked_entities }, required_output, outputs and context.reminders.
  6. Posts it to the backend Work Management task API. With a user assignee the backend claims the task for that user (status claimed); without one it stays queued, scoped by project_id.
  7. Returns { task_id, task_title, task_type, has_hag, status } through created.

In a workflow

The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.

{
  "node_id": "node-review-refund",
  "label": "Review refund",
  "operator_slug": "human.task.create",
  "operator_version": "1.0.0",
  "config": {
    "organization_id": "<organization_id>",
    "title": "Review refund for {{ $json.order_id }}",
    "description": "Customer requested a refund of {{ $json.amount }}.",
    "type": {
      "id": 10,
      "name": "approval",
      "title": "Approval",
      "color": "#0288d1"
    },
    "priority": {
      "id": 3,
      "name": "high",
      "title": "High",
      "color": "#f57c00"
    },
    "assignee_mode": "specific_user",
    "assignee": "reviewer@example.com",
    "due_at_mode": "expression",
    "due_at_expression": "{{ $now.plus({ days: 2 }).toISO() }}",
    "reminders": true,
    "payload": {
      "summary": "Refund request for {{ $json.order_id }}",
      "evidence": [],
      "linked_entities": []
    },
    "has_hag": true
  }
}

Configuration

organization_id string Required

Organization ID that owns this task

title string Required Accepts expressions

Short summary. Supports expressions like {{ $json.title }}.

description string Optional Accepts expressions

Detailed instructions for the assignee. Supports expressions and multi-line text.

type object Required

Approval | Data Completion | Review | Resolution | Delegation

priority object Required

Default: {"id":2,"name":"medium","title":"Medium","color":"#1976d2"}

project_mode string Optional

Picker: select a project. Expression: derive the project id dynamically (e.g. by ingress mailbox).

Default: picker

Allowed values: pickerexpression

project_id string Optional

Project this task belongs to (scopes visibility and grouping).

Shown when: project_mode = picker

project_id_expression string Optional Accepts expressions

Return a project id string. Example: {{ $json.project_id }}.

Shown when: project_mode = expression

assignee_mode string Optional

Specific User: pick from your organization. Custom: provide an identity or expression.

Default: specific_user

Allowed values: specific_usercustom

assignee string Optional

Single user the task will be assigned to

Shown when: assignee_mode = specific_user

assignee_custom string Optional Accepts expressions

Use {{ $json.user_id }} or a literal identity string.

Shown when: assignee_mode = custom

due_at_mode string Optional

Default: picker

Allowed values: pickerexpression

due_at string Optional

Stored as Unix milliseconds string.

Shown when: due_at_mode = picker

due_at_expression string Optional Accepts expressions

Return ISO 8601 or Unix millis. Example: {{ $now.plus({days: 3}).toISO() }}

Shown when: due_at_mode = expression

sla_ms integer Optional

Optional. Time allowed to complete the task once assigned.

Default: 86400000

reminders boolean Optional

Default: true

required_output object Optional

JSON Schema describing the data the assignee must provide on completion, plus UI hints for rendering the form.

outputs object Optional

Optional. Free-schema answer already produced by an upstream node (e.g. classifier or resolver) that the human merely verifies, edits, or rejects. Maps to Task.outputs. Distinct from "Payload" (which is the operator-facing context: summary + evidence + linked_entities).

payload object Optional

Summary, evidence blocks and linked entities passed to the assignee for context.

has_hag boolean Optional

Requires a downstream Human Approval Gate node.

Default: false

Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.

Behaviour in the code

What the implementation does with these keys beyond what the schema says.

type
An object { id, name, title, color } from the backend catalog: approval (10), data_completion (11), review (12), resolution (13), delegation (14). The worker only checks that name exists.
priority
An object from the catalog low (1), medium (2), high (3), critical (4).
assignee
A user identity; it is also stored as the user primary email, so use the email identity. Only user assignees are produced: group assignees are not supported by this node.
payload
Only summary, evidence (array) and linked_entities (array) are kept. When payload is not configured, those keys are read from the incoming payload. Legacy aliases task_payload, task_required_output and task_outputs are also read.
has_hag
Only echoed in the output. The editor requires a human.approval.gate right after the node when it is true.

Output ports

created default

The backend returned a task id. status is the status object the backend returned.

Data
{
  "port": "created",
  "task_id": "task-xxxxxxxxxxxxxxx",
  "task_title": "Review refund for ord_123",
  "task_type": {
    "id": 10,
    "name": "approval",
    "title": "Approval",
    "color": "#0288d1"
  },
  "has_hag": true,
  "status": {
    "id": 5,
    "name": "claimed",
    "title": "Claimed",
    "color": "#5e35b1"
  }
}
error

A required field is missing or the backend call failed.

Data
{
  "port": "error",
  "error": "Missing 'title'"
}

In expressions

What a later node can read from this node's output with $("Create Task").item.json.<path> (write your node's label instead of Create Task). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through created, from the output shown in Ports.

ExpressionEditorWorker
$("Create Task").item.json.task_idstring= "task-xxxxxxxxxxxxxxx"
$("Create Task").item.json.task_titlestring= "Review refund for ord_123"
$("Create Task").item.json.task_typeobject= {…}
$("Create Task").item.json.has_hagboolean= true
$("Create Task").item.json.statusstring= {…}
$("Create Task").item.json.portstringNot suggested by the editor= "created"—
$("Create Task").item.json.task_type.idnumberNot suggested by the editor= 10—
$("Create Task").item.json.task_type.namestringNot suggested by the editor= "approval"—
$("Create Task").item.json.task_type.titlestringNot suggested by the editor= "Approval"—
$("Create Task").item.json.task_type.colorstringNot suggested by the editor= "#0288d1"—
$("Create Task").item.json.status.idnumberNot suggested by the editor= 5—
$("Create Task").item.json.status.namestringNot suggested by the editor= "claimed"—
$("Create Task").item.json.status.titlestringNot suggested by the editor= "Claimed"—
$("Create Task").item.json.status.colorstringNot suggested by the editor= "#5e35b1"—

— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).

Errors

Message Port Cause and fix
Missing 'organization_id' error Not in the config nor in the payload. It is not taken from the run identity.
Missing 'title' error title is empty after resolving expressions.
Missing 'type' or invalid type object error type is missing or has no name.
Missing 'priority' or invalid priority object error priority is missing or has no name.
Backend did not return a task id error The backend answered without result.id.
Request failed with status code <status> error The backend rejected the task.
services.apiManager.uri is not resolved in dependencies.config — check Link Loom Cloud environment config. error The orchestrator has no backend address configured. This is a service configuration problem, not a node problem.

Input contract

organization_id string Optional
title string Optional
description string Optional
type object Optional
priority object Optional
project_mode string Optional
project_id string Optional
project_id_expression string Optional
assignee_mode string Optional
assignee string Optional
assignee_custom string Optional
due_at_mode string Optional
due_at string Optional
due_at_expression string Optional
sla_ms integer Optional
reminders boolean Optional
required_output object Optional
outputs object Optional
payload object Optional
has_hag boolean Optional

Output contract

task_id string Optional
task_title string Optional
task_type object Optional
has_hag boolean Optional
status string Optional

Contracts (JSON Schema)

The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.

{
  "slug": "human.task.create",
  "name": "Create Task",
  "category": "hitl",
  "version": "1.0.0",
  "description": "Creates a human task in the Work Management system.",
  "capabilities": [
    "task",
    "human",
    "workflow"
  ],
  "config_schema": {
    "type": "object",
    "required": [
      "title",
      "organization_id",
      "type",
      "priority"
    ],
    "properties": {
      "organization_id": {
        "type": "string",
        "title": "Organization",
        "description": "Organization ID that owns this task",
        "default_from": "auth.organization_id"
      },
      "title": {
        "type": "string",
        "title": "Task Title",
        "format": "expression",
        "description": "Short summary. Supports expressions like {{ $json.title }}."
      },
      "description": {
        "type": "string",
        "title": "Description",
        "format": "expression",
        "description": "Detailed instructions for the assignee. Supports expressions and multi-line text."
      },
      "type": {
        "type": "object",
        "title": "Task Type",
        "ui_widget": "task_type_picker",
        "description": "Approval | Data Completion | Review | Resolution | Delegation"
      },
      "priority": {
        "type": "object",
        "title": "Priority",
        "ui_widget": "task_priority_picker",
        "default": {
          "id": 2,
          "name": "medium",
          "title": "Medium",
          "color": "#1976d2"
        }
      },
      "project_mode": {
        "type": "string",
        "title": "Project mode",
        "enum": [
          "picker",
          "expression"
        ],
        "default": "picker",
        "description": "Picker: select a project. Expression: derive the project id dynamically (e.g. by ingress mailbox)."
      },
      "project_id": {
        "type": "string",
        "title": "Project",
        "ui_widget": "project_picker",
        "description": "Project this task belongs to (scopes visibility and grouping).",
        "displayOptions": {
          "show": {
            "project_mode": [
              "picker"
            ]
          }
        }
      },
      "project_id_expression": {
        "type": "string",
        "title": "Project id expression",
        "format": "expression",
        "description": "Return a project id string. Example: {{ $json.project_id }}.",
        "displayOptions": {
          "show": {
            "project_mode": [
              "expression"
            ]
          }
        }
      },
      "assignee_mode": {
        "type": "string",
        "title": "Assignee mode",
        "enum": [
          "specific_user",
          "custom"
        ],
        "default": "specific_user",
        "description": "Specific User: pick from your organization. Custom: provide an identity or expression."
      },
      "assignee": {
        "type": "string",
        "title": "User",
        "ui_widget": "user_picker",
        "ui_options": {
          "allow_assign_to_me": true
        },
        "description": "Single user the task will be assigned to",
        "displayOptions": {
          "show": {
            "assignee_mode": [
              "specific_user"
            ]
          }
        }
      },
      "assignee_custom": {
        "type": "string",
        "title": "Custom assignee (identity or expression)",
        "format": "expression",
        "description": "Use {{ $json.user_id }} or a literal identity string.",
        "displayOptions": {
          "show": {
            "assignee_mode": [
              "custom"
            ]
          }
        }
      },
      "due_at_mode": {
        "type": "string",
        "title": "Due date source",
        "enum": [
          "picker",
          "expression"
        ],
        "default": "picker"
      },
      "due_at": {
        "type": "string",
        "title": "Due Date",
        "format": "date-time",
        "description": "Stored as Unix milliseconds string.",
        "displayOptions": {
          "show": {
            "due_at_mode": [
              "picker"
            ]
          }
        }
      },
      "due_at_expression": {
        "type": "string",
        "title": "Due date expression",
        "format": "expression",
        "description": "Return ISO 8601 or Unix millis. Example: {{ $now.plus({days: 3}).toISO() }}",
        "displayOptions": {
          "show": {
            "due_at_mode": [
              "expression"
            ]
          }
        }
      },
      "sla_ms": {
        "type": "integer",
        "title": "SLA duration (ms)",
        "description": "Optional. Time allowed to complete the task once assigned.",
        "default": 86400000
      },
      "reminders": {
        "type": "boolean",
        "title": "Enable Reminders",
        "default": true
      },
      "required_output": {
        "type": "object",
        "title": "Required Output",
        "description": "JSON Schema describing the data the assignee must provide on completion, plus UI hints for rendering the form."
      },
      "outputs": {
        "type": "object",
        "title": "Pre-computed Outputs",
        "description": "Optional. Free-schema answer already produced by an upstream node (e.g. classifier or resolver) that the human merely verifies, edits, or rejects. Maps to Task.outputs. Distinct from \"Payload\" (which is the operator-facing context: summary + evidence + linked_entities)."
      },
      "payload": {
        "type": "object",
        "title": "Payload",
        "description": "Summary, evidence blocks and linked entities passed to the assignee for context."
      },
      "has_hag": {
        "type": "boolean",
        "title": "Has Human Approval",
        "description": "Requires a downstream Human Approval Gate node.",
        "default": false
      },
      "execution": {
        "type": "object",
        "title": "Execution Settings",
        "properties": {
          "alwaysOutputData": {
            "type": "boolean",
            "title": "Always Output Data",
            "description": "Always output data, even on error (if configured).",
            "default": false
          },
          "retryOnFail": {
            "type": "boolean",
            "title": "Retry On Fail",
            "description": "Retry the execution if it fails.",
            "default": false
          },
          "maxTries": {
            "type": "integer",
            "title": "Max Retries",
            "description": "Number of retries.",
            "default": 3,
            "displayOptions": {
              "show": {
                "retryOnFail": [
                  true
                ]
              }
            }
          },
          "waitBetweenTries": {
            "type": "integer",
            "title": "Wait Between Retries (ms)",
            "default": 1000,
            "displayOptions": {
              "show": {
                "retryOnFail": [
                  true
                ]
              }
            }
          },
          "continueOnFail": {
            "type": "boolean",
            "title": "Continue On Fail",
            "description": "Do not crash workflow on error.",
            "default": false
          },
          "timeout_ms": {
            "type": "integer",
            "title": "Timeout (ms)",
            "description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
            "default": 300000
          }
        }
      }
    }
  },
  "input_contract_schema": {
    "type": "object",
    "properties": {
      "organization_id": {
        "type": "string"
      },
      "title": {
        "type": "string"
      },
      "description": {
        "type": "string"
      },
      "type": {
        "type": "object"
      },
      "priority": {
        "type": "object"
      },
      "project_mode": {
        "type": "string"
      },
      "project_id": {
        "type": "string"
      },
      "project_id_expression": {
        "type": "string"
      },
      "assignee_mode": {
        "type": "string"
      },
      "assignee": {
        "type": "string"
      },
      "assignee_custom": {
        "type": "string"
      },
      "due_at_mode": {
        "type": "string"
      },
      "due_at": {
        "type": "string"
      },
      "due_at_expression": {
        "type": "string"
      },
      "sla_ms": {
        "type": "integer"
      },
      "reminders": {
        "type": "boolean"
      },
      "required_output": {
        "type": "object"
      },
      "outputs": {
        "type": "object"
      },
      "payload": {
        "type": "object"
      },
      "has_hag": {
        "type": "boolean"
      }
    }
  },
  "output_contract_schema": {
    "type": "object",
    "properties": {
      "task_id": {
        "type": "string"
      },
      "task_title": {
        "type": "string"
      },
      "task_type": {
        "type": "object"
      },
      "has_hag": {
        "type": "boolean"
      },
      "status": {
        "type": "string"
      }
    }
  },
  "ports": [
    {
      "port_id": "created",
      "label": "Created",
      "is_default": true,
      "description": "Task successfully created"
    },
    {
      "port_id": "error",
      "label": "Error"
    }
  ],
  "chain_constraints": {
    "next": [
      {
        "when": {
          "has_hag": true
        },
        "required_slug": "human.approval.gate",
        "message": "When \"Has Human Approval\" is checked, this node must be followed by a Human Approval Gate node."
      }
    ]
  },
  "execution_mode": "async",
  "tags": [
    "human",
    "task",
    "management"
  ],
  "is_stateful": true,
  "publisher": {
    "identity": "org_sommatic_ai",
    "profile": {
      "name": "Sommatic AI",
      "verified": true,
      "url": "https://me.veripass.com/sommatic",
      "logo_url": null
    }
  }
}

Execution

Execution
async
Stateful
Yes
Retries (retryOnFail)
No
Capabilities
taskhumanworkflow
Tags
humantaskmanagement

Notes and limits

  • Task statuses: queued, assigned, claimed, in_progress, completed, rejected, invalidated, expired. This node creates tasks as queued (claimed with a user assignee); later transitions happen in the Tasks inbox.
  • No pause or resume: completing the task later does not notify or resume this run.
  • The task context.workflow_instance_id and context.trace_id are sent empty: the worker reads them from fields the runtime does not set, so the task is not linked to the run.
  • Not idempotent: every execution creates a new task. There are no retries on the HTTP call.
  • The worker returns its fields at the top level of the envelope, without data, so the engine uses the whole envelope (including the port key) as the payload of the next node.
  • The worker does not set ok (the example shows true); the engine routes only by port.

Reviewed against the orchestrator code · 31e874b · 2026-11-26

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs