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

Community site session details

Session Id : H7iHexDyuDBmUgEjxg4ObZ
Power Automate - AI Builder
Answered

Parameter Length Exceeded 5000 Characters

Like (0) ShareShare
ReportReport
Posted on 16 Jan 2023 09:47:34 by 82

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. 

Categories:
  • Xinlin Profile Picture
    82 on 17 Jan 2023 at 02:05:05
    Re: Parameter Length Exceeded 5000 Characters

    Hi @plarrue, thanks a lot for your input! Tried out your solution and it is exactly what I need at the moment. Thank you! 

  • Verified answer
    plarrue Profile Picture
    Moderator on 16 Jan 2023 at 13:57:00
    Re: Parameter Length Exceeded 5000 Characters

    Hi @Xinlin ,

     

    Did you also try with a take instead of Substring ?


    take.png

     

    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!

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete