Skip to main content

Notifications

Power Automate - Using Connectors
Answered

Override file lock sharepoint for deletion

(0) ShareShare
ReportReport
Posted on by

So, I'm create a temporary file in sharepoint, to extract the rows and put them in a sharepoint list.

on new item in list
1. Grab the attachment from item
2. Save it to sharepoint

3. Get rows from Excel on the sharepoint file
4. Shove them in another list
5. Delete the temporary file

Issue is, I think the api calls to Excel Online lock the file (by me) but I've got no way to release that lock.
I've tried checking in the file, checking it out, nothing works, and I'm left with the temporary file being stored on there, until I go in and manually override the lock.

Is there a way to override/bypass a lock within powerautomate ?
An approach I saw was to put the delete in block in a while loop, wait 2 min, try, if fail try again, until it works, but that feels slow and kludgy.

The powerflow is the only instance of this file being used. It's where it's born, where it performs, and where it dies. Except it won't die 😞

BrokenClock_0-1658965225014.png

 

  • Re: Override file lock sharepoint for deletion

    Ah, that's great to know!

     

    Thanks 🙂

  • Verified answer
    v-jefferni Profile Picture
    v-jefferni on at
    Re: Override file lock sharepoint for deletion

    Hi @Anonymous ,

     

    Modifying in an Excel table will lock the file for about 6 minutes, you can add a Delay action to delete the file 6 minutes later.

     

    Best regards,

  • Re: Override file lock sharepoint for deletion

    I mean,

    It means my flows don't break, but I still can't seem to delete the files from power automate. I'd rather the files got deleted properly, so I don't end up with a GDPR nightmare down the line because of something in those files

  • v-jefferni Profile Picture
    v-jefferni on at
    Re: Override file lock sharepoint for deletion

    Hi @Anonymous ,

     

    Nice thought!

     

    Best regards,

  • Re: Override file lock sharepoint for deletion

    In case someone's doing a similar thing, I've ended up adding a timestamp to the file name, so I don't have flows fail because of duplicate names.

    I'll see if I find a better way out of this..

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard

Featured topics