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 / Flow versus Office365G...
Power Apps
Answered

Flow versus Office365GroupsHttpRequest Connector Adding Metadata to a SP Doc Lib from related Lists. To Flow or Not to flow?

(0) ShareShare
ReportReport
Posted on by

A Big Thank U to the entire PowerApp Community

 

The question NOW for me, TO FLOW or NOT to FLOW, versus OFFICE365GROUPS.HTTPREQUEST connector

 

I have been using a flow for some time now with no issues. (see FIGURE B:1-4 below) From within my Power App the flow gets an attachment from Sharepoint List (A) attachment data card control within a form, and uploads to a SP Document Library (AB), at the same time from the SP list A, extracts the Product ID number value from the same Form was in, to the SP Doclib AB.

This method been working for a while now BUT until recently for some odd reason, been getting a JSON error message (below Fig A). I tried to wrap parameter text with value etc… restarted rebooted rewired , still issues….what is weird is EVEN though am getting the error message the flow runs successfully and the desired result is achieved. I just can't seem to shrug this error message off.  

Fig A

Shazam007_0-1677584520016.png

 

After coming across the Office365GroupsHttpRequest Connector Thanks to @Reza Dorrani video, https://www.youtube.com/watch?v=n3mhe88BI34&t=790s 

I found this method yielding improved results. 

 

On a blank screen, On a button I put the code below in, which pulls from an attachment control (outside of the form). 

(ForAll(DataCardValue12.Attachments,Office365Groups.HttpRequest("https://graph.microsoft.com/v1.0/sites/......./root:/"&ThisRecord.Name&":/content","PUT",ThisRecord.Value)))

 

This solved the error issue and 1 less flow to call. But My problem is I cannot seem to find a combination of the above code with a patch or collection to get the desired result (See Figure 4 below ) i.e. Product ID Value from a selected gallery item SP list A, to the uploaded attachment column in the SP doc lib AB. all in one shot.

 

Is it possible to use office365groups.httprequest connector with a Patch or Collection, or maybe a combination with flow in a Power Apps environment to achieve desired results ? 

 

FIGURE B below 1-4

Within my Form , OnSuccess I have a FlowAddanitemtoSPandDocLib.Run(Varlastitem.ID) set to run when an attachment is added, which then triggers flow , and pulls the Product ID number variable with it to the Doc Lib AB

 

1                                                                                   

Shazam007_3-1677585036176.png

2

Shazam007_4-1677585078626.png

 

3

Shazam007_5-1677585114349.png 

4 - Current result of flow    

Shazam007_7-1677585815075.png

 

 

 

Categories:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hi @Shazam007 

     

    Is the ParseJSON/Untyped feature enabled for your App?

    There has been a change to this feature recently that results in most responses throwing this error.

     

    Could you try casting the flow results returned to a specific type using JSON() function as a wrapper? I know there's a thread in the experimental section for feedback so it might be worth putting in some info there and they do mention about casting types:

    https://powerusers.microsoft.com/t5/Power-Apps-Experimental-Features/ParseJSON-feedback/m-p/1877977 

     

    Cheers,

    Sancho

  • Shazam007 Profile Picture
    on at

    Thank you for quick response. See feedback in RED

     

    Is the ParseJSON/Untyped feature enabled for your App? Yes

    There has been a change to this feature recently that results in most responses throwing this error. Noted

    Could you try casting the flow results returned to a specific type using JSON() function as a wrapper? Yes Tried , still errors

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Ok, as I mentioned, you'll need to give your feedback around this issue in the thread that covers this experimental feature as there are no documented fixes or workarounds for this kind of thing as it's still an experimental feature:

     

    https://powerusers.microsoft.com/t5/Power-Apps-Experimental-Features/ParseJSON-feedback/m-p/1877977 

     

    Cheers,

    Sancho

  • Verified answer
    Shazam007 Profile Picture
    on at

    Hi

    I managed to find a solution for the problem - to land documents (without using a flow) from an attachment control to document library with some meta data from Sharepoint List ... see steps added code highlighted in red.

    ForAll(DataCardValue52.Attachments,Office365Groups.HttpRequest(" https://graph.microsoft.com/v1.0/sites/..../root:/"&ThisRecord.Name&":/content","PUT",ThisRecord.Value
    Refresh(DocLibAB);
    ClearCollect(collastdoclib,Last(DocLibAB));
    ForAll(collastdoclib,Patch(DocLibAB,LookUp(DocLibAB,ID=collastdoclib[@ID]),{ProdId2Num:varproditem2.ID}))
    *Note*
    ProdId2Num is column name within SP Doc lib AB where the value from the SP list A will land
    varproditem2.ID is the prod SP LIST ID value from SP list A. This variable was initiated and set when clicked a button within a gallery list item of SP list A. The Button had following on the onselect; Set(varproditem2,thisitem);Navigate(newuploaddoclib)

     

    Steps

    Watch this excellent video by Reza Dorrani  to understand the first forall part - Power Apps DIRECTLY upload files to SharePoint Document Library | GRAPH API - https://youtu.be/n3mhe88BI34


    1.After the first FOR ALL I added a new line; REFERESH of the doc library
    2.COLLECTION of that last or latest doclib record just added
    3.then a new FORALL to MATCH ID's of Collection with Last Doc Lib AB record ID
    4.PATCH the variable containing the Sharepoint list ID value to the Doc Lib AB Column (this is the relational table part wanted to achieve)

    After a few test runs Worked... No need for the flow

    Thanks 

    Shahzaad

     

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 301 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 297 Most Valuable Professional

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 195

Last 30 days Overall leaderboard