cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

How to extract an email address from a sharepoint column

Power Automate generates an email when a new item is added to a sharepoint list. In one column we ask for an email adress. Users mostly copy and paste the email adress from other sources. Often the name1 is followed by the Name1@email.nl including brackets.

 

in the email Body I receive only name1

how can I extract name1@email.nl without the brackets to add to the Email body? 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: How to extract an email address from a sharepoint column

@ReneRovekamp 

 

Created a sample for you to handle the email value.

1.JPG

2.JPG

 

Expression in the Compose action:

replace(substring(variables('varEmail'),add(indexOf(variables('varEmail'),'<'),1)),'>','')
Process steps in the above stample:
1.  Initialize a variable varEmail with the email value. (In your case, you do not need to do this step as you can use Email field value directly)
2. Initialize a variable varEmailValue with value from varEmail
3. Condition: Checking if varEmail contains < or > symbols.
4. If Yes, placed Compose action to trim the unnecessary characters such as text before and after the email id.
5. Setting the output of the compose varEmailValue variable so that you can use it anywhere you want.
 
Note: The above approach works fine if the Email id field contains just the email without < or > symbols.
 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

6 REPLIES 6
Highlighted
Super User II
Super User II

Re: How to extract an email address from a sharepoint column

@ReneRovekamp 

 

In your example, I do not see brackets in the email account.

 

You can use string function such as "replace" to replace any unwanted characters with space or other characters. You can use replace function as part of expressions. 

 

Give a try and let me know if you have any questions.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
Highlighted
Frequent Visitor

Re: How to extract an email address from a sharepoint column

Thanks. I tried replace Replace (">", ">", "-") but then the whole content of the column is replaced 
What do I do wrong then? 

Highlighted
Community Support
Community Support

Re: How to extract an email address from a sharepoint column

Hi @ReneRovekamp ,

 

What is the full content? could you please share the full content with us and explain what is the needed content in it so we could better understand you and provide the proper workaround for you.

 

Best Regards,

Alice

 

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

 

Highlighted
Frequent Visitor

Re: How to extract an email address from a sharepoint column

 

example.png

 

When users copy and paste an email address you will get this (example off course). 

When Power Automate generates an email, you only see 'rene' and I need it to show the full email address.

 

I tried the replace function by replacing the last bracket with an underscore, but then the full content as shown in the picture was replaced by it.

Highlighted
Super User II
Super User II

Re: How to extract an email address from a sharepoint column

@ReneRovekamp 

 

Created a sample for you to handle the email value.

1.JPG

2.JPG

 

Expression in the Compose action:

replace(substring(variables('varEmail'),add(indexOf(variables('varEmail'),'<'),1)),'>','')
Process steps in the above stample:
1.  Initialize a variable varEmail with the email value. (In your case, you do not need to do this step as you can use Email field value directly)
2. Initialize a variable varEmailValue with value from varEmail
3. Condition: Checking if varEmail contains < or > symbols.
4. If Yes, placed Compose action to trim the unnecessary characters such as text before and after the email id.
5. Setting the output of the compose varEmailValue variable so that you can use it anywhere you want.
 
Note: The above approach works fine if the Email id field contains just the email without < or > symbols.
 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

Highlighted
Frequent Visitor

Re: How to extract an email address from a sharepoint column

thanks a million @rsaikrishna that has done the trick!!!!

You just saved me and my colleagues from a load of irritation 🙂 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Users online (7,276)