WorkflowFlowAction defines a flow trigger: a workflow action that launches a Flow and passes configured values into its variables. The action is stored in the object-scoped Workflow container's flowActions collection, separately from the Flow definition and the workflow rules that invoke it.
The action defines what flow to launch and what inputs to supply, not when the automation runs. A WorkflowRule selects the action and controls its activation, firing criteria, and evaluation conditions. These flow-trigger workflow actions are available only in orgs where the closed pilot was already enabled.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
The action's unique developer name for API access. It can contain only alphanumeric characters and underscores, must start with a letter, cannot end with an underscore, and cannot contain consecutive underscores. It is distinct from the launched flow's API name. |
flow |
Required. The API name of the Flow that the action launches. |
flowInputs |
A collection of input mappings. Each entry supplies a value to a flow variable when the flow launches. |
flowInputs.name |
Required for each input mapping. Identifies the destination flow variable by API name. That variable must have isInput set to true. |
flowInputs.value |
Required for each input mapping. Supplies a merge field or, where the destination data type permits it, a literal value. An sObject input requires a record reference of the matching object type. |
label |
Required. The action's display name, not the API name of the launched flow. |
language |
Reserved for future use. |
protected |
Reserved for future use. Do not apply the package-protection behavior documented for other workflow action types to this field. |
Behavior and Constraints
The flow-trigger workflow-action pilot is closed. Orgs where the pilot was already enabled can continue to create and edit these actions. In an org without that enablement, use Flow Builder to create a record-triggered flow rather than treating WorkflowFlowAction as generally available automation.
A rule selects the action through a nested WorkflowActionReference, a structure containing an action name and type. For this action, type is FlowAction, and name identifies the action. The rule's active, criteria, formula, and triggerType settings belong to WorkflowRule, not to the action. Defining the action alone does not establish when it runs.
Each input mapping must match the destination variable's API name, input exposure, and data type. A merge field is an expression that resolves to a record, field value, or global variable when the workflow fires. Its interpretation depends on the destination variable:
-
sObject variables: An sObject variable holds a Salesforce record. Its input must be a merge field identifying a record, or a lookup relationship field referencing a record, of the same object type. For example,
{!this}identifies the record that fired the workflow rule.{!Asset.Account}follows relationships to the Account associated with an associated Asset. -
Other variable types: The input can be a literal or a merge field. Supported merge fields identify a global variable or a field with the same data type as the destination variable. For example,
{!Id}supplies the triggering record's ID, not the record itself. A Boolean variable can receive the literaltrueorfalse.
Renaming a flow variable, changing its data type, or removing its input exposure changes the action's input contract. Field and relationship dependencies can also be embedded in flowInputs.value expressions rather than appearing as standalone reference elements.
Deployment and Retrieval
In Metadata API format, flow actions are represented within the parent object's Workflow file. Workflow files use the .workflow suffix and reside in the workflows directory, with one file per standard or custom object that has workflow. The action remains a child of that container; it is not the Flow definition.
To retrieve all workflow components through a package.xml manifest, use Workflow as the type name and * as the member. That wildcard support belongs to the Workflow container. The launched Flow is a separate metadata dependency identified by the action's flow value.
For a deployment involving changes to the launched flow, the input mappings must still match its variable API names, isInput settings, and data types. Expressions that follow fields or relationships also depend on those fields and relationships being available in the destination org.
Metadata API does not support test mode for flow triggers. If an administrator must cause the workflow rule to launch the latest flow version, enable test mode in the user interface after deployment. Deploying the action metadata alone cannot configure that behavior.
Relationships
Workflow owns the action through its flowActions collection. The action's outgoing reference selects the launched flow, while incoming name references can select the action from nested action structures. A possible consumer relationship does not establish that a particular action is assigned or executed.
References
-
Flow:flow.
Referenced By
-
ApprovalProcess:namein nested action structures. -
EntitlementProcess:namein nested action structures. -
Workflow:namein nested action structures. -
WorkflowRule:namein nested action references, withtypeset toFlowAction.
Common Questions
Can I create a WorkflowFlowAction in an org that was not in the pilot?
The pilot is closed. Only orgs where it was already enabled can continue to create and edit these actions. For an org without that enablement, use Flow Builder to create a record-triggered flow.
Does deploying a WorkflowFlowAction make it run?
The action definition alone does not establish when it runs. A workflow rule selects it through an action reference with type set to FlowAction. The rule controls activation and firing conditions.
Should I pass {!Id} or {!this} to a flow variable?
{!Id} passes the triggering record's ID. {!this} identifies the triggering record itself and can supply an sObject variable of the matching object type. The destination variable must be exposed as an input.
Can Metadata API enable test mode for a flow trigger?
No. To run the latest flow version when an administrator causes the workflow rule to fire, enable test mode in the user interface after deployment.
Where is WorkflowFlowAction stored when I retrieve workflow metadata?
It appears in the object's Workflow container under flowActions. In Metadata API format, the container is a .workflow file in the workflows directory. The launched Flow is a separate definition.