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 / Delete file part of fl...
Power Automate
Answered

Delete file part of flow issues

(0) ShareShare
ReportReport
Posted on by 8

Currently building a flow that:

  • creates an MS Team via an approval
  • Creates a temp file in the "Shared Documents/General" directory called "PleaseDelete.docx"
  • Copies folder structure from a "template site structure"
  • Deletes the "temp" file

All working as expected apart from the section to delete the temp file.

I use the "Get Files" action to locate the temp file but run into issues when I try and use the "Delete file" action. For the "Site Address" field I populate using the target sharepoint site which contains "TeamName" dynamic content which is the name of the newly created MS Team in the previous steps. For "File Identifier" I would expect to find the "Identifier" parameter from the "Get Files" dynamic content but I cannot see it anywhere. 

Obviously Im missing the vital concept here. Have posted the relevant flow grab below:

 

HRC_Neil_0-1648574802831.png

 

Thanks in advance!

 

N

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @HRC_Neil :

    Please try this expression:

    items('Apply_to_each')?['{Identifier}']

    vbofengmsft_0-1648779395792.png

    Best Regards,

    Bof

     

  • Riyaz_riz11 Profile Picture
    4,048 Super User 2026 Season 1 on at

    Hi , 

    You can try using this command in file Identifier.

    items('Apply_to_each')?['{Identifier}']

     

    Regards

    Ahammad Riyaz

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

     

    @HRC_Neil

  • HRC_Neil Profile Picture
    8 on at

    Hey Bof, many thanks for the reply. Ok so extracted the "delete" part of the original flow into a separate flow for testing. The var "TestTeam36" refers to an existing Team with the test file to delete. Have added the expression as advised but get a 400 error regarding JSON format. Flow and error grabs below.

     

    Thanks!

    flow_grab_2022_04_01.jpgflow_grab_error_2022_04_01.jpg

     

  • HRC_Neil Profile Picture
    8 on at

    Thanks for the reply Ahammad Riyaz. Bof had the same idea. Have replied above.

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @HRC_Neil :

      You need to put the formula into the expression code bar:

    vbofengmsft_0-1648805045214.png

    Best Regards,

    Bof

     

  • HRC_Neil Profile Picture
    8 on at

    What a plumb! Of course you do.

     

    Thanks Bof, tested and working!

     

     

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard