cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fordwayrichardg
Regular Visitor

Split Not Working Correctly - Advice Please

Hello, all.

 

I have created a Flow that triggers when a certain email is received in Office 365. The flow runs the following actions:

  1. When New Email Arrives from 123@abc.com to 456@xyz.com
  2. Data Operations (Compose) for the email body
  3. Convert Html to Plain Text for the previous Compose
  4. Data Operations (Compose) split the previous Compose into an array, breaking on the semi-colon symbol
  5. Data Operations (Compose) sub-divide the previous Compose array element contains some specific text
  6. Create a Calendar Event containing the sub-division of the previous Compose

I am finding that sometimes this works and the calendar event is generated. Sometimes, the Flow fails at the Create Calendar Event action because the previous sub-division of the array element fails.

 

Initial Compose Array (Working Example)

[
"\n\nScheduled From - 24 September 2017, 14:00:00",
"\n\nScheduled To - 24 September 2017, 17:30:00",
"\n\nSummary - This is some sample text."
]

 

Sub-Division of Summary into Array to Extract Specific Text (Working Example)

[
"\n\nSummary",
"This is some sample text."
]

 

Initial Compose Array (Not Working Example)

[
"\n\nScheduled From - 24 September 2017, 14:00:00",
"\n\nScheduled To - 24 September 2017, 17:30:00",
"\n\nSummary – This is a super, really, mega awesome project. Richard is really\nlooking forward to working on this."
]

 

Sub-Division of Summary into Array to Extract Specific Text (Not Working Example)

[
"\n\nSummary – This is a super, really, mega awesome project. Richard is really\nlooking forward to working on this."
]

 

As you can see, the initial composition of the email body is correct for both. The message has been broken into the array members as designed. In the first example, the Summary line has been split into two array members; I need the second array member containing the useful text.

 

In the second iteration where I use a longer, more complex summary text, it fails and the string is not sub-divided into two array members. The Compose Data Operation returns only a single member array which breaks the Create Calendar Event action. 

 

Can anyone shed any light on why this is happening? After some testing, it appears that it is the Html to Plain Text action causing this. I have tried directly processing the Html for the Compose action but that does not work at all.

 

Any thoughts welcome. If there is a better way to do this to ensure that any complex text in the summary field does not break the Flow, I am listening.

1 ACCEPTED SOLUTION

Accepted Solutions
fordwayrichardg
Regular Visitor

Re: Split Not Working Correctly - Advice Please

I found the issue. I have to say: I feel pretty stupid for the cause. I have been sending test emails from Outlook to get the flow working as planned. Outlook, in some cases, has been auto-correcting my hyphen (short dash) into a long dash. This obviously does not then match the criteria for the split and hence does not work.

View solution in original post

1 REPLY 1
fordwayrichardg
Regular Visitor

Re: Split Not Working Correctly - Advice Please

I found the issue. I have to say: I feel pretty stupid for the cause. I have been sending test emails from Outlook to get the flow working as planned. Outlook, in some cases, has been auto-correcting my hyphen (short dash) into a long dash. This obviously does not then match the criteria for the split and hence does not work.

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,246)