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 / Building a flow - save...
Power Automate
Unanswered

Building a flow - save e-mail attachement and contiunously update it

(0) ShareShare
ReportReport
Posted on by 18

Hi Dear Community,

 

I would like to build a flow, which automatically update file content, in an existing file in Sharepoint.

The trigger is an e-mail which comes in a daily bases with a certain subject, from a certain person.

 

I already started it and it runs succesfully, but the file content is not updated at all.

 

Thank you for the tips and help in advance!

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

    Hi @anettpb ,

     

    Could you please show your flow?
    Unfortunately, in SharePoint we cannot update it by creating a file with the same name. But if the name of your email attachment is always the same as the file name in Sharepoint, you can find it in Sharepoint through the file name, delete it, and finally create a new file.

     

    Best Regards,

    Dezhi

  • anettpb Profile Picture
    18 on at

    Hi @v-dezhili-msft 

     

    The name of the attachement is changing, only the e-mail subject and "from", furthermore the content structure is the same.

    So you suggest to always delete the previous versions and save the attachement as a new/create file & get content?

    Anyhow I attached a pic about the flow.

     

    Thank you,
    Anett

  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @anettpb ,

     

    If the subject of your email is always the same, you can try to create a subject column in your SharePoint folder to store the subject of the email, then you can find the file through this column and delete it, and finally recreate a new file with the email attachment folder and update the subject column.
    Below is my test for your reference.

    vdezhilimsft_0-1673947900196.png

    vdezhilimsft_1-1673947927907.png

    vdezhilimsft_2-1673947994093.png

    vdezhilimsft_3-1673948040381.png

     

    Best Regards,

    Dezhi

     

     

  • anettpb Profile Picture
    18 on at

    Dear @v-dezhili-msft 

     

    Thank you for your help!

    Unfortunately the flow failed. Based on the error message it cannot find the subject column in sharepoint.

    I am sending the flow and the SP site set-up as well.

     

    Can you please help me what can cause this problem?

     

    Thanks a lot,

    Anett

  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @anettpb ,

     

    Is the place I circled the column you added?
    Please try to replace the s of the subject in the filter query with S.

     

    automated flow_v2_1.jpg

    automated flow_v2.jpg

    Best Regards,

    Dezhi

  • anettpb Profile Picture
    18 on at

    Hello @v-dezhili-msft 

     

    Yes, you are right, that solved the problem, thanks a lot!

    But here is another issue, the prev. file not has been deleted. The goal would be to have 1 file in this folder, with up-to-date data.

    Is it possible that the ID is not enough to find the file what should be deleted? What if I choose Subject as well?

     

    Thanks again your suggestions and help!

     

    Best regards,

    Anett

  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @anettpb ,

     

    After the flow runs successfully, do you still have the files to be replaced in your folder?
    You can check the running history of your flow to confirm whether the Delete file action is running well.

    vdezhilimsft_0-1674118352940.png

    In order to prevent handwritten input errors, we can try to quote the email subject directly from the dynamic content.

    vdezhilimsft_1-1674118761167.png

    vdezhilimsft_2-1674118825374.png

     

    vdezhilimsft_3-1674118901134.png

     

    Best Regards,

    Dezhi

     

     

  • anettpb Profile Picture
    18 on at

    Dear @v-dezhili-msft 

     

    I changed the manual typed parameters, but the files still remained in the folder:

    anettpb_0-1674202811670.png

    anettpb_1-1674202861616.png

     

    anettpb_3-1674202981490.png

     

    anettpb_4-1674203047236.png

     

    anettpb_5-1674203129024.png

     

    Do you have any idea what is the problem?

     

    Thank you so much,

    Anett

  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @anettpb ,

     

    Let's try to use filter array action.

    vdezhilimsft_1-1674206683724.png

    vdezhilimsft_2-1674206729825.png

    Notice these two columns in the run output.

     

    vdezhilimsft_0-1674206598959.png

     

    Best Regards,

    Dezhi

     

  • anettpb Profile Picture
    18 on at

    Dear @v-dezhili-msft 

     

    The delete function is still not working. It is weird that here I cannot find any data/code:

     

    anettpb_0-1674460432096.png

    I edited the flow as you described:

    anettpb_1-1674460513283.png

     

    Thank you for any further suggestion.

     

    Best regards,
    Anett

     

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard