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 / Approval Item link -> ...
Power Automate
Answered

Approval Item link -> itemUrl not working for certain filetypes (PDF)

(0) ShareShare
ReportReport
Posted on by 9

I have a Flow using a trigger "on selected file" that generates an approval request with a link to the file to be approved. I've tested it with three file types, and XLSX and PPT files are working fine, but PDFs cause the link to not display/be generated. The link takes you to the file on sharepoint. 

I tried to generate a sharing link as a work-around but my organization doesn't allow sharing links. The flow sends a request through email as well as a teams message through a chat bot. 

 

Below is the emailed approval request, showing the 'Link to item for review' hyperlink when choosing a working filetype. If i choose a pdf instead, that text will not be generated. 

 

email.PNG

 

 

Below is the chatbots message. The text for the links are generated regardless of the file type chose, but in the case of a PDF, the 'direct link to item' text will not act as a hyperlink (interacting with it does nothing).

chat.PNG

 

Anyone else experience this issue before? 

 

 

 

Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at

    Hi @davidstephenbar 

    Instead of using "itemUrl" could you try to use "AbsoluteUri" ?absoluteuri.png

     Hope that helps!

    Ferran

  • davidstephenbar Profile Picture
    9 on at

    Hey, thanks for the suggestion. For some reason absoluteuri does not show up as an option in the dynamic content list, I'm not quite sure why though. 

  • fchopo Profile Picture
    8,003 Moderator on at

    Hi @davidstephenbar 

    Could you try the following:

    approval.png

     

    Hope it helps!

    Ferran

  • Verified answer
    davidstephenbar Profile Picture
    9 on at

    So for posterity's sake, here is the cause of the problem and the solution I figured out:

     

    The issue was a combination of a couple of things. My organization's sharepoint policy doesn't allow us to download or print files when browsing our sharepoint from certain devices. When referencing a file using itemUrl, it gives a direct link to that file, which results in the browser trying to download it, or in the case of this flow, it builds an empty link.

     

    I looked at the link that gets created when using the 'copy link' function directly in sharepoint and found some parameters attached to the link that aren't created when using itemUrl. The full link looks like:

     

    www.fakelink.com/docs/thisfile.pdf?csf=1&web=1

     

    The csf is to be set to 1 when sharing with people who already have access, and otherwise it will try and initiate a download. 

     

    My solution was to take the itemUrl link, turn it into a string and then concatenate with ?csf=1&web=1.

     

     

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard