Hi,
I have an automate flow that uses a custom Text Classification Model. The flow triggered when new email arrives, the flow will convert email body from HTML to Text. Then, AI Builder will be used to analyze the converted text and provide the classification accordingly.
Question: I have encountered the issue of flow interrupted when Text exceeded 5000 characters limit. Hence, I try to use substring to only read first 5000 characters, but it failed again when my text has less than 5000 characters. This was the syntax i used.
substring(outputs('Compose_10'),0,5000)
Is there any other formula I could use to limit the flow to only read the first 5000 or less characters and not interrupting the flow?
Thank you.
Hi @plarrue, thanks a lot for your input! Tried out your solution and it is exactly what I need at the moment. Thank you!
Hi @Xinlin ,
Did you also try with a take instead of Substring ?
For example in this flow I want to use the first 255 characters, so I am using this expression for the text in input
@{take(triggerBody()['text'],255)}
Hope it helps!
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2