web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : ePhhIY/Lqmfc+pTPPNRrTO
Power Automate - Building Flows
Answered

Failed to convert value from List Rows Present in a Table to Integer

Like (1) ShareShare
ReportReport
Posted on 3 Jul 2024 04:07:18 by

Hi,

 

I'm writing a flow on an event registration. As I have limited number of participants, my flow needs to send different email notifications to participants based on the number of people signed up, i.e. submitted responses to a MS form. My current flow allows me to add a new row as a new response is submitted. I have another table in the same excel file that counts the number of responses. I'm trying to get my condition to read from the excel file and compare my counts to an integer which I keep failing. 

 

I've tried initialize variable action, tried int() in the condition line, and am trying compose now, but neither of them could make my condition works. Under compose, the error message is:

Action 'Compose_1' failed: Unable to process template language expressions in action 'Compose_1' inputs at line '0' and column '0': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

 

Can anyone help? What should I change or any other functions I can use? Many thanks!!

compose.pngcompose1.pngcondition.png

 

  • NNNewusers Profile Picture
    on 03 Jul 2024 at 06:46:57
    Re: Failed to convert value from List Rows Present in a Table to Integer

    Hi Michael,

     

    Thank you for your response! I tried to follow your instruction and it seems to work. The For Each loop just jumps out by itself as I was adding the column I want. I also moved my condition under the loop and it finally works.

     

    My flow looks like this now and just wonder if this is the correct way and if you anticipate any issues. And does it mean For Each action could solve the problem I had? Appreciate your clarification!!

     

    compose.pngcompose1.pngcondition.png

     

    And here are the outputs of Compose action and Compose 1 action, as they work now:

    compose output.pngcompse1 output.png

  • Verified answer
    Michael E. Gernaey Profile Picture
    45,286 Super User 2025 Season 2 on 03 Jul 2024 at 04:21:15
    Re: Failed to convert value from List Rows Present in a Table to Integer

    HI @NNNewusers 

     

    The issue is that body/value is the Array pointer to the body of the message, its to the VALUE

     

    So for instance if your response looked like this

     

    {

    body:

      [

    value: {

      // insertfields here

    }

     ]

    }

     

    You need to change your input from xxxxxx[body/value] to

     

    [body/value]?['ColumnIWant'] and this assumes that the column you care about is at that level.

    Can you please post the Output of the Compose you have so I can tell you uri for the json

     

    Also, usually body/value is a Collection/Table/Array of records not a single thing

     

    So if you want to access a specific row

    you would do 

    XXXXX[body/value][0]?['columnatIndex0']

     

    So thats why you are getting that error


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete