This is closely related to my post from 4 weeks ago.
I set this flow up on a coworker's computer and it seemed to be running successfully until I found out that it is intermittently, but consistently, stumbling on extracting the date from this part of each incoming email:
I'm using the following in a compose function to extract the date sent
InvalidTemplate. Unable to process template language expressions in action 'Intake_Date' inputs at line '1' and column '2879': 'The template language expression 'trim(split(split(body('Html_to_text'),'Sent:'),'To:'))' cannot be evaluated because array index '1' is outside bounds (0, 0) of array. Please see https://aka.ms/logicexpressions for usage details.'.
This person get multiple emails throughout the day from these form submissions. Sometimes it fails on every other submission. Sometimes it runs successfully 3 or 4 times. Sometimes there are multiple failures. It makes no sense to me.
I have this exact same flow set up on my computer and when I forwarded one of the failed emails to myself it worked.
Why? What should I look for?
Hi @mapguymike ,
Does the flow would works some time and fail sometimes?
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I found a workaround. I'm using utcNow() instead of trying to extract the date. This is acceptable for this purpose and in fact it is resulting in the same time stamp to the minute. As soon as the form is submitted this flow processes it within seconds.
I'm having the same intermittent issue on a different item.
This is the part of the HTMLtoText output
Type ofCollectionBulk (non-metal items)Please list the materials for pickup
Most of the time this works and sometimes it fails with this error:
Unable to process template language expressions in action 'Type_of_Collection' inputs at line '1' and column '2878': 'The template language expression 'trim(split(split(body('Html_to_text'),'Type of Collection'),'Please'))' cannot be evaluated because array index '1' is outside bounds (0, 0) of array. Please see https://aka.ms/logicexpressions for usage details.'.
I don't understand what it means when it says that array index 1 is outside bounds (0,0) of array when the exact same piece of html to text succeeds in other runs