web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Sharepoint api CreateC...
Power Automate
Unanswered

Sharepoint api CreateCopyJobs badgateway error

(0) ShareShare
ReportReport
Posted on by 6

Hello,

I created a flow that copies a file to a different sharepoint site using the rest api. But when I run the flow I see 8 retries occurred and the flow keeps running and retrying untill I cancel the flow. I only see BadGateway at the status. No further information:

 

Mustafa4_1-1699544415029.png

The flow has a manually trigger. The http request looks like this

Mustafa4_2-1699544525717.png

 

How can I fix this?

Or is there an other way to copy files between sharepoint sites while keeping the version history?

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @Mustafa4,

     

    Your site address looks incorrect. Normally a site address expects a site collection url, which would be something like:

    https://contoso.sharepoint.com/sites/sitename

     

    In your case it also has Voorstellen/02348 in the site address Url. Are you trying to use a subsite instead? (that is not a site collection, which would explain why this request does not work).

  • Mustafa4 Profile Picture
    6 on at

    @Expiscornovus Thank you for your answer. When I change the siteaddress to https://<Tenantname>.sharepoint.com/sites/Z006/ I still get the same error. 

  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @Mustafa4,

     

    Can you remove the last slash at the end of your destinationUri value and test again? It might not like that slash.

     

    Below is a test with a move operation between two classic subsites (including the version history).

     

    removeforwardslash.png

     

    End result

     

    movedoc_includingversionhistory.png

  • Mustafa4 Profile Picture
    6 on at

    Hi @Expiscornovus Removing the slash did not work. Are there any site settings the needs to be tuned for it to work?

  • Mustafa4 Profile Picture
    6 on at

    Hi,

    I just removed the file and created a new one. Now the request works. I don't know what the problem exactly was but thank you for your help @Expiscornovus 

  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @Mustafa4,

     

    Great to hear it works!

     

    I haven't tried it, but I noticed your url was encoded. Compared to my request you used "Gedeelde%20Documenten" in the url instead of "Gedeelde Documenten" (I used Shared Documents, but that is the same thing in English 😁).

     

    Maybe it did not like that part in your first test/request?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 550

#2
Valantis Profile Picture

Valantis 390

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard