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.
- In XoneWork, open Account › API tokens and create a token. Choose its permissions and the projects it reaches.
- Copy the token, which starts with
tvk_. - 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. - Choose that credential in the component’s Credential field.
| Field | What 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. |
| Events | What starts the flow: New task, Moved to another column, Assigned to someone, Completed and Changed. Default: New task and Moved to another column. |
| Columns | Only tasks that end up (after the change) in these columns, separated by commas, for example TODO. Empty: any column. |
| Assignee | Only tasks assigned to this email. With Assigned to someone, only when this person was added. Empty: anyone. |
| Data | Used to test the component in the editor. Leave it empty: each check fills it with what it finds. |
Advanced options
| Field | What it does |
|---|---|
| Include Existing Tasks | Off 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 Task | On by default: each task event runs the flow on its own. Off: one run per check with all the events. |
| Max Events per Check | The 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 Events | event | When it arrives |
|---|---|---|
New task | task.created | A new task appears in the project. |
Moved to another column | task.moved | A task changes column. It carries previous_column, the column it was in. |
Assigned to someone | task.assigned | Someone is added to the assigned people. It carries added_assignees, the emails added. |
Completed | task.completed | A task is marked as done. |
Changed | task.changed | The title, note, priority, dates, estimate, tags or sprint change. |
Activate the trigger
- Deploy a version of the flow. See Versions and publishing.
- In the component, click Activate. The API access window opens on the New Items Triggers tab.
- Click Activate. From that moment, NappAI checks the project every Check Every (seconds).
- 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 exampleXONE-12.id: its id.titleandnote(the note as text).projectandproject_key.column: the column it is in.priority:low,mediumorhigh.completed: whether it is done.start_dateanddue_date.assignees: the emails of the assigned people.tags: its tags.sprint_id,estimateandparent_id.previous_columnintask.movedandadded_assigneesintask.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.
- Add XoneWork Trigger with the project in Project,
Moved to another columnandAssigned to someonein Events,TODOin Columns and the email of the agent’s account in Assignee. - Connect XoneWork Tasks with
Move Task,In Progressin Column andTODOin From Column: the task only moves if it is still inTODO, and nobody else takes it. - Connect another XoneWork Tasks with
Get Taskto read the full note and pass it to an agent. - Write the agent’s answer with
Update Task,Replace Sectionin Note Change andAgent reportin Section Title. - Finish with
Move TaskandTestin Column. - Deploy the flow and activate the trigger.
Good practices
- Do not use a schedule with
List Tasksto 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_managepermission 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.
Related components
- XoneWork Webhook: starts the flow instantly with the webhooks of a project.
- XoneWork Tasks: read, create, move and assign tasks.
- XoneWork Comments: read and write comments.
- XoneWork Projects: projects, columns, members, tags and sprints.
- XoneWork Time Tracking: time spent on tasks.
- XoneWork Attachments: the files attached to a task.