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
Community Champion
Community Champion

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,070)