Triggers for cloud workspaces
A task in a cloud workspace can start on a schedule, when a webhook arrives, when a ticket changes, or when someone asks for it. This page explains each trigger and shows how to combine them with your connectors to run multi-step processes while your laptop is closed.
How a cloud task runs
- A task is instructions plus triggers. Each run starts a new conversation that sees only the saved instructions and the details of what started it. It cannot see the chat where you created the task.
- It runs as the workspace owner. The run uses the owner's skills, connectors and permissions, and the same approval rules as the owner's chats. A trigger never grants extra access.
- Outside content is data, not instructions. A ticket, webhook body or document is checked before the agent sees it, and the agent treats it as information to act on, not as orders.
- A run can wait for you. If it needs an approval or an answer, it pauses and shows under Needs attention, and you are emailed. A scheduled task does not start a new run while its previous run is still open, so answer the waiting run or choose Dismiss on it.
Set up a trigger
The quickest route is to ask. In a conversation with the workspace, say "Every weekday at 07:30 London time, do this", and the agent saves the task and confirms the schedule and what each run will do. You can also edit a task in Harriet Desktop under Automations, or on the web under Workflows with the Cloud automations tag selected.
The task editor shows the schedule first, then one row for each other trigger. A task can have several triggers at once. Press Run now at any time to start one by hand.
The triggers
| Trigger | Starts when | The run receives |
|---|---|---|
| Schedule | The time you set arrives | The time the run was due |
| Webhook | Another system sends a request to the task's address | The body of that request |
| Ticket Events | A ticket arrives, or a new message or internal message is added | The ticket and the new message. Later messages on the same ticket continue the same conversation. |
| From Chat & Ticket | Someone you allow asks for the task in chat or from a ticket | A summary of their request |
| New knowledge document | A document is added to the knowledge library | The new document |
Ticket Events can be narrowed to Inboxes to watch, SLA tags to watch and Only messages matching a pattern. New knowledge document can be narrowed to Groups to match, and it fires when a document is created, not each time one is edited. For From Chat & Ticket, choose Allowed groups or Anyone in the organisation. Starting a task this way does not give the person access to your workspace. Turn on Require owner approval before running to review each request first, and give the task a short description so chat knows when to offer it.
Webhooks in detail
Turn on Enable webhook trigger and save. The Webhook URL then appears for you, the workspace owner, and nobody else. Treat it like a password: anyone who has it can start the task.
curl -X POST "<your-task-webhook-url>" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: deal-48213" \
-d '{"deal_id": "48213", "account": "Meridian Properties", "stage": "closed-won"}'
- The body can be any JSON, up to 1 MB. Text that is not JSON arrives as plain content.
- Acknowledgement status is the reply Harriet sends once the request is accepted:
200,202(the default) or204. The work then continues in the background, so the sender is not told how it turned out. - Retries. Have the sender include a stable
Idempotency-Key, such as the record's ID. The same key with the same body returns the same run. The same key with a different body is rejected. Without the header, every request starts a run.
An idempotency key stops duplicate runs, not duplicate actions in other systems. Write the instructions so the run checks for an existing record before it creates one.
Related pages
- Orchestrating processes in cloud workspaces shows triggers and connectors working together.
- Cloud workspaces covers sharing and the safety checks.
- Working in a shared workspace covers what collaborators can do with tasks.
- Port a workflow to cloud agents moves an existing workflow into a cloud task.