Flow actions
Flow actions let automation code work with tickets, assets, people, teams, knowledge, and access records. Import each family from its exact@flow/actions/<domain> path.
Flow checks the current execution identity, team permissions, and product access on every call. References such as { kind: "primary" }, { kind: "run_team" }, and { kind: "run_beneficiary" } keep organization, team, and person identifiers out of author code.
Keep each mutation or integration action in its own step. A read-only step may group directly awaited native Flow reads, with one static call site per distinct action.
Update a ticket and notify the requester
This example loads the primary ticket, updates its priority and status, adds a team-only note, and sends a run-bound in-app update.revision as expectedRevision to tickets.update or tickets.resolve to guard against changes since the read. If the revision is stale, Flow rejects the write. Read the ticket again before deciding whether to retry. For assignment automations, tickets.update uses the revision that triggered the run.
Asset field and assignment updates require the revision returned by the read action.
Asset actions use organization-scoped assetKey and assetTypeKey values instead of internal IDs. Use run-relative references or email for people, and { kind: "run_team" } or a team key for management teams. Operator asset results expose assetKey; asset action results never expose internal UUIDs.
Generate and summarize text
ImportgenerateText and summarize from @flow/actions/ai. Flow chooses the provider and model, applies PII filtering, and validates any requested object, array, or choice output.
The optional maxOutputTokens must be an integer from 16 through 2,048. Smaller budgets fail validation before inference. The minimum does not guarantee a complete answer: low budgets can truncate text or leave no visible text after reasoning.
The AI SDK retries eligible temporary provider failures, including bare provider timeouts, inside the same action. The action keeps one runtime activity attempt. SDK retries, permitted provider fallback, and structured-output repair share a limit of three provider requests, including the first request. Recovery does not repeat the automation or a completed action.
Each inference invocation has a 30-second limit that includes retry waits and requests. Larger input does not extend that limit; the action deadline can shorten it. Structured-output repair retains its limit of three rounds within the original 120-second action limit, but stops earlier when the shared request allowance or remaining time runs out. Flow does not restart these limits for a network retry.
Usage accounting does not discard a response that completed within the inference request limit. Cancellation and the enclosing action deadline still apply while Flow settles that result.
Flow honors provider cooldowns only when another request can fit before the deadline. Cancellation and expired deadlines stop pending requests and waits. Hard quota, credentials, permission, configuration, safety, malformed-input, and unknown failures do not receive automatic retries.
Terminal diagnostics use these messages:
The exhausted message uses singular grammar for one request. Cancellation keeps the canceled state rather than a provider-failure message. Run details distinguish runtime activity attempts from recorded provider transmissions and structured-output rounds. These counts remain visible for both returned native AI failures and thrown failures.
Existing error handling still applies: terminal platform failures throw
ActionSystemError; recovery never converts a terminal provider failure or empty model output into success. Flow reuses a saved action result if its acknowledgement is lost instead of generating another result.
Available actions
Result lists are paged and bounded. Use the returned cursor unchanged, with the same filters and automation run, to request the next page. Cursors expire after 30 days. If a cursor expires, restart the list without it. Flow rejects hidden resources without confirming whether they exist.
Errors and testing
Flow actions return the same exact result envelope as integration actions. Checkresult.outcome immediately. A definitive business failure is returned as outcome: "failed"; a platform or indeterminate failure throws ActionSystemError with a support reference.
Automation updates
Usemessaging.sendNotification(input) from @flow/actions/messaging to send one update. Flow chooses the recipient’s enabled channels: in-app, browser toast, email, and the connected chat provider. Slack delivers a direct message; Microsoft Teams delivers a personal message. Add delivery: { channels: ["teams"] } to limit delivery to Teams. Add onNoEligibleChannel: "error" inside delivery if the automation must fail when none of the selected channels is configured and eligible for the recipient. Flow queues notifications during a temporary chat connection failure and retries delivery a limited number of times. The older deliveryMethod field still selects exactly one channel, subject to the recipient’s preferences.
Use requester or opener for the run’s requester or opener. Use team_member with a principalId for a member of the run team. For an independent update to a user in the run’s organization, use audience: { kind: "person", principalId }. The user can belong to another team. If Flow cannot resolve that user, it suppresses the update by default or fails the action when onNoEligibleChannel is "error". Progress and completion updates require requester or opener. Chat delivery sends a private message to that person. Teams requires the recipient to have a verified Teams identity and an active personal Flow installation. Without a connected chat provider, Flow uses the eligible in-app, browser toast, and email channels. An accepted request can still fail later during provider delivery.
message accepts up to 8,192 UTF-8 bytes. Messages selected for Slack delivery must also fit within 2,900 characters. This limit also applies while the Slack connection is temporarily unavailable. Teams shows a preview with up to 256 characters in the title and 4,000 in the body. Flow retains the full notification content.
messaging.requestResponse remains a single-channel interaction. Its required deliveryMethod is "email" or "slack". If the recipient has disabled that channel for automation input requests, the action fails before the automation begins waiting for a reply.