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

Extract multiple URL from Email body and creat multiple item in Sharepoint

Hello

 

How can I take multiple url from Email and creat a item for each one of them.

 

Ruben_Merino_0-1632508966400.png

I need in Sharepoint List creat a item for each on of them.

 

I traid this option https://powerusers.microsoft.com/t5/Building-Flows/Extract-URL-from-Email-body/td-p/690807, and it's work for 1 url but I don't how to iterate. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Ruben_Merino ,

 

I did a test for you.

vxiaochenmsft_0-1632820210715.png

vxiaochenmsft_1-1632820249053.png

vxiaochenmsft_2-1632820288281.png

vxiaochenmsft_3-1632820316117.png

substring(variables('Var'),indexOf(variables('Var'),'http'),sub(add(indexOf(variables('Var'),'com'),3),indexOf(variables('Var'),'http')))
 
vxiaochenmsft_4-1632820337005.png
substring(variables('Var2'),add(indexOf(variables('Var2'),'com'),3))
 
The result is as follows:
vxiaochenmsft_5-1632820366106.png
vxiaochenmsft_6-1632820373787.png

Best Regards,

Wearsky

View solution in original post

5 REPLIES 5
v-xiaochen-msft
Community Support
Community Support

Hi @Ruben_Merino ,

 

I did a test for you.

vxiaochenmsft_0-1632820210715.png

vxiaochenmsft_1-1632820249053.png

vxiaochenmsft_2-1632820288281.png

vxiaochenmsft_3-1632820316117.png

substring(variables('Var'),indexOf(variables('Var'),'http'),sub(add(indexOf(variables('Var'),'com'),3),indexOf(variables('Var'),'http')))
 
vxiaochenmsft_4-1632820337005.png
substring(variables('Var2'),add(indexOf(variables('Var2'),'com'),3))
 
The result is as follows:
vxiaochenmsft_5-1632820366106.png
vxiaochenmsft_6-1632820373787.png

Best Regards,

Wearsky

View solution in original post

Hi @v-xiaochen-msft 

 

First, thank for your help and supot. 

 

It's possible make than lenght of first substring don't stop in "com", and vary acordin to url.

 

For exemple, extract url as this:

 

Ruben_Merino_1-1632989872663.png

 

v-xiaochen-msft
Community Support
Community Support

Hi @Ruben_Merino ,

 

If your url ending is dynamic ,it's difficult to get the url.

As you can see, my solution is based on the beginning and the ending of the url.

So, If I cannot find the regular pattern from the end of the url, can I find the regular pattern from the head?

vxiaochenmsft_0-1632993288735.png

Is there any regular pattern in the text in front of 'http'?

 

Best Regards,

Wearsky

 

Ruben_Merino
Frequent Visitor

Hi @v-xiaochen-msft 


Thanks for answerme so fast.

 

Unfortunately there aren't any regular pattern. Some emails send only url and others some text before of URL.

hi @v-xiaochen-msft 

In any case, thanks  a lot for your help and suport. 

Best Regards

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,004)