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 / Powerapps flow to get ...
Power Automate
Unanswered

Powerapps flow to get PDF file from sharepoint

(0) ShareShare
ReportReport
Posted on by 83

Hello,

 

I want to beable to open a PDF file from a Sharepoint document library within my powerapp. for this to work using Power Automate.

 

I start with a https get Request as trigger and tha i'm trying to get the itemid by using Variable:

 

trigger()['outputs']['queries']['itemid']
 
i want to use the itemid to get the file contact of the pdf file that triggerd the flow.
 
And then i deliver the file contact back to my powerapp.
 
The problem is that 
trigger()['outputs']['queries']['itemid'] is not working i get an error:
Unable to process template language expressions in action 'Initialize_variable' inputs at line '1' and column '2871': 'The template language expression 'trigger()['outputs']['queries']['itemid']' cannot be evaluated because property 'queries' doesn't exist, available properties are 'headers'. Please see https://aka.ms/logicexpressions for usage details.'.
 
hopefully someone knows a better way
Categories:
I have the same question (0)
  • MJain Profile Picture
    2,450 on at

    Hi @icturion ,

     

    queries exist in triggerBody.

    use Compose action to check what is available in queries like this :

    triggerBody()?['queries']
     
    Thanks
  • icturion Profile Picture
    83 on at

    thx for the quick respons.

     

    if i use trigger or triggerbody the only options are:

    - UriPathAndQuery

    - uriQuery

    trigger.JPG

    I got queries from the http get function. 

     

     

  • MJain Profile Picture
    2,450 on at

    Hi @icturion ,

     

    Please provide flow screenshot of initial steps. 

     

    Thanks

  • icturion Profile Picture
    83 on at

    fullflow.JPG

  • icturion Profile Picture
    83 on at

    Hi,

     

    this article does the same steps: https://centricconsulting.com/blog/how-to-use-powerapps-to-view-pdfs-step-2-microsoft-flow_portal/

     

    But this doesn't work.

     

    Maybe someone knows a better way to make the PDF viewer work with pdf that are located in a sharepoint document library.

  • MJain Profile Picture
    2,450 on at

    Hi @icturion ,

     

    itemid is passed from Powerapp and this request should be set as "Get" under Show advanced option. Once you do this it should be working fine.

     

    Thanks 

  • yabela Profile Picture
    53 on at

    Hi, have you managed to solve this, please? Getting the same error with the below flow: 

     

    Screenshot_5.png

     

    Thanks.

  • Verified answer
    icturion Profile Picture
    83 on at

    Hi Yabela,

     

    i got i to work.

     

    This is my powerautomate that i use:

    flow pdf.JPG

     

    This is the code in my PowerApp.

    screen - Onvisible:

    pdateContext({ loading_v: true });;
    UpdateContext({
    pdf_v:
    DocumentophalenPowerAppBHV.Run(
    Concatenate( First( Split( selecteditem_v.Naam; "." ) ).Result; ".pdf" )
    )
    });;
    UpdateContext({ loading_v: false })

     

    PDF viewer - Document:

    pdf_v.pdf

     

     

  • Laur_Adri Profile Picture
    2 on at

    Hi,

     

    The flow you use was working for me for about 2-3 months until yesterday... 

    Did the same happen to you or is yours still working?

     

    Didn't change anything in the code.

  • icturion Profile Picture
    83 on at

    Hi,

     

    For us the flow is still working.

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

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard