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 Apps / Get File Content From ...
Power Apps
Answered

Get File Content From SharePoint with PowerApps

(0) ShareShare
ReportReport
Posted on by 16

Hi.

 

My Scenario is:

I have an HTML-Template that I want to use within my PowerApp.

The PowerApp then shall replace placeholders within the HTML and store that "filled out" HTML Template to SharePoint.

 

I now want to store the initial HTML-Template within SharePoint so that e.g. users can update the HTML-Template in SharePoint and  the PowerApp pulls the new template without needing to update the App itself.

 

My question:

How can I read the HTML-file content from SharePoint with PowerApps?

What I have done:

- Create a DataSource Connection to target SharePoint library

- Fetch Document with LookUp-Function.

--> Okay, now I have got the file Properties, but do not know how to access the file content and store it in a local variable or field.

 

Any idea how I can achieve this?

 

I'm thankful for any help - :-).

Manuel

I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @Manuel_P :

    I've made a test for your reference:

    1\MY library:

    vbofengmsft_0-1643867211747.png

    vbofengmsft_3-1643867349101.png

     

    2\Add a gallery and set it's items property to

    library3

    to show all files in this gallery

    3\Create a flow:

    vbofengmsft_1-1643867296946.png

    vbofengmsft_2-1643867327215.png

    4\insert the flow into the app

    vbofengmsft_4-1643867375386.png

    5\set the arrow's Onselect property to:

    Set(TheHTMLText,Bof0203.Run(ThisItem.'Full Path').htmltext)

    When the user clicks on this arrow, the HTML text of the current record will be stored in the variable 'TheHTMLText'

    6\Add a HTMLtext control and set it's HtmlText property to:

    TheHTMLText

    vbofengmsft_5-1643867508487.png

    Best Regards,

    Bof

     

     

  • Manuel_P Profile Picture
    16 on at

    Hi @v-bofeng-msft,

     

    Thank you for your respond.

    I guess that works.

     

    But is it really the intention to start an "asynchronous" workflow to fetch data from a data source?

    For me as a classic developer this does not feel right. 

    I rather would prefer a get-call/webservice call or so.

    I know this is a basic question of how to fetch data in software development but isn't there some other way of doing this?

    Are there good arguments of why to do it with a workflow rather than: "it's the only workaround available for this scenario"?

     

    Looking forward to your reply.

    Best regards.

    Manuel

  • v-bofeng-msft Profile Picture
    on at

    Hi @Manuel_P :

       In fact, I can't tell you that's the only workaround ,but using flow is the most convenient way I can think of right now, because the actions in flow are actually encapsulated APIs, which are usually very stable and easy to use.

       If you want to implement it by calling web service, you need to find a related SharePoint API (this is beyond the scope of this forum), and create a custom connector to call this API (the API can not be called directly in the Canvas app, you need to call a API by creating a custom connector).

      Best Regards,

      Bof

      

  • Lee_Morgan Profile Picture
    2 on at

    I am currently attempting to use this flow to display the contents of HTML files in my Documents Library from SharePoint, however I am having issues.

     

    To start, I have two files in my Library at the moment as seen below.

    Lee_Morgan_0-1659733893858.png

    Here is the flow I have:

    Lee_Morgan_1-1659734045891.png

     

    In the OnSelect option for the gallery, I am putting this formula in with no luck.

    Lee_Morgan_2-1659734106814.png

     

     

    What I would like it to do it set the file contents of the file selected in the gallery, and also navigate to Screen2 where the HTML text box is located and display the contents of the selected HTML file on Screen2. Thanks in advance for your help.

  • Ari00017 Profile Picture
    20 on at

    hello @v-bofeng-msft if i want to make some text customizable in this html text and store them in the sharepoint list is it possible .
    cause I have to update some fields in that document and then save that document in library.
    like in this i want to update the highlighted text when i click on that it should get editable and when i submit it should be saved in doc library.It is done in another tech but i want to do it in power apps .like in this i want to update the highlighted text when i click on that it should get editable and when i submit it should be saved in doc library.It is done in another tech but i want to do it in power apps .

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard