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

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
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.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,522)