Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type
Related Issues?
Fixes #4816, partially fixes #Y, mentioned in #Z, etc.
What is in this Pull Request ?
New command to import a flow from a .zip package.
Import-PnPFlow
SYNTAX
DESCRIPTION
This cmdlet Imports a Microsoft Power Automate Flow from a zip package.
Many times Importing a Microsoft Power Automate Flow will not be possible due to various reasons such as connections having gone stale, SharePoint sites referenced no longer existing or other configuration errors in the Flow. To display these errors when trying to Import a Flow, provide the -Verbose flag with your Import request. If not provided, these errors will silently be ignored.
EXAMPLES
Example 1
This will Import the specified Microsoft Power Automate Flow from the specified Power Platform environment as an output to the current output of PowerShell
Example 2
This will Import the specified Microsoft Power Automate Flow from the default Power Platform environment as an output to the current output of PowerShell
Example 3
This will Import a flow to the default environment. The flow will be imported as a zip package. The name of the flow will be set to NewFlowName.
Example 4
This will Import a flow to the default environment. The flow will be imported as a zip package. The name of the flow will be set to NewFlowName. With the -Verbose flag, any errors that occur during the import process will be displayed in the console.
Test Screens
Screen 1
Screen 2
PARAMETERS
-Connection
Optional connection to be used by the cmdlet.
Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
-Environment
The name of the Power Platform environment or an Environment instance. If omitted, the default environment will be used.
-PackagePath
Local path of the .zip package to import. The path must be a valid path on the local file system.
-Name
The new name of the flow.
Thanks,
Nish