cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
efialttes
Super User
Super User

HTTP trigger with object considered as NULL by Flow

Hi all

I am working on a flow that is triggered via HTTP. The JSON schema for the body includes a two objects and several strings.

This is the request from a second flow:

HTTPrequest.png

 

 

And this is the trigger executed on the flow I am working:

 

HTTPtrigger.png

 

The flow takes all this input parameters and composes a string with all of them. 

Object#1 is properly added to the string composed as a whole

Object#2 is also properly added to the string composed as a whole

When dealing with parameters from Object#1, they are properly added to the string composed

When dealing with parameters from Object#2, however, they are not added to the string composed. It seems flow consider them as NULL.

 

So, I go to Run History, and click on the instance executed. I see the expected values for Object#2 in the Trigger, but for some reason they are not added to the string composed.

 

I've tried to add a "parse JSON" action block to parse Object#2 between the trigger and the "Send an email", but the problem persists. Surprisingly, when checking Run History from the instance executed, I see the expected values for Object#2 in the input and output of the "parse JSON".

 

ParseJSON.png

 

The expression to compose the string is the following:

concat(string(triggerBody()?['Firmware']),'<br>',string(triggerBody()?['ModelAliasNames']),'<br>',triggerBody()?['TestingLevel'],'<br>',triggerBody()?['DeadLine'],'<br>',triggerBody()?['Brand'],'<br>SW Version: ',triggerBody()?['Firmware']?['SW Version'],'<br>Customization: ',triggerBody()?['Firmware']?['Customization'],'<br>Commercial Name: ',triggerBody()?['ModelAliasNames']?['Commercial Name'],'<br>Model Name: ',triggerBody()?['ModelAliasNames']?['Model Name'],'<br>Internal Name: ',triggerBody()?['ModelAliasNames']?['Internal Name'])

 

Object#1 is triggerBody()?['Firmware'], Object#2 is triggerBody()?['ModelAliasNames']. I see their values in the string composed.

 

Object#1 parameters are:

triggerBody()?['Firmware']?['SW Version']

triggerBody()?['Firmware']?['Customization'] 

I see their values in the string composed.

 

Object#2 parameters are:

triggerBody()?['ModelAliasNames']?['Internal Name']

triggerBody()?['ModelAliasNames']?['Commercial Name']

triggerBody()?['ModelAliasNames']?['Model Name']

I do not see their values in the composed string

 

I attach below an example of the string composed. Suggestions are welcome!

 

 RunHistory.png

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



3 REPLIES 3
v-monli-msft
Community Support
Community Support

Hi @efialttes,

 

I have noticed your issue to the senior engineers and will update here if there is any response later.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-monli-msft
Community Support
Community Support

Hi @efialttes,

 

Instead of 

triggerBody()?['ModelAliasNames']?['Internal Name']

triggerBody()?['ModelAliasNames']?['Commercial Name']

triggerBody()?['ModelAliasNames']?['Model Name']

 

Please try with:

String(triggerBody()?['ModelAliasNames']?['Internal Name'])

String(triggerBody()?['ModelAliasNames'])?['Commercial Name'])

String(triggerBody()?['ModelAliasNames']?['Model Name'])

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Mona

First of all, thank you for your fast response!

Unfortunately, the suggestion from your senior engineers is not working 😞

 

I've also tried to add a second Parse JSON action block, using the following expression as Content:

json(string(triggerBody()?['ModelAliasNames']))
...and the following JSON schema:
{
"type": "object",
"properties": {
"Commercial Name": {
"type": "string"
},
"Model Name": {
"type": "string"
},
"Internal Name": {
"type": "string"
}
}
}
 
Then I have added another Compose action block with the following expression:
concat('Commercial Name: ',string(body('Parse_JSON_2')?['Commercial Name']),'<br>ModelAliasNames: ',string(body('Parse_JSON_2')))
 
But on Run History, I see the following Compose action block output
Commercial Name: <br>ModelAliasNames: {"Commercial Name":"Galaxy Tab A","Model Name":"SM-T585","Internal Name":"0"}
 


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,681)