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 / Receiving attachment w...
Power Automate
Unanswered

Receiving attachment with the same pdf name saving in sharepoint

(0) ShareShare
ReportReport
Posted on by 38

Hello,

 

We are using power automate to extract pdf file from emails and saving them in a sharepoint file.

The only problem is that sometimes a supplier send multiple pdf file with the same pdf name. It overwrites the file so insteat of 20 differenct pdf files i have only 1 pdf file. 

 

Is there a solution to automate that he's changing the name of the pdf file when this name already excist? 

 

Thank you

 

Best regards

Patrick

Categories:
I have the same question (0)
  • srduval Profile Picture
    1,760 Moderator on at

    Probably the easiest solution is to append date time to the file name when saving to sharepoint. Or if it's multiple attachments on one email with the same name, when going through the array to save the attachments, add an increment variable step and add the variable to the file name. So it would be Attachment1.pdf Attachment2.pdf etc...or Attachment_202204260855.pdf

  • PS-13051242-0 Profile Picture
    38 on at

    I have looked into the variable in the file name, but i can't figure it out. Where do i apply the variable? 

     

    The solotion to add the time and date isn't a option, because files are being send in one batch, so everything is being received the same time.

  • srduval Profile Picture
    1,760 Moderator on at

    Initialize variable at the top of the flow (anywhere outside the apply to each loop) and set the type to be integer and an intial value of 0 or 1. Then inside the apply to each loop, i assume you have a create file action? If so you should have a field where you are setting the new file name. You will want to put the variable (from dynamic content menu) in that field. 

     

    Then the next action step is to increment variable by a value of one so behind the scenes it's doing the formula of x=x+1

  • PS-13051242-0 Profile Picture
    38 on at

    I can't figure it out. I have applied the variable, but it only those it on the first invoice, they other invoices he don't attach the number up going. also de files arent saved as pdf but we need to do a extra action to change that. 

     

    I've put attach the schedule of how i've made it now, can you see what i need to change? 

    PatrickAxFlowDC_0-1651154004920.png

    PatrickAxFlowDC_1-1651154050137.png

     

     

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