web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Find and split text (e...
Power Automate
Unanswered

Find and split text (email body) at newline before hard limit

(0) ShareShare
ReportReport
Posted on by 5

I am hoping for a little guidance here as I am at a loss as to how to achieve this in Flow/Power Automate rather than in straight code.

 

I have an email coming in that may be small at lets say 10,000 characters or large at lets say 350,000 characters (its an automated change email) which then needs to be processed into a system (Slack) that has a 100,000 character hard limit input (but I can simply drop 4 lots of text straight one after the other in this example and it will get processed correctly).

 

Checking to see if the email message is under the 100,000 character limit and processing if not is straight forward, however to process those over the 100,000 character limit I need to split the text and run it using a loop which is fine but I need to split the text at the new line character that is some characters prior to the 100,000 limit. Remember that position, paste the extracted portion of the text into slack, using that position again to the check (if remainder of the text is still longer than the 100,000 charater limit and if is), split, post sequence until there is no text left

 

Thoughts? Obviously a loop is going to be involved and a couple of variables its more the finding and splitting of the text at the correct place that has me stumped

Categories:
I have the same question (0)
  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @jpsimmonds_au 

    Hi there.  So, here's an idea:

     

    • When you use the Split() function on a string, it converts that string to an array with multiple segments (or elements). 
    • You could then use an "Apply to Each" loop to work through each element of that array.
    • If this works with the smaller ones (<100k), then you can lose the condition and just treat all blocks the same (Adding to Slack at each new line character).

    Hopefully, that helps.

    Keep us posted.

    -Ed

     

    If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

  • jpsimmonds_au Profile Picture
    5 on at

    Thanks @edgonzales I did not think of that, much simpler, I will give that a shot

     

    Justin

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard