Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

PDF file approval process finding the temp file, not the actual file.

(0) ShareShare
ReportReport
Posted on by 8

I am trying to create a workflow that goes as follows:

1) User fills out a Microsoft Form, and uploads a pdf file to SharePoint
2) Flow automatically starts, finds the file and sends it to approvers to get it approved.

 

The problem I am facing is when the PDF file is uploaded, the Form starts and finds the temporary file of the PDF, and not the actual PDF (I imagine the temp file is made while the pdf is being uploaded). Obviously this doesn't work, as a temp file the no longer exists gets send to approvers.

 

Is there any way to fix this?

  • v-litu-msft Profile Picture
    on at
    Re: PDF file approval process finding the temp file, not the actual file.

    Hi @martin_lr,

     

    Has your problem been solved?
    If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

    Best Regards,
    Community Support Team _ Lin Tu

  • Verified answer
    abm abm Profile Picture
    32,464 Most Valuable Professional on at
    Re: PDF file approval process finding the temp file, not the actual file.

    Hi @martin_lr 

     

    After the delay action filter the file using Get Items filtered by filename. Here I have hardcoded mnu.jpg which is my filename. Replace the filename accordingly.

     

    See below.

     

    image.png

  • v-litu-msft Profile Picture
    on at
    Re: PDF file approval process finding the temp file, not the actual file.

    Hi @martin_lr,

     

    After the delay action, you could use the Get item action to get the last version of the file just uploaded, instead of getting the most recent file uploaded.

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • martin_lr Profile Picture
    8 on at
    Re: PDF file approval process finding the temp file, not the actual file.

    Ive tried using delays

    What the process is now:

     

    1) trigger the flow to start when a new form is submitted

    2) wait 30 seconds
    3) find the most recent file uploaded to sharepoint and send that (link) to the approvers

     

    However this is not a great solution as if multiple files were uploaded at the same time, the wrong file could be sent out.

     

    is there a better way of linking the uploaded file with the delay?

  • abm abm Profile Picture
    32,464 Most Valuable Professional on at
    Re: PDF file approval process finding the temp file, not the actual file.

    Hi @martin_lr 

     

    Try this

     

    image.png

  • martin_lr Profile Picture
    8 on at
    Re: PDF file approval process finding the temp file, not the actual file.

    I've tried using "when file is created" and "when new form response is submitted" and they both do the same behaviour.

    Is there a way to add a timer/delay?

  • abm abm Profile Picture
    32,464 Most Valuable Professional on at
    Re: PDF file approval process finding the temp file, not the actual file.

    Hi @martin_lr 

     

    Thanks for your quick reply. This could be timing and refresh metadata behind the scene. Could try to add a delay after uploading the document? If not another option is create a new flow when a file is uploaded?

     

    Thanks

  • martin_lr Profile Picture
    8 on at
    Re: PDF file approval process finding the temp file, not the actual file.

    I am not trying to attach the file to the approval email.
    The PDF  file is uploaded to Sharepoint.

    All I want the approval email to do is hyperlink to the pdf file on sharepoint.
    Right now it hyperlinks to the temp file

  • abm abm Profile Picture
    32,464 Most Valuable Professional on at
    Re: PDF file approval process finding the temp file, not the actual file.

    Hi @martin_lr 

     

    You cannot attach items in approve emails. Please see below post.

     

    https://powerusers.microsoft.com/t5/Using-Flows/Is-is-possible-attach-a-file-in-a-approval-email/td-p/159291

     

    Thanks

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow