I have a flow that takes an email and coverts using html-to-text. Then I use a series of composes to pull various info from to create a planner task.
So the email is setup pretty easy for this
Client: mydata
Project: mydata
Task: mydata
Assigned: mydata
The flow works fine most of the time but if I get a Project with a really long name it fails because at on one of the composes later on (oddly not on the Project name part) I get the index is out of range.
So I think its just a misunderstanding on the functions I am using. Here are the 3 composes I use to get the data (ignore the name its looking for in the example below). So what I thought I was doing was in the first 1 choosing the name of the line I want, then on the 2nd one telling it the start of the following line, then in the 3rd selecting the test between those. I thought the number, in the example "7" was for example counting the number of characters in the name "Type:" So if I wanted it for "Type:" I was putting 5 as the number to couldnt the letters in the name type and the colon and grab all text after that. But if that is the case then I dont understand why when an item is long that it fails. Could someone please help explain what I am not understanding here.?
add(indexOf(body('Html_to_text'),'Type'),7)
indexOf(body('Html_to_text'),'Assigned')
substring(body('Html_to_text'),outputs('FindEmailStart'),sub(outputs('FindEmailEnd'),outputs('FindEmailStart')))