Attachments Archives - Microsoft Power Platform Blog Innovate with Business Apps Wed, 10 Jan 2018 13:54:19 +0000 en-US hourly 1 Advanced | Flow of the Week: Send multiple attachments on a single email http://approjects.co.za/?big=en-us/power-platform/blog/power-automate/multiple-attachments-single-email/ Wed, 10 Jan 2018 13:54:19 +0000 For Flow of the Week, Senior Program Manager, Sunay Vaishnav will show you how to send multiple attachments on a single email using Microsoft Flow. Be sure to read and see how you can automate your business processes using Flow!

The post Advanced | Flow of the Week: Send multiple attachments on a single email appeared first on Microsoft Power Platform Blog.

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

Today, we are going to be looking at one of the common asked questions by our customers, sending multiple attachments on a single email. 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 “array of attachments” and send it out on an email. Let’s dig in to it, shall we?

Let start by adding a trigger – “When an item is created” and selecting the correct SharePoint Site and List.

Please ensure that you already have SP List created that allows storing multiple attachments on the items in it.

After adding the trigger, we need to fetch all the attachments added to the newly created list item. We should, hence, add the “Get attachments” action. The Site name and List name remain the same from the previous step. We want to then pipe the output “ID” from the trigger, to the input ‘ID’ field.

Now, that we have a handle on all the attachments – we must store these in a single array. Let’s start by initializing an array.

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.

  • Start by adding a “apply to each loop”, then chose the “body” output from the “Get Attachments”

  • Next add “Get attachment content” action inside the loop. The SP site name and list name don’t change.

    • For the ID field – select ID output from the “When an item is created” trigger

    • For the file identifier field – Select the Id output from the “Get Attachments” action.

  • Next, we want to start adding to the array we just initialized. Set it up as shown below

Let’s revisit what we have setup so far –

  • For a new item created – we are first fetching all the attachments that were added to the item.

  • The “Get attachments” action returns the file names of the attachment and a corresponding “file identifier”. It does NOT return the contents of the attachment.

  • The attachment content is fetched separately using the “Get attachment content” action.

  • Our array, contains the attachment item with two properties – Name and ContentBytes. We are assigning the DisplayName, retrieved from “Get Attachments” action to the Name property and the Attachment Content, retrieved from “Get Attachment Contents” action to the ContentBytes property.

Now for the final step, we need to send the email with the attachments array we just constructed.

This step is straightforward, add an action to send an email – using your favorite email connector and pipe in the attachmentArray output to the attachments input field.

That’s it! Once you have successfully created and saved your flow, be sure to test it by exercising the trigger. You should see an email like as shown in your inbox with multiple attachments sent on a single email.

That’s it for this time. If you have any questions, suggestions or feedback about flow, please feel free to post below in the comments, in our community, or reach out on Twitter.

The post Advanced | Flow of the Week: Send multiple attachments on a single email appeared first on Microsoft Power Platform Blog.

]]>
Microsoft Flow integration in One Drive for Business and new connector actions http://approjects.co.za/?big=en-us/power-platform/blog/power-automate/microsoft-flow-integration-in-one-drive-for-business-and-new-connector-actions/ Thu, 09 Nov 2017 13:34:17 +0000 Flow is now integrated into OneDrive for Business! Using the integration, you can select any file and convert it to PDF, send it to your manager for approval, ask for feedback over email, or post to Teams. Learn more about this new integration and other new OneDrive for Business capabilities.

The post Microsoft Flow integration in One Drive for Business and new connector actions appeared first on Microsoft Power Platform Blog.

]]>
Earlier this year, we gave a sneak peak of how Flow would be coming to OneDrive for Business. This week, we’re pleased to announce this feature has rolled out to all OneDrive for Business customers in the world. This new integration allows you to:

  • Run a flow on demand for a selected file – You can select any file and convert it to PDF, send it to your manager for approval, ask for feedback over email, or post to Teams.
  • Run flows on a folder – You can now set up flows like save your email attachments to a selected folder or get alerts whenever a new file is uploaded directly from OneDrive for Business.

We’ve also recently added several new actions to boost your document management capabilities. These include:

  • Convert file using path and Convert file (enabling you to convert files to PDF)
  • Create share link and Create share link by path
  • Copy file and Copy file using path
  • Upload a file from a URL
  • Search for files in a folder
  • Move or rename files

In this blog post, we’ll walk you through the new integration and some of the new connector capabilities.

Run a flow on demand for a selected file

Let’s suppose you’re working on a series of legal contracts and you want to quickly convert these contracts from .docx to PDF and share with your business partner once they’re ready.  You can quickly set up a Flow to do both tasks for you instantly.

In OneDrive, click on the Flow menu, followed by the Create a flow command.

This will open a pane on the right hand side of the window listing several templates you can choose from. Select the template titled Convert selected file to PDF.

Selecting the template will open a new tab in the Microsoft Flow site with additional details about the template. Click Continue.

By default this Flow will convert the selected file to PDF and upload it to the current folder in OneDrive.

Let’s expand the Convert file using path action to get a better understanding of how it works. This action takes in the file path of the file that is to be converted, in this case the selected file, and converts it to the target type of PDF.

Let’s edit this flow and add a Create share link by path action at the bottom of the flow. Let’s set the File Path to be the Path of the converted file (using the Path token from Create file action), the Link type to be Edit, and the Link scope to be Organization.

Now, let’s add an O365 Outlook Send an email action. After setting the To and Subject, we’ll include a link to the converted file in the Body of the email.

Let’s complete our Flow by changing the Flow name to “Convert selected file to PDF and email Dan” clicking the Save flow button.

Back in OneDrive, select a document and click on the Flow menu. Then, click on the newly created flow to run it.

When we refresh the page, we’ll see a newly converted PDF and Dan will receive an email with a link to this file.

Run flows on a folder

From within any folder in OneDrive, you can select the Flow button and the Create a flow command to set up a flow that saves email attachments in Office 365 Outlook to this folder or sends you a push notification whenever a new file is added to this folder.

For example, let’s suppose that we want to save all email attachments sent by a client (Fabrikam Inc.) in the current folder (Fabrikam Contracts). Let’s suppose this client includes the word “Fabrikam” in the subject of each email. We can set up a Flow to automatically save email attachments from Fabrikam Inc. to the Fabrikam Contracts folder.

In OneDrive, while in the Fabrikam Contracts folder, click on the Flow menu, followed by the Create a flow command. Now click on the template titled Save Office 365 email attachments to OneDrive for Business.

This will open the template in the Flow website, confirm your credentials and click Continue. Expand the On new email action and click on the Show advanced options command.  Set the Subject Filter field to Fabrikam.

That’s it! Whenever you receive a new email where the subject contains Fabrikam, any email attachments will be automatically uploaded to the Fabrikam Contracts folder. If you have ideas for templates or other feedback, please leave us comments below or post on our Community forums.

The post Microsoft Flow integration in One Drive for Business and new connector actions appeared first on Microsoft Power Platform Blog.

]]>