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 / an HTTP request to Sha...
Power Automate
Unanswered

an HTTP request to SharePoint (POST method)

(0) ShareShare
ReportReport
Posted on by 5

agregaty.png

Hi all

 

In sharepoint I have grouped elements and I would like to receive the sum of points of these groups. To calculate the sums of individual groups of elements I use the "an HTTP request to SharePoint" (POST method). Flow worked fine until a certain point when an error started popping up: .

1.First photo
InvalidTemplate. Unable to process template language expressions in action 'Agregaty' inputs at line '0' and column '0': 'The template language expression 'body('Send_an_HTTP_request_to_SharePoint')['body']['Row']' cannot be evaluated because property 'body' doesn't exist, available properties are 'Row, FirstRow, FolderPermissions, LastRow, RowLimit, FilterLink, ForceNoHierarchy, HierarchyHasIndention, CurrentFolderSpItemUrl'.
 

However, when I look at the flow as it went in action, an HTTP request to SharePoint body is visible

2.Second photo

 

I don't know how to fix it because I didn't change anything in the flow that worked and the flows that failed.

 

Categories:
I have the same question (0)
  • SamLed Profile Picture
    2,338 Moderator on at

    Hi,

     

    Give a try with following expressions: body(''Send_an_HTTP_request_to_Sharepoint)['Row'].

    ______________________________________________________________

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

  • jackpol Profile Picture
    5 on at

    It worked but had another problem

     

    The execution of template action 'Agregaty' failed: The evaluation of 'query' action 'where' expression '{
    "Nazwa jednostki": "@item()?['JednostkaOrganizcyjna']",
    "Suma kilometrow": "@item()?['SumaDystans.SUM.agg']",
    "Suma punktow": "@float(item()?['Punkty.SUM.agg'])"
    }' failed: 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

     

    I would like to sort from the highest value of points for each group to the smallest. Do you know how I can do it? The problem here is the space, because between "1,000" it reads as a different type by a space

  • sandeepstw Profile Picture
    312 Moderator on at

    Hi There,

     

    This is because of the comma in "1,000" causing a type mismatch. Use 'replace'  like this 

    '@float(replace(item()?['Punkty.SUM.agg'], ',', ''))' .

     

    Once you have corrected the type error, you can sort the results based on the 'Punkty.SUM.agg' values.

     

    Please give kudos and mark as solution if it helps.  

      

    Thanks, 

    Sandeep Mishra 

  • jackpol Profile Picture
    5 on at

    The execution of template action 'Agregaty' failed: The evaluation of 'query' action 'where' expression '{ "Nazwa jednostki": "@item()?['JednostkaOrganizcyjna']", "Suma kilometrow": "@item()?['SumaDystans.SUM.agg']", "Suma punktow": "@float(replace(item()?['Punkty.SUM.agg'], ' ', ''))" }' failed: 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

     

    I changed space with float(replace(item()?['Punkty.SUM.agg'], ' ', '')). Still not working 😞

  • sandeepstw Profile Picture
    312 Moderator on at

    Hi There,

     

    To fix the issue, you should ensure the string format is convertible to a float. Use the  'replace' function to also replace any commas , with a dot  . to ensure the correct decimal format. Ensure the data does not contain any non-numeric characters after the 'replace' functions have been applied.

     

    For example - 

    "Suma punktow": "@float(replace(replace(item()?['Punkty.SUM.agg'], ' ', ''), ',', '.'))"

     

    Please give kudos and mark as solution if it helps.  

      

    Thanks, 

    Sandeep Mishra 

     

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard