Esta página no está disponible en español. Se muestra la versión en inglés.

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.

En esta página

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 asWhat the run is forUse it when
WorkspaceThe whole workspace. One run.The workflow only uses workspace-level connections
One principalOne end user (external_user_id)The workflow uses that customer's connected accounts
Principal segmentEvery end user in a segment. One run per principal each time the trigger fires.The same job for many customers on a schedule
Console teamEvery 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.

Advertencia

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?

TriggerWhereRun as shown?Identity when it fires
ManualManual tabYesWhat you choose for that run
CronCron tabYesWorkspace is one run. Principal segment or Console team starts one run per member.
Inbound webhookInbound tabYesThe webhook's Run as, and fields you map from the request
APIAPI tabExample request onlyThe values in the request (external_user_id, segment_id, or team_id)
Platform eventEvents tabNoThe end user the event is about

Which trigger should I use?

GoalUse
React when one customer connects, disconnects, or is suspendedPlatform event
The same job on a schedule for many customersCron with Principal segment
A schedule for the whole workspaceCron with Workspace (the workflow must not need a customer's connections)
A schedule for each internal team memberCron with Console team
An outside system sends you dataInbound webhook, or your backend calls the API
Testing in StudioManual 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, API

Platform 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.
EventTypical useConnection details on the run?
Principal createdSet things up before the customer connects anythingNo, the customer has not connected yet
Connection createdStart a first sync after a customer connectsYes: connection_id and provider
Connection revokedClean upYes
Principal suspendedStop scheduled syncsYes
Principal deletedFinal clean-upYes

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:

  1. On connect: a Connection created platform event, not cron.
  2. 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_id when needed.
  • API: pass external_user_id, segment_id, or team_id in the params of command: start. See External triggers.

Provider filter, segment, and team

SettingChooses
Connection providerWhich type of connection (for example google_account, composio_account, whatsapp) on connection events
Principal segmentWhich end users (by tags, whether they have a connection, and so on)
Console teamWhich 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

  1. One customer or many? One: platform event, webhook, or API. Many: cron with a segment or team.
  2. Does a step use a customer's own connection? Then every run needs an end user, so use One principal or a Principal segment.
  3. Reacting to connect, revoke, or suspend? Use a platform event, not a second webhook.
  4. An outside system sends HTTP? Use Inbound or the API.
  5. Polling on a timetable? Cron with a segment or team.
  6. Testing? Manual with a test end user.
  7. Save the start values on each trigger itself.

Common problems

ProblemWhat to try
A tool step says it needs a connected accountThe run has no end user. Set Run as to One principal or Principal segment.
The schedule made only one runRun as is Workspace. Choose a segment or team to start one run per member.
One principal and Principal segment are missingOnly workspace admins can choose them.

Next steps

Editar esta páginaagentruntime-io/agentruntime-docs