cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
paulb4 Helper I
Helper I

Error message with Approval step

Hi everyone,

 

I really hope someone will be able to help me given I can't seem to find the solution.

 

I use Power Automate since a really short time but I need to build something for my work and it has to be done asap so I'm getting frustrated!!

 

So here's my issue:

I built a flow which contain an Approval. The approval email is sent and I customized the possible answers, no problem with this step.

 

Then I want that if the person approve, another email is sent to someone else. If he decline, an email is sent to the person who filled the form saying "It's declined, blah blah blah..."

 

InvalidTemplate. Unable to process template language expressions for action 'Condition_2' at line '1' and column '2855': 'The template language function 'startsWith' expects its first parameter to be of type string. The provided value is of type 'Array'. Please see https://aka.ms/logicexpressions#startswith for usage details.'.

 

Sorry but I have NO IDEA what the line and column are referring to and I have no idea what I miss here.

Given I can't share a picture of what I built (I think), I'll try to explain it:

-First the user fill a form

-Then depending on his answer to one particular question, 3 different emails are sent to 3 different people and one of the email is an Approval

-If Approved, then an email is sent to another person/If Declined, the user receive an email saying it can't be done

 

The steps are:

1-When a new response is submitted

2-Condition Yes/No (No leads nowhere)

3-In 'Yes':Send an email (1), Send an email (2), Start and wait for an approval

4-The below the Approval line, there's a Condition Yes/No

'Yes'=Send an email (3)

'No'=Send an email (4)

 

A big thank you in advance!!

 

Your help will be much appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Error message with Approval step

Hi!

Can you share a screenshot of your current flow design, so we can see the inputs you assigned to your 'Condition' action block?

As @LeeHarris says, it seems your step 4-The below the Approval line, there's a Condition Yes/No is not evaluating 'Outcome' but another dynamic content of type array instead... If so, try by using 'Outcome'

Flow_Custom-responses-in-conditions.jpg

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

5 REPLIES 5
Super User
Super User

Re: Error message with Approval step

Hi @paulb4 

Check what Condition 2 is doing in your Flow. The error message that you have provided suggests that the left hand side value is not exactly what you are expecting it to be. It sounds like you are checking whether a value starts with "Yes"? The value on the left of the condition needs to be a string (a text value) in order for this condition to work. You are currently using an array (a list of items) which means the Starts with condition throws the error. It may just be that you have used the wrong Dynamic Value in that particular condition.

Hope that helps.

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

Dual Super User
Dual Super User

Re: Error message with Approval step

Hi!

Can you share a screenshot of your current flow design, so we can see the inputs you assigned to your 'Condition' action block?

As @LeeHarris says, it seems your step 4-The below the Approval line, there's a Condition Yes/No is not evaluating 'Outcome' but another dynamic content of type array instead... If so, try by using 'Outcome'

Flow_Custom-responses-in-conditions.jpg

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

paulb4 Helper I
Helper I

Re: Error message with Approval step

Hello,

 

Thank you, it works now!!!!

 

The helps I got online said you must configure "Response" right after the Approval step but in fact it is "Outcome".

I confirm "Response" doesn't work here.

 

I have another question though.

When I test it, so I go on my form and fill the answers and press the validation button. I have to wait maybe 30 minutes for the first email to be send. Is there something to modify in order to make it go immediatly?

 

I have no idea what I'm supposed to show you if info are needed...

 

Again, thank you!

paulb4 Helper I
Helper I

Re: Error message with Approval step

Sorry I have another issue.

It works when the approval answer is APPROVED but it doesn't work when it's DENIED.

 

When it's denied, I want an email to be sent to the person who filled the form in the first place, and it fails, it says it tries to send to 'anonymous'.

 

I try to attach pictures to show you but I'm not sure it'll work, sorry.

 

Capture.PNGCapture2.PNG

 

Thanks again in advance! 😄

 

Paul

Dual Super User
Dual Super User

Re: Error message with Approval step

HURRAY!

IT WORKS!

 

My humble suggestion:

1.-Mark this topic as "Solved" by clicking "Accept as a solution". This way other community members facing this same problem in the future have the chance to find a solution faster. Please note you can even select several replies as as 'Solution', even from different community members!

Flow_AcceptSolution.png

2.- Open a new thread for your next question, following the policy: 'One Question, one post'. MAny SuperUsers pay more attention to unanswered topics, and this way more people can help. 

 

3.- (OPTIONAL) Click on 'Thumbs up' in any answer you found valuable.

Flow_thumbsUp.png

Even though this 3rd step is OPTIONAL, please remember it is the cheapest, easiest way to say thanks to somebody that simply tried to help. And just between you and me, everytime an inspiring answer receive a kudo, an ewok escapes from The Emperor menace  😉

 

Thanx for your contribution to keep this community great!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
Did you attend MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’ve streamed the digital event live, or you're watching on-demand, claim your attendee badge to sport on your profile.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (5,964)