package.xml format to retreive process builder

Processes from Process Builder have Flow metadata type. And you can retrieve all processes with next package.xml:

<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>Flow</name>
    </types>
    <version>31.0</version>
</Package>

I just thought it would be useful to mention how to retrieve a specific one as well, as there is a small caveat here. When just packaging a specific process you must append the API name with the version number you are importing. For example:

<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>unique_name-3</members>
        <name>Flow</name>
    </types>
    <version>41.0</version>
</Package>

This will retrieve version 3 of the "unique_name" process. Without a version number appended you will get an error.


Just an update on this question - With the deployment of API Version 44, version numbers at the end of Process Builder Flows are no longer necessary when specifying individual flows.