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

View solution in original post

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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,661)