Deploy Flow from Raw XML
sf_create_flow_from_xmlDeploy Salesforce Flow from raw XML via Metadata API. Supports complex flows beyond parameter builder, with optional activation and pre-validation for schema errors.
Instructions
Deploys a Salesforce Flow directly from raw XML using the Metadata API zip deploy. Use this for complex flows that are too advanced for sf_create_flow's parameter-based builder — paste the full Flow XML and it deploys it directly. Optionally activates the flow after deployment. The flowXml must be a complete Flow metadata XML document. Pre-validates for 3 common, otherwise hard-to-diagnose schema errors before deploying: top-level elements of the same type must be contiguous (not interleaved), locationX/locationY are auto-defaulted if missing, and SObject-typed variables must have objectType.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flowXml | Yes | Complete Flow XML content (the full metadata file, starting with <?xml version...> or <Flow xmlns...>) | |
| activate | No | Activate the flow after deployment (default: true). Set to false to deploy as inactive draft. | |
| flowApiName | Yes | API name of the flow to deploy, e.g. 'My_Flow' |