Resolving Flow Import Error Due to SharePoint Connector Reference

Hi everyone,

Sharing a quick POSSIBLE solution for an issue you might encounter when importing a Power Automate flow (ZIP package) into your environment.

🚨 Problem

When attempting to import a packaged flow, you may see an error similar to:

Import failed for one more package resources.

This typically happens because the flow is still referencing a SharePoint site URL from the source environment (e.g., a different tenant or subdomain). Some time you will get a "Save as a new flow" link where you will be taken into editing mode of flow in draft mode and able to continue. But sometime that link does not exists.

image.png

✅ Root Cause

The flow definition includes hardcoded references to a SharePoint domain such as:

xyz.sharepoint.com

If your organization uses a different SharePoint subdomain (e.g., abc.sharepoint.com), the import will fail because the connector cannot resolve or authenticate against the original URL.

🛠️ Solution

You can resolve this by updating the flow definition before importing:

Step-by-step:

  1. Unzip the flow package (.zip file)
    Extract the contents to a local folder.
  2. Locate definition.json
    This file contains the flow’s configuration and connector references.
  3. Open the file in a text editor
    Use Notepad, Notepad++, or similar.
  4. Find and replace the SharePoint domain
    • xyz.sharepoint.com
    • abc.sharepoint.com
  5. Save the file
  6. Repackage the zip file
    • Ensure the structure remains unchanged when zipping it back up.
  7. Re-import the flow The import should now complete successfully.

💡 Tips

  • Make sure all occurrences of the old domain are replaced.
  • Be careful not to alter the JSON structure.
  • If multiple connectors are used, double-check for additional environment-specific URLs.

Hope this helps anyone running into this issue! Let me know if you’ve found other variations or edge cases.

Answers

  • Ashley Moose
    Ashley Moose Blackbaud Employee
    Ninth Anniversary Kudos 5 First Reply Name Dropper

    This is super helpful Alex, thanks for sharing! I've been able to get around this in the past by adding the Flow into a Solution and using Environment variables but the use of Solutions has also created other challenges in some situations so will definitely be giving this a try!

  • If you receive an Unauthorized error when importing a Power Automate package, the flow is likely still pointing to a SharePoint site, list, or authentication source from the original environment.

    Resolution Steps

    1. Download and extract the package (.zip) to a local folder.
    2. Microsoft.Flow\flows\<FlowGUID>\definition.json
    3. Open definition.json in a text editor such as Notepad++.
    4. Old Site URLhttps://originaltenant.sharepoint.com/sites/OriginalSiteNew Site URLhttps://yourtenant.sharepoint.com/sites/YourSiteOld List GUID<Original List GUID>New List GUID<Target List GUID>Item ID<Target Item ID>
    5. Example:Oldbody/Access_x0020_TokenNewbody/AuthenticationKey
    6. Save the updated definition.json file.
    7. Rebuild the package:
      • Go to the folder containing:
        • manifest.json
        • Microsoft.Flow
      • Select both items.
      • Right-click and choose Compress to ZIP file.
      • Do not zip the parent folder.
    8. manifest.jsonMicrosoft.FlowIf you see another folder first, the package was zipped incorrectly.
    9. Import the newly created ZIP package into Power Automate.

    Additional Environment Requirement

    If the environment has Create new canvas apps and cloud flows in Dataverse solutions enabled:

    1. Go to Power Platform Admin Center.
    2. Select the target environment.
    3. Navigate to Settings → Features.
    4. Create new canvas apps and cloud flows in Dataverse solutions
    5. Save the setting.
    6. Retry the package import.

    Tips

    • Replace all references to the original SharePoint environment.
    • Verify all list GUIDs, item IDs, and column names are valid in the destination environment.
    • Do not modify the package structure.
    • Validate the JSON syntax before saving.
    • Recreate the ZIP file after making any changes to the package contents.
  • @Alex Wong

    Here are some additional notes. If someone else comes across this issue.

    If you receive an Unauthorized error when importing a Power Automate package, the flow is likely still pointing to a SharePoint site, list, or authentication source from the original environment.

    Resolution Steps

    1. Download and extract the package (.zip) to a local folder.
    2. Microsoft.Flow\flows\<FlowGUID>\definition.json
    3. Open definition.json in a text editor such as Notepad++.
    4. Old Site URLhttps://originaltenant.sharepoint.com/sites/OriginalSiteNew Site URLhttps://yourtenant.sharepoint.com/sites/YourSiteOld List GUID<Original List GUID>New List GUID<Target List GUID>Item ID<Target Item ID>
    5. Example:Oldbody/Access_x0020_TokenNewbody/AuthenticationKey
    6. Save the updated definition.json file.
    7. Rebuild the package:
      • Go to the folder containing:
        • manifest.json
        • Microsoft.Flow
      • Select both items.
      • Right-click and choose Compress to ZIP file.
      • Do not zip the parent folder.
    8. manifest.jsonMicrosoft.FlowIf you see another folder first, the package was zipped incorrectly.
    9. Import the newly created ZIP package into Power Automate.

    Additional Environment Requirement

    If the environment has Create new canvas apps and cloud flows in Dataverse solutions enabled:

    1. Go to Power Platform Admin Center.
    2. Select the target environment.
    3. Navigate to Settings → Features.
    4. Create new canvas apps and cloud flows in Dataverse solutions
    5. Save the setting.
    6. Retry the package import.

    Tips

    • Replace all references to the original SharePoint environment.
    • Verify all list GUIDs, item IDs, and column names are valid in the destination environment.
    • Do not modify the package structure.
    • Validate the JSON syntax before saving.
    • Recreate the ZIP file after making any changes to the package contents.

Categories