cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chris_tortuga
Regular Visitor

Need help sending to email address extracted from Initialized Variable string from Outlook event

Hello!

 

I am having difficulty sending an email to an email address that I successfully extracted from an Outlook event (appointment) created by Microsoft Bookings.

 

I want to send an automated email/survey to the user scheduled, however, the flow fails when using the extracted Customer Email.

 

Below is the flow:

 

chris_tortuga_0-1619451136160.png

 

Here is the expanded variable:

chris_tortuga_1-1619451177368.png

 

Here is the expanded Apply to Each that includes the set variable:

chris_tortuga_2-1619451197780.png

 

Here is the value: last(split(first(split(outputs('Html_to_text')?['body'],'Phone')),'Email: '))

 

Here is the email:

chris_tortuga_3-1619451248879.png

 

For some reason, I cannot get the email to send using the email address variable. Any ideas? 

 

Let me know if there is more information or screenshots needed.

 

Thank you so much! 

Chris

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@chris_tortuga 

Yes - you can nest the previous expression within a trim().

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

6 REPLIES 6
PrasadAthalye
Super User
Super User

Do you get correct email address using that expression. Can you please check variable and output and see if it is a well formed email address?

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
chris_tortuga
Regular Visitor

Prasad,

 

Thank you for your quick reply!

 

It appears the email is correct.

 

Below is the output:

chris_tortuga_0-1619454837787.png

 

The 'inputs.parameters' of workflow operation 'Send_an_email_(V2)' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'emailMessage/To' is required to be of type 'String/email'. The runtime value '"******@***********.***\n"' to be converted doesn't have the expected format 'string/email'.

 

Hope this helps -- let me know if you need more.

 

@chris_tortuga 

Try wrapping the expression that you use in the Set customer email compose action in a trim() expression - in other words trim the email address.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
chris_tortuga
Regular Visitor

@ScottShearer 

 

Could you assist? I'm new to the trim expression. Would the previous expression nest within trim()?:

 

trim(last(split(first(split(outputs('Html_to_text')?['body'],'Phone')),'Email: ')))

 

Many thanks!

Chris

@chris_tortuga 

Yes - you can nest the previous expression within a trim().

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Thank you so much @ScottShearer   It worked!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,639)