I am using the 'Send auto-replies to senders when a new email arrives after office hours' template. When I run the flow. I get the following error:
The value of first parameter is of type 'Null' but the function 'substring' expects a string.
Here is what I have:
Thanks in advance.
Use this:
substring(triggerBody()?['receivedDateTime'], 11, 8 )
You could get the integer value for the hour, then perform a check so see if it's between, say 9 and 17 for office hours:
int(formatDateTime(triggerOutputs()?['body/receivedDateTime'],'HH'))
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Just a note, I made no changes to the template. The expression is:
substring(triggerBody()?['DateTimeReceived'], 11, 8 )
Sounds like it doesn't like something in your substring. Can you post that expresssion