Hi there,
I have the following flow:


In short, I pull items from an SP list, filter them for only dates in the future, then will send an email a x days before the listed date, make a table and email that to a particular person. However, it sends me five emails, one for each of the filtered rows coming out of Filter Array.
When I tried to take this out of the Apply to Each I get the following error :
Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Null'.
I think this refers to the condition, where I've had to convert a string to a date to compare it to utcNow. That looks like:
formatDateTime(parseDateTime(concat(split(item()?['FSAGDate'], '/')[2], '-', split(item()?['FSAGDate'], '/')[1], '-', split(item()?['FSAGDate'], '/')[0])), 'yyyy-MM-dd')
I can only assume the reference to FSAGDate in here (my string that needs to be converted to a date) is somehow not being read properly.
I thought I finally had this working, but now I get 5 emails!