cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Woodmeli
Frequent Visitor

Can't Publish Flow: Condition Contains Invalid Expressions

I'm trying to publish this flow so I can test it, but I keep getting the same error message: 

The input parameter(s) of operation 'Condition' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'Condition'.


I can't find any errors - any suggestions on where I'm going wrong?
Woodmeli_0-1714176767750.png

 

3 REPLIES 3
BenClistBC2
Advocate I
Advocate I

Kia ora @Woodmeli,

 

Nothing looks obviously wrong from the screenshot, can you please click Code View in the panel on the right and either screenshot or copy and paste what's in there?

 

Ngā mihi,

Ben

 

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Hi Ben,

Here's the code:

{
"type": "If",
"expression": {
"and": [
{
"not": {
"equals": [
"@body('Get_book_details')?['pu_bookimage']",
"@null"
]
}
}
]
},
"actions": {
"HTML_book_image": {
"type": "Compose",
"inputs": "<img src=\"data&colon;image/jpeg;base64, @{body('Get_book_details')?['pu_bookimage']}\"/>"
},
"Send_an_email_(V2)_-_Include_Image_copy": {
"type": "OpenApiConnection",
"inputs": {
"parameters": {
"emailMessage/To": "@triggerBody()?['pu_studentemail']",
"emailMessage/Subject": "New Loan Taken Out",
"emailMessage/Body": "<p>@{triggerBody()?['pu_studentfullname']}, you have taken out @{body('Get_book_details')?['pu_bookname']} on loan.</p><p>@{outputs('HTML_book_image')}<br>The book is due back on @{formatDateTimetriggerBody()?['pu_datedue'], 'ddd dd MMM yyyy')}</p><br><p>Many thanks the <b><strong>Contoso Library Team</strong></b></p><p>@{outputs('ContosoElementaryImage_copy')}</p>",
"emailMessage/Importance": "Normal"
},
"host": {
"apiId": "/providers/Microsoft.PowerApps/apis/shared_outlook",
"connection": "shared_outlook_1",
"operationId": "SendEmailV2"
}
},
"runAfter": {
"HTML_book_image": [
"SUCCEEDED"
]
},
"metadata": {
"operationMetadataId": "77353412-34a5-4719-9c49-c3b41d162e3c"
}
}
},
"else": {
"actions": {
"Send_an_email_(V2)_-_No_Image": {
"type": "OpenApiConnection",
"inputs": {
"parameters": {
"emailMessage/To": "@triggerBody()?['pu_studentemail']",
"emailMessage/Subject": "New Loan Taken Out - No book image",
"emailMessage/Body": "<p>@{triggerBody()?['pu_studentfullname']}, you have taken out @{body('Get_book_details')?['pu_bookname']} on loan.</p><p><br>The book is due back on @{formatDateTimetriggerBody()?['pu_datedue'], 'ddd dd MMM yyyy')}<br><br>Many thanks the <b><strong>Contoso Library Team</strong></b></p><p>@{outputs('ContosoElementaryImage_copy')}</p>",
"emailMessage/Importance": "Normal"
},
"host": {
"apiId": "/providers/Microsoft.PowerApps/apis/shared_outlook",
"connection": "shared_outlook_1",
"operationId": "SendEmailV2"
}
},
"metadata": {
"operationMetadataId": "77353412-34a5-4719-9c49-c3b41d162e3c"
}
}
}
},
"runAfter": {
"ContosoElementaryImage_copy": [
"SUCCEEDED"
]
}
}

Kia ora @Woodmeli,

 

Apologies for the delay, the condition in your statement should be is not equal to. At the moment you're trying to embed an image when there isn't one.

 

Ngā mihi,

Ben

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Helpful resources

Announcements

Learn what to expect in the Power Up Program

Since its inception in 2022, the Power Up Program has evolved based on feedback from learners and Microsoft Partners and customers. Today's Power Up learners can expect to learn the fundamentals of Microsoft Power Platform in the accelerated seven-week, video-based Power Up Maker course.   Hear from Principal Program Manager, Dimpi Gandhi to discover the latest enhancements and meet the Microsoft MVPs, Rory Neary and Charlie Phipps, who partnered with the Microsoft Power Up Program to create the Power Up Maker course to guide learners to use the Microsoft Power Platform to develop custom applications, build dazzling report dashboards, or create efficiencies through automation.  

Welcome to the Power Up Program Community

The Power Up Program is a free upskilling program where nontechnical people can learn the fundamentals of Microsoft Power Platform. The Power Up Maker course is a seven-week self-paced virtual learning plan that include video-based objectives featuring Power Apps, Power BI and Power Automate.  As a member of the Power Up Community, you can grow your skills and build connections. You can post questions to get help with the curriculum and hands-on exercises from experts and peers in the product boards.  Check out the Community Information & Feedback board to find help or provide feedback with the community experience, and please take time to post in the Social board to tell us more about yourself. If you're new to the Power Up Program and looking for information to register. You can sign up at PowerUp.Microsoft.com.

Users online (6,537)