cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Extract string from array into json

Hello, Need help to extract string from the array. I have extract a email and split them by "space" into array. It depends on emails, it won't be the same array index. Here is the output [ "Maintenance", "#:", "12355110", "\n\nSummary:", "will", "perform", "scheduled", "maintenance", "to", "troubleshoot", "and", "clear", "network\nalarms", "services.\n\nUpdates:", "\n\n2019-01-01", "19:34:39", "GMT", "-", "This", "maintenance", "is", "scheduled.\n\nCustomer", "Impact:", "\n\n12355110-1", "\nStartEnd2019-01-29", "05:00", "GMT", "(Greenwich", "Mean", "Time)2019-01-02", "10:00", "GMT\n(Greenwich", "Mean", "Time)2019-01-02", "00:00", "EST", "(Eastern", "Standard", "Time)2019-01-29\n05:00", "EST", "(Eastern", "Standard", "Time)\n\nMaintenance", "Location(s):", "CAMBRIDGE,", "MA", ] Desired results: Maintenance#: 12355110 StartDate: 2019-01-02 StartTime: 05:00 GMT EndDate: 2019-01-02 EndTime: 10:00 GMT Maintenance Location: CAMBRIDGE, MA
3 REPLIES 3
Highlighted
Community Support
Community Support

Hi @mmihir82,

 

Are you trying to extract contents from email body?

If the email body is always in the same format, please take the following thread for a reference:

https://powerusers.microsoft.com/t5/Building-Flows/Read-email-content-from-body-of-the-email-extract...

You could try to use functions to get StartDate, EndDate, etc.

Please try it and feel free post back if you need more help.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

Hello Mabel,

Thanks for responding. Let me try that approach, as I as split the "Html to text" into an array. But the content might change and so do the array, so that won't work, unless, I can use regex to find the string. but I don't how to do it.

 

Thanks

 

Highlighted

Hi @mmihir82,

 

It should work as long as your email body is always in the same format.

If you need more help, please feel free post back with more details on your email body and what you are going to extract from the body so that I will help figure out a flow.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (9,052)