Power Automate Copy file no longer works - Copy SharePoint Home.aspx to New SharePoint site

Anonymous
2024-09-19T10:30:35+00:00

Need help:

Power Automate Copy file not working since 18.9.2024 - copy SharePoint Home.aspx to New SharePoint site, error: Invalid number value. A number field contains invalid data. Please check the value and try again. CallStack -- at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx) at Microsoft.SharePoint.Library.SPRequest.SetGhostedFile(String setupPath, Byte setupPathVersion, Int32 iVersion, Guid& pguidListId, Guid& pguidDocId, Int32 lDoclibRowId, Int32 iAuthorId, String authorLogin, String serverRelativeUrl, String targetUrlWebRelative, Boolean isInDocLib, Boolean isMigration, Boolean isPublishing Object varProperties, Int64 PutFileOpt) at Microsoft.SharePoint.Deployment.FileSerializer.SetGhostedFile(Object fileOrListItem, SPLoggerObject loggerObject, SPWeb web, Guid existId, SPResourcePath fileUrl, SerializationInfoHelper infoHelper, SerializationInfoHelper infoHelperListitem, Boolean fileExistsInDb, Nullable`1 isLastVersion, StreamingContext context) clientRequestId: 1f3421bf-23fb-48aa-887a-e*** serviceRequestId: 77bf51a1-d04f-9****

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

48 answers

Sort by: Most helpful
  1. Anonymous
    2024-09-24T09:02:05+00:00

    I'm still trying to debug this to establish exactly where the issues is. Here's my hunches:

    1. This does NOT appear to be related to any deprecated functionality. There are 2 actions - 'Copy file' and 'Copy file (deprecated)'. I'm using 'Copy file' and having the issue.
    2. The only number in the outputs appears to be in the 'If Another File is Already There' field. When setting the 'Copy file' parameters this is set to 'Replace', but in the Outputs it appears as '1'.
    3. Here's what Copilot makes of the error:
      "It seems that the error occurred due to an "Invalid number value" in the Copy_file operation. To fix this, check the parameter 'nameConflictBehavior' in the CopyFileAsync action. Ensure that the value provided for 'nameConflictBehavior' is a valid number according to the requirements of the destination library. Double-check the value being passed for 'nameConflictBehavior' to resolve this error."
      This appears to support the theory that the issue relates to the parameter of what to do if a file already exists in the destination.
    4. I've tried recreating the Flow and simplifying it as much as possible, using both Classic and New Designer, and still get the same error.
    5. Conclusion: Microsoft have broken / changed something and need to fix it ...

    If you've found anything further, please let us all know!

    Was this answer helpful?

    5 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-09-25T11:42:45+00:00

    I have found three different fixes - it just depends on how extensive you want to get and the nature of your page and workflow.

    Fix 1 - Simply rip out the copy file action, and replace it with the exact same action

    Fix 2 - If your page is fairly simple (no custom components), then you can two a step copy - first copy the page to a different location, such as Style Library, and then copy the page from the Style Library to your Site Pages library

    Fix 3 - If your page has custom components, Fix 2 will not work for you - in this case, you will need to create a child flow that does the copy file action, and then call that child flow from your main flow.

    All three of these fixes have worked for different tenants, just depending on the nature of the workflow and page.

    Something about the action has changed, and MSFT did your provide an abstraction layer for old actions - they simply updated the action and all new instances of the action will work, but old actions have to be replaced (which introduces the new code and/or config behind the scenes)

    There's one other possible fix if nothing above works - I haven't tested this one. You could call an Azure Runbook that uses PowerShell to copy the page. Again, quite the workaround, but it should work.

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2024-09-20T08:34:33+00:00

    Same here. Something seems to have changed after Sept 18 05:24PM - this was the last successful run of a flow which uses the Copy File action for a page. All runs in several flows which copy pages between sites have failed since then with the same error.

    I've done a lot SharePoint server-side development in the good old days and for me it seems that, there was a change in SharePoint (update of schema files or code) which causes the interal SSOM API call to fail when it "hits" the actual schema.

    The thing is: Opening a standard ticket for this as a customer is pure pain when explaining this to the 1st level support. Let's hope that the issue causes some important flows in large orgs to stop, so premium support gets fired up.

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2024-09-20T14:55:12+00:00

    Same problem with copying file from one SharePoint site to another using Power Automate. My flow has been running over a year without any problem.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  5. Anonymous
    2024-09-19T12:27:29+00:00

    Hi Sophia,

    I have the exact same error (today) as Tadej.

    the source file (also a homepage) I copy was not modifed (for a year).

    Also the Power Automate Copy File Flow action also was not changed.

    This copy action worked fine the whole last year,

    regards,

    Bart

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments