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 / InvalidTemplate. The l...
Power Automate
Unanswered

InvalidTemplate. The length of substring can't be longer than '___' which is the length of the source string.

(0) ShareShare
ReportReport
Posted on by 3

I inherited a flow triggered by adding an event to an Outlook calendar. The flow parses the email and creates a new ics file that we use elsewhere. In most cases, it works as intended. However, for a few events, it fails on "Get URL"

NewBee_0-1674223903174.png

 

The only difference I can see is a switch that is triggered by the subject.

One that works looks like this: 

NewBee_2-1674224053609.png

 

One that fails looks like this:

NewBee_1-1674224024169.png

Any ideas on how to get this to work consistently?

Categories:
I have the same question (0)
  • Chriddle Profile Picture
    8,686 Super User 2026 Season 1 on at

    substing expects parameters text, startIndex and length (not endIndex)

  • NewBee Profile Picture
    3 on at

    When I took a closer look at the flow, I noticed that the "Get URL End Index" was not showing up in my dynamic content. Is that what you were hinting at?

     

    What has me stymied is the flow works 90% of the time.

    • It cancels the flow when an incoming message doesn't meet the conditions set.
    • It triggers correctly for 13 of 15 meeting notice types.

    But for some reason, there are 2 instances where it gives an error message on "Get URL". When I look at "Get URL End Index", it gives a negative number on the failed flows. 

    NewBee_0-1674744645858.png

    On the successful flows, it gives a positive number.

    NewBee_1-1674744949773.png

     

     

  • Chriddle Profile Picture
    8,686 Super User 2026 Season 1 on at

    Seems that you end index string ('If you need') does not exist.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 862

#2
Valantis Profile Picture

Valantis 738

#3
Haque Profile Picture

Haque 553

Last 30 days Overall leaderboard