Cli-microsoft365: New command: export the specific Flow

Created on 23 Mar 2018  路  8Comments  路  Source: pnp/cli-microsoft365

Export the specific Flow

  • command: azmgmt flow export -i|--id <id> -e|--environment <environment> -f|--format <format>
  • id: The ID of the Microsoft Flow to export
  • environment: The name of the environment where the Flow is located
  • format: The format to export the Flow to. Allowed values JSON|ZIP
  • requires #378
new feature work in progress

All 8 comments

Hey there @waldekmastykarz, can I give this one a go?

hmm - I may have spoken too soon.

It doesn't seem there's any easy to call API's available to implement the ZIP export. It might be possible to turn an export into a ZIP locally, but I'm not sure that'll be compatible with importing back in to the Flow interface...

Ignore my previous comment, after reverse engineering the Flow web UI, I think I'm able to replicate the process. Please assign this one to me.

Thanks for double-checking @mpowney! All yours!

When specifying the output format of ZIP, there are some additional values that are embedded in the exported package:

  • displayName - The display name to use in the exported package
  • description - The description to use in the exported package
  • creator - The name of the person to be used as the creator of the exported package
  • sourceEnvironment - The name of the source environment from which the exported package was taken

I'll add the above as optional arguments that are relevant when the output format is ZIP. The API calls generate a ZIP package successfully without them.

However, if the output format is specified as JSON, and any of these arguments are specified, the command will fail validation.

Good idea 馃憤

Hey @waldekmastykarz - I'm pondering the telemetry reporting for this command. Does the getTelemetryProperties() method need to be implemented here for it to provide telemetry details?

I notice in the azmgmt flow get command, there's no getTelemetryProperties() implementation...

It would be interesting to track the format that people use to export the Flow to. Other than that, we have no use for environment or flow ID.

Was this page helpful?
0 / 5 - 0 ratings