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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Can't upload a file to...
Power Automate
Unanswered

Can't upload a file to AzDO repo when flow runs a second time

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
Hi Power Users,
'
I'm building a flow that every time a new file is added to a Sharepoint it uploads it to an AzDO repository, I can manage it to run correctly one time, if I run the flow for a second time I get this error:
 
TF401028: The reference 'refs/heads/master' has already been updated by another client, so you cannot update it. 
This is request I'm using:



If you have any corrections or insight I would like to read it.

Thanks in advance
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
     
    Are you trying to add/commit the same file3.zip for the second time?
     
    In the request the oldObjectId ref is 0000000000000000000000000000000000000000. After that request it would have a different id because it already exists (the newObjectId should be returned in the outputs). That is probably the reason why the second run is failing, because the oldObjectId is not 0000000000000000000000000000000000000000 anymore.
     
    Alternatively, you might workaround this by generating a unique file name for the zip (you can use a utcNow function for that) every time you add the same file. Below is a sample expression:
    concat('/', utcNow('yyyyMMddHHmm'), 'file3.zip')
     
    Below is some documentation of Refs requests:

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard