{"id":110906,"date":"2018-01-10T05:54:19","date_gmt":"2018-01-10T13:54:19","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/multiple-attachments-single-email\/"},"modified":"2018-01-10T05:54:19","modified_gmt":"2018-01-10T13:54:19","slug":"multiple-attachments-single-email","status":"publish","type":"power-automate","link":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/multiple-attachments-single-email\/","title":{"rendered":"Advanced | Flow of the Week: Send multiple attachments on a single email"},"content":{"rendered":"

Hello, and welcome to another post in the Flow of the Week series. In case, this is the first article you are reading \u2013 Flow of the Week is a series of blog posts, which illustrates use cases and scenarios that can be automated using Microsoft Flow \u2013 so be sure check out other posts in this series.<\/p>\n

Today, we are going to be looking at one of the common asked questions by our customers, sending multiple attachments on a single email. <\/em><\/strong>To illustrate this, we will be creating an item on a SharePoint list and attach a few files to it. Our flow will trigger, on this new item being added. The flow will get all the attachments on the item, construct an array of all the attachments and finally we will use this \u201carray of attachments\u201d and send it out on an email. Let\u2019s dig in to it, shall we?<\/p>\n

Let start by adding a trigger \u2013 \u201cWhen an item is created\u201d and selecting the correct SharePoint Site and List.<\/p>\n

Please ensure that you already have SP List created that allows storing multiple attachments on the items in it.<\/p>\n

\"\"<\/p>\n

After adding the trigger, we need to fetch all the attachments added to the newly created list item. We should, hence, add the \u201cGet attachments\u201d action. The Site name and List name remain the same from the previous step. We want to then pipe the output \u201cID\u201d from the trigger, to the input \u2018ID\u2019 field.<\/p>\n

\"\"<\/p>\n

Now, that we have a handle on all the attachments \u2013 we must store these in a single array. Let\u2019s start by initializing an array.<\/p>\n

\"\"<\/p>\n

Once the array is initialized, the next step is fetch and store the attachment contents in the array. This is a bit tricky to setup, so be careful to follow the instructions to the T.<\/p>\n

\"\"<\/p>\n