Hi I have a flow that attaches 2 unique files into an email then sends a message to 80+ recipients, all works fine.
The issue is that when it is complete it returns a failed message as if it hasn't worked, but it has!
Any ideas? This is the message:
The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@contains(item()?['Name'], items('Apply_to_each_2')?['field_0'])' failed: 'The template language function 'contains' expects parameters of matching types: a dictionary and a key (string), an array and a value (object), or a string and a substring. The provided types 'String' and 'Null' are incompatible. Please see https://aka.ms/logicexpressions#contains for usage details.'.
Thanks
Show your flow.
Do you have any values that are Null within that condition? If so, you should put an empty() check within the expression so that if a value is null, it does something else instead of trying to compare null to a string.
So like:
contains(item()?['Name'],if(empty(items('Apply_to_each_2')?['field_0']),'NoField',items('Apply_to_each_2')?['field_0']))
I don't know exactly how you need to arrange it, but try using empty somewhere as a way to deal with null values.
I don't know if this will solve your problem, but I would test the approach to see if it works.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1