cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Leo_NYC
Helper I
Helper I

Attach file to email from a link in a list.

Hi there....

 

I have a list with two columns that contain links to files.  I am trying to write a flow that will attach the underlying files referenced by those links as attachments.

Leo_NYC_0-1635806101040.png

Is there a way to get the file contents from the link and then attach them to the email?

Leo_NYC_1-1635806236512.png

 

Thanks!

Leo

1 ACCEPTED SOLUTION

Accepted Solutions
v-chenzhi
Community Support
Community Support

Hi @Leo_NYC ,

 

Do you want to send the file in the link as an attachment in mail?

I assume you have two columns like this in SharePoint and have a test on my side, please try the following workaround.

vzhichen_0-1635847188033.png

The flow like this.

vzhichen_1-1635847188038.png

vzhichen_2-1635847188044.png

Here is the expression:

 

last(split(items('Apply_to_each')?['Column1'],'.'))

 

vzhichen_3-1635847188048.png

vzhichen_4-1635847188050.png

We could see this in outlook.

vzhichen_5-1635847188054.png

Best Regards,

Zhi Chen

View solution in original post

3 REPLIES 3
leyburn19
Memorable Member
Memorable Member

 Is the link to files in another list or document library or are they simple attachments to the list record? 

v-chenzhi
Community Support
Community Support

Hi @Leo_NYC ,

 

Do you want to send the file in the link as an attachment in mail?

I assume you have two columns like this in SharePoint and have a test on my side, please try the following workaround.

vzhichen_0-1635847188033.png

The flow like this.

vzhichen_1-1635847188038.png

vzhichen_2-1635847188044.png

Here is the expression:

 

last(split(items('Apply_to_each')?['Column1'],'.'))

 

vzhichen_3-1635847188048.png

vzhichen_4-1635847188050.png

We could see this in outlook.

vzhichen_5-1635847188054.png

Best Regards,

Zhi Chen

Thanks!  I got it working a little differently but pretty much the same way.

 

Leo_NYC_0-1635848952604.png

I used the URI path function to grab the entire html link to the file from the list.

 

Then I passed the result in to a split function, split it in two to separate the site information from the path, and referenced the second member of the array.

Leo_NYC_1-1635849030413.png

After that I used the get file content by path function and was able to attach it...

 

thanks again!

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,144)