Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

SharePoint file uploading

(0) ShareShare
ReportReport
Posted on by 16

Hi All,

I am new to this program and community and honestly I am loving this Automation.
I tried few automation on my own and it works fine.

But for this simple flow (not for me) I need your help.

The idea of the flow is this:
1. I have to download the email attachment which is in zip format (always) and it contains a excel file in it.

2. After downloading I have to extact it and upload it to the sharePoint location. And I have to delete the previous date attachment from it which I have uploaded earlier.

 

Now I have to do this everyday. So I want to your help me with this in making this flow.

So in conclusion.
I have to download that zip email attachment, extract it and upload the file to the SharePoint location also I have to remove the previous day file from there. After that I have to delete this zip file as it has no use now.

I hope you got the idea what I want.

Thanks in Advance.

  • BCBuizer Profile Picture
    22,262 Super User 2025 Season 1 on at
    Re: SharePoint file uploading

    Hi @UCantStopME ,

     

    Typically you'd use the dynamic content option in Power Automate, but sometimes you'll need a bit more than that which is where expressions come in. A full overview of expressions can be found here: Reference guide for expression functions - Azure Logic Apps | Microsoft Learn

     

    In the below screenshots you can see the parameters that should be given to the Get Attachment (V2) action to retrieve the contents of the first attachment of the Email triggering the flow:

    BCBuizer_0-1697194874636.png

    Ps. Don't worry about the difference in User Interface, this is the new one that was introduced recently. You can use the same dynamic content/expressions in both interfaces:

    messageId:
    
    @triggerOutputs()?['body/id']
    
    attachmentId: 
    
    @first(triggerOutputs()?['body/attachments']))?['id']

    These you can literally copy/paste in the fields in your action and they should work.

     

  • UCantStopME Profile Picture
    16 on at
    Re: SharePoint file uploading

    Hi @BCBuizer 

     

    Thank you 

    But

    I am more confused for now don't know exactly how to work with identifiers. Means how to identify a file and get it's details to perform action on that particular file.

  • BCBuizer Profile Picture
    22,262 Super User 2025 Season 1 on at
    Re: SharePoint file uploading

    Hi @UCantStopME ,

     

    With the above I'm sure you'll get a long way. In case you run into any issues, let me know.

  • UCantStopME Profile Picture
    16 on at
    Re: SharePoint file uploading

    Hi Thanks @BCBuizer 

    I got the idea, if possible can you share me the compete flow, as I am very new to this tool so if you skip any step I won't able to understand it completely.
    Thanks

  • BCBuizer Profile Picture
    22,262 Super User 2025 Season 1 on at
    Re: SharePoint file uploading

    Hi @UCantStopME ,

     

    My idea is to have a flow that is triggered by the arrival of the email where you'll have to set some conditions so the rest of the flow is only executed for the right Emails.

     

    After triggering, first the existing Excel file is retrieved and then deleted: 

    BCBuizer_1-1696889978087.png

     

    Again you'll have to set conditions to retrieve the right file only. Since the Get Files action will return a table, the first function can be used to prevent the Delete file action from being placed in a "Apply to each" loop.

     

    After the existing file has been deleted, the zip file that's attached to the email should be saved, extracted and then deleted:

    BCBuizer_2-1696890035685.png

    In case the Excel file in the Zip file always has the same name, setting the "Overwrite Flag" in the Extract folder action to Yes should make the deletion of the existing Excel file redundant.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1