Triggers and run identity
Choose between schedules, platform events, webhooks, and the API, and decide who each run is for: the workspace, one end user, a segment of end users, or a Console team.
On this page
Every run is for someone: the whole workspace, one of your end users, a group of end users, or the members of an internal team. That choice is the run's identity. It decides whose connected accounts the run can use.
Who this is for: people building workflows for Embedded Connect, where your own customers (called principals) connect their own accounts, and people who want a run to be repeated for each member of a Console team.
What you will do: pick the right trigger for your case and set Run as correctly.
If your workflow only uses your workspace's own connections, you can skip this page and leave Run as on Workspace.
See also External triggers for how to set each trigger up and Run setup for Manual runs.
The four identities
| Run as | What the run is for | Use it when |
|---|---|---|
| Workspace | The whole workspace. One run. | The workflow only uses workspace-level connections |
| One principal | One end user (external_user_id) | The workflow uses that customer's connected accounts |
| Principal segment | Every end user in a segment. One run per principal each time the trigger fires. | The same job for many customers on a schedule |
| Console team | Every member of a Console team. One run per member each time. | An internal job for each of your own team members |
In Workflow setup, the Run as field appears on the Manual, Cron, Inbound, and API tabs. Only workspace admins can run as an end user or a segment. The Events tab has no Run as, because each event already says who it is about.
Each trigger keeps its own Run as. Changing it on the Manual tab does not change a schedule, a webhook, or an event trigger. Saved defaults only pre-fill forms.
Who sets the identity?
| Trigger | Where | Run as shown? | Identity when it fires |
|---|---|---|---|
| Manual | Manual tab | Yes | What you choose for that run |
| Cron | Cron tab | Yes | Workspace is one run. Principal segment or Console team starts one run per member. |
| Inbound webhook | Inbound tab | Yes | The webhook's Run as, and fields you map from the request |
| API | API tab | Example request only | The values in the request (external_user_id, segment_id, or team_id) |
| Platform event | Events tab | No | The end user the event is about |
Which trigger should I use?
| Goal | Use |
|---|---|
| React when one customer connects, disconnects, or is suspended | Platform event |
| The same job on a schedule for many customers | Cron with Principal segment |
| A schedule for the whole workspace | Cron with Workspace (the workflow must not need a customer's connections) |
| A schedule for each internal team member | Cron with Console team |
| An outside system sends you data | Inbound webhook, or your backend calls the API |
| Testing in Studio | Manual with One principal |
Reactive -> platform events (and many webhooks): 1 event -> 1 principal
Batch -> cron + segment, or cron + team: 1 tick -> N runs
Ad hoc -> manual, APIPlatform events
A platform event is about one end user or one connection, so each event starts one run for that end user.
Rules on the trigger:
- Platform event: required. For example Connection created.
- Connection provider: optional, and only for Connection created and Connection revoked. Choose
google_account,composio_account,whatsapp, or leave Any provider (recommended). - Principal segment filter: optional. When set, the workflow runs only if the end user is in that segment.
| Event | Typical use | Connection details on the run? |
|---|---|---|
| Principal created | Set things up before the customer connects anything | No, the customer has not connected yet |
| Connection created | Start a first sync after a customer connects | Yes: connection_id and provider |
| Connection revoked | Clean up | Yes |
| Principal suspended | Stop scheduled syncs | Yes |
| Principal deleted | Final clean-up | Yes |
Accounts connected through a Hosted apps connector (Gmail, Slack, and others) report the provider composio_account, not google_account. Use google_account only for direct Google sign-in in Embedded Connect.
Example, start a sync when a customer connects an account through a Hosted apps connector:
{
"event_type": "connection.created",
"provider_filter": "composio_account",
"segment_id": "optional-segment-uuid",
"trigger_payload": { "backfill_after": "2026/01/01" },
"trigger_steps": {},
"excluded_step_ids": []
}Cron: segment or team
For tool steps that use each customer's own connection (connection_resolution: principal):
- Workspace cron makes one run with no end user. That is usually wrong for per-customer work.
- Principal segment cron makes one run for each principal in the segment, every time it fires.
- Console team cron makes one run for each member of the team (teams are under Settings → Team & Members), every time it fires. These are your own users, not end users.
A common Embedded Connect pattern:
- On connect: a Connection created platform event, not cron.
- Keep syncing: cron with Run as → Principal segment, for example a segment that requires a connection.
Inbound and API
- Inbound: set Run as on the webhook, and map fields from the request to
external_user_idwhen needed. - API: pass
external_user_id,segment_id, orteam_idin theparamsofcommand: start. See External triggers.
Provider filter, segment, and team
| Setting | Chooses |
|---|---|
| Connection provider | Which type of connection (for example google_account, composio_account, whatsapp) on connection events |
| Principal segment | Which end users (by tags, whether they have a connection, and so on) |
| Console team | Which internal users (team membership) |
Use separate workflows or filters when the set-up differs by provider. Use a segment for customer groups and a team for internal batches.
Checklist for a new automation
- One customer or many? One: platform event, webhook, or API. Many: cron with a segment or team.
- Does a step use a customer's own connection? Then every run needs an end user, so use One principal or a Principal segment.
- Reacting to connect, revoke, or suspend? Use a platform event, not a second webhook.
- An outside system sends HTTP? Use Inbound or the API.
- Polling on a timetable? Cron with a segment or team.
- Testing? Manual with a test end user.
- Save the start values on each trigger itself.
Common problems
| Problem | What to try |
|---|---|
| A tool step says it needs a connected account | The run has no end user. Set Run as to One principal or Principal segment. |
| The schedule made only one run | Run as is Workspace. Choose a segment or team to start one run per member. |
| One principal and Principal segment are missing | Only workspace admins can choose them. |