Copying a flow

We can create a shallow copy of an existing flow in our tenant, via the in-built Flow API client. We will need the Flow ID of the flow we want to copy.

To create the copy, we will first get the flow metadata from the api/draw/1/flow/(id) endpoint, remove the id value, change the developerName value, and send a POST request back to api/draw/1/flow.

Here is how:

Say, there is a flow with the Flow ID as c2d43d5f-3e22-4f9f-86d8-fccb9745268b.

  1. Click API.
  2. Copy paste api/draw/1/flow/(id) in the address field, and replace (id) with the Flow ID of the flow we want to copy.
  3. Click GET. This gives us the metadata of the flow in the Response column.
  4. Copy the entire metadata and paste it in the Request column.
  5. We will delete the id value. The Flow engine will generate a different value for us.
  6. We will change the developerName value to something else.
  7. Copy-paste api/draw/1/flow in the address field.
  8. Click POST. This creates a shallow copy of the flow.
    If we have a flow, and want to create a similar flow with minor changes, another option is to import the flow in a new subtenant.
Good to know // 

What is the difference between ‘deep’ and ‘shallow’ copies? This is good to know.