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!!
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!!
And here are the outputs of Compose action and Compose 1 action, as they work now:
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
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492