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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,511)