Skip to content

XoneWork Trigger

XoneWork Trigger is a start component: it starts the flow when something happens to the tasks of a XoneWork project, for example a task is created, moved to the TODO column or assigned to someone. Once activated, NappAI checks the project regularly with the XoneWork credential and runs the flow only when it finds something matching what you asked for.

Nothing needs to be set up in XoneWork: an API token is enough.

When to use it

  • Start an agent when a task is assigned to it and dropped in TODO: the start of an agent that develops or answers tasks.
  • Notify the team when a task reaches Test.
  • Open a ticket in another application when a task is created.
  • Report when a task is completed.

Configuration

You need a XoneWork credential with the address of your XoneWork and a personal API token. See Credentials.

  1. In XoneWork, open Account › API tokens and create a token. Choose its permissions and the projects it reaches.
  2. Copy the token, which starts with tvk_.
  3. In NappAI, create a XoneWork credential: in XoneWork address type the address of your XoneWork, for example https://xonework.app, and paste the token in API token.
  4. Choose that credential in the component’s Credential field.
FieldWhat it does
Credential (required)The XoneWork credential. It fills XoneWork Address and XoneWork API Token.
Project (required)The project to watch: its key, its name or the address of one of its pages. It is a list with the account’s projects, and you can also type.
EventsWhat starts the flow: New task, Moved to another column, Assigned to someone, Completed and Changed. Default: New task and Moved to another column.
ColumnsOnly tasks that end up (after the change) in these columns, separated by commas, for example TODO. Empty: any column.
AssigneeOnly tasks assigned to this email. With Assigned to someone, only when this person was added. Empty: anyone.
DataUsed to test the component in the editor. Leave it empty: each check fills it with what it finds.

Advanced options

FieldWhat it does
Include Existing TasksOff by default. On, the first check reports every task already in the project as new. Off, it starts from the moment you activate the trigger.
One Run per TaskOn by default: each task event runs the flow on its own. Off: one run per check with all the events.
Max Events per CheckThe most events handled in one check (1 to 50; default 20). The rest wait for the next one.
Check Every (seconds)How often XoneWork is checked (60 to 86,400; default 60).

These are the events that arrive, in the event field:

In EventseventWhen it arrives
New tasktask.createdA new task appears in the project.
Moved to another columntask.movedA task changes column. It carries previous_column, the column it was in.
Assigned to someonetask.assignedSomeone is added to the assigned people. It carries added_assignees, the emails added.
Completedtask.completedA task is marked as done.
Changedtask.changedThe title, note, priority, dates, estimate, tags or sprint change.

Activate the trigger

  1. Deploy a version of the flow. See Versions and publishing.
  2. In the component, click Activate. The API access window opens on the New Items Triggers tab.
  3. Click Activate. From that moment, NappAI checks the project every Check Every (seconds).
  4. To stop listening, click Deactivate.

Output

The Data output returns one item per event: the task as it is now, with event and these fields:

  • key: the task’s key, for example XONE-12. id: its id.
  • title and note (the note as text).
  • project and project_key.
  • column: the column it is in.
  • priority: low, medium or high. completed: whether it is done.
  • start_date and due_date.
  • assignees: the emails of the assigned people. tags: its tags.
  • sprint_id, estimate and parent_id.
  • previous_column in task.moved and added_assignees in task.assigned.

XoneWork Tasks and the other XoneWork components have Task set to {key}, so when connected to this trigger they work on the task that started the flow.

Example

An agent develops the tasks assigned to it in XoneWork.

  1. Add XoneWork Trigger with the project in Project, Moved to another column and Assigned to someone in Events, TODO in Columns and the email of the agent’s account in Assignee.
  2. Connect XoneWork Tasks with Move Task, In Progress in Column and TODO in From Column: the task only moves if it is still in TODO, and nobody else takes it.
  3. Connect another XoneWork Tasks with Get Task to read the full note and pass it to an agent.
  4. Write the agent’s answer with Update Task, Replace Section in Note Change and Agent report in Section Title.
  5. Finish with Move Task and Test in Column.
  6. Deploy the flow and activate the trigger.

Good practices

  • Do not use a schedule with List Tasks to detect new tasks: this trigger does that without running the flow every minute.
  • Use Columns and Assignee so the flow only runs for the tasks that concern it.
  • Turn on Include Existing Tasks only if you also want to handle the tasks already in the project.

Security and limitations

  • The trigger sees the task as it is at each check. XoneWork’s API does not say who made the change.
  • By default, 60 seconds pass between checks. If you need to react instantly and someone with the webhooks_can_manage permission in the project can create webhooks, use XoneWork Webhook.
  • The token acts as the person who created it: the trigger only sees the projects the token sees. Limit it in XoneWork to the permissions and projects the flow needs.
  • The token never appears in the node: the credential fills it.