An approval process defines the steps, approvers and actions for approving a record. Retrieving it lets you review the process outside the org and deploy it to another one.
Steps to retrieve it in VS Code
Open your Salesforce DX project in VS Code and authorize your org with SFDX: Authorize an Org.
Open manifest/package.xml, or create the file, and paste the XML shown above.
Right-click package.xml and choose SFDX: Retrieve Source in Manifest from Org.
When the command finishes, open the folder force-app/main/default/approvalProcesses to see the retrieved files.
Each member is ObjectName.ProcessUniqueName, such as Account.Approve_30_Discount. Use the unique name, not the display label.
Retrieve it with the Salesforce CLI
If you prefer the terminal, run one of these commands from your project folder:
sf project retrieve start --manifest manifest/package.xml
sf project retrieve start --metadata ApprovalProcess:Account.Approve_30_Discount
Where the files are saved
After a successful retrieve, the files are placed inside your project, for example in force-app/main/default/approvalProcesses/Account.Approve_30_Discount.approvalProcess-meta.xml.
Common problems and fixes
Entity of type ApprovalProcess cannot be found: check the spelling and the API name of the member, and make sure you are authorized to the correct org.
Nothing was retrieved: run sf org list to confirm the default org, and check that the component actually exists there.
API version: the examples use version 62.0. You can use a higher version if your org supports it.
FAQ
Where do I find the unique name of an approval process? In Setup, open Approval Processes, choose the object, and read the Unique Name of the process.
Does a retrieved approval process include its email templates? No. Related items such as email templates and workflow actions are separate metadata, so retrieve them too if you plan to deploy.