cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tyrrell94
Level: Powered On

Using Variable string as Outlook recipient

Hi All, 

 

I have been struggling to get this working and I am not sure if its possible. 

 

I am trying to compose an email address from a full name. To test I am using my own name instead of a dynamic expression. For this example, I am using 'Andrew Tyrrell' but this name will change once it's live. 

 

Then using 'First' & 'Last' to separate the name and create an email address as an output. 

 

First(Split('Andrew Tyrell', ' '))last(Split('Andrew Tyrell', ' '))

 

Output: Andrew 

 

last(Split('Andrew Tyrell', ' '))

Output: Tyrrell 

 

Compose both these outputs to form an email address: 

 

@{outputs('Compose')}.@{outputs('Compose_2')}@***************.org

Output: Andrew.Tyrrell@*****************.org

 

 

I then want to store this email address in a variable to then use later on as a recipient for outlook 

 

flow email.PNG 

 

Doing it this way spits out the following error:

 

"InvalidTemplate. Unable to process template language expressions in action 'Send_an_email' inputs at line '1' and column '2503': 'The template language expression 'json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_office365']['connectionId']' cannot be evaluated because property 'shared_office365' doesn't exist, available properties are ''. Please see https://aka.ms/logicexpressions for usage details.'."

 

The variable doesn't match the input format of outlook. But I don't know why, I have tried storing the variable in various ways, but I can't get it working. 

 

Any help would be appreciated, there is most likely a much simpler way of doing this. 

 

Thanks in advance! 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Using Variable string as Outlook recipient

Hi @Tyrrell94,

 

You could first output the value of the variable, and if it is an invalid email address format, it will report an error.

I did a test on my side. The way to stitch emails may be different from yours. You could use them for reference:

Compose-Email: 

concat(outputs('First_Name'),'.',outputs('Last_Name'),'@test.com')

2.PNG

In addition, if the email address of your variable output is valid, then you could consider exporting the Flow and re-importing it as a new Flow. This way Flow will work.

Please take a try and let me know if issue still exists.

 

Best Regards,

Barry

 

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Using Variable string as Outlook recipient

Hi @Tyrrell94,

 

You could first output the value of the variable, and if it is an invalid email address format, it will report an error.

I did a test on my side. The way to stitch emails may be different from yours. You could use them for reference:

Compose-Email: 

concat(outputs('First_Name'),'.',outputs('Last_Name'),'@test.com')

2.PNG

In addition, if the email address of your variable output is valid, then you could consider exporting the Flow and re-importing it as a new Flow. This way Flow will work.

Please take a try and let me know if issue still exists.

 

Best Regards,

Barry

 

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Tyrrell94
Level: Powered On

Re: Using Variable string as Outlook recipient

Hi @v-bacao-msft

 

Sorry for the late response. I did try this before the new year but I couldn't get it working. 

 

Hope you had a nice Christmas and New year! 

 

I took a break and came back to it in the new year and I have managed to get it working using the method you have shown. 

 

Appreciate the help! 

 

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 215 members 2,472 guests
Please welcome our newest community members: