Home

Shipped to First Release: Flow integration for SharePoint document libraries

Kerem Yuceturk
Microsoft

Shipped to First Release: Flow integration for Sha...

I am happy to announce that we shipped Flow integration for SharePoint document libraries as well as the ability to launch flows interactively to our First Release users and tenants today. If you are a First Release user, or have your tenant marked as a First Release tenant, you should be seeing a Flow button in the command bar of your modern document libraries. 

 

This integration helps your users automate repetitive tasks such as moving an email attachment into a document library folder, sending a selected item for feedback, posting to Yammer, or integrating files with other Microsoft or third-party services that Flow can access.

 

We will continue to make Flow integration better for document libraries over the coming months. Some of our plans include better support for all SharePoint data types, new actions that allow for sharing items, and new templates that make use of these additional capabilities.

 

This is also a great time to review some of the guidance on the governance for Flow as mentioned in our announcement:

 

We recommend that Office 365 Admins review the data loss prevention (DLP) capabilities for Microsoft Flow. All Office 365 Admins can sign into the Flow administration site without the need for any additional licenses, and set up rules that determine how data can flow between different Office 365 components (such as SharePoint, Outlook, Yammer) and other Microsoft and third party services. If you need more specific guidance on DLP and controlling user access to Flow, please check out our blog post announcing the general availability of Flow in Office 365 from last year, which covers these frequently asked questions.

 

We will monitor the usage patterns and telemetry, and continue rolling out these features to our production users over the coming weeks. Next step will be to roll it out to 50% of production tenants.

 

Please give these new features a try and let us know what you think. 

  • Document Library
  • Files
  • LIsts
  • SharePoint Online
34 Replies

Re: Shipped to First Release: Flow integration for...

Hi Kerem, Good news. Can you confirm if this is a staged rollout to FR.? I'm full org.

Re: Shipped to First Release: Flow integration for...

Hi @John Wynne, it should be available for all of the First Release tenants and for all users designated as First Release users. Hope you are seeing it.

Re: Shipped to First Release: Flow integration for...

I'm not currently seeing this in my tenant, which prompted my question. Thanks for your reply.

Re: Shipped to First Release: Flow integration for...

It should be there at this point. Could you try to open an "in private" browser session, or clear all cookies and try it? Let me know if it is still missing in a private message and we can investigate deeper.

Re: Shipped to First Release: Flow integration for...

I can confirme Flow is available in my document libraries

Re: Shipped to First Release: Flow integration for...

In our First Release tenant too this morning



 

Re: Shipped to First Release: Flow integration for...

I have DM'd Kerem with my issues as requested. Juan you've beat me to it this time :-)

Re: Shipped to First Release: Flow integration for...

Hello @Kerem Yuceturk.

 

I was hoping that this would include access to the library meta-data,  document types etc. but it does not seem to. Am I missing something? If not, any idea when this functionality will be delivered?

 

This sort of functionality is of more use to us than the ability to copy a file from DropBox to SharePoint etc. We are developing a PowerApp where it would be really useful to at least be able to read the meta-data for a document in a library. The library would have multiple document types.

 

Instead, I have a list to which people attach a document. They get this document from our file-system. This document has a large number of fields which the users must fill in before attaching it to the list. And some of the list columns duplicate the fields in the document which means that people must enter the information twice. The PowerApp connects to this list.

 

If using a library, we could define these documents as document types and link the fields to columns in the library. But we cannot use this meta-data in PowerApps or Flow. Even if Flow were the only option, this would allow us to create / update a list item when the document is created / updated. The document meta-data could be used to populate the list columns.

 

Therefore, really interested when this functionality will be available.

 

Thanks.

 

Ian.

Re: Shipped to First Release: Flow integration for...

We have a similar situation.
We need to set meta data for documents. Read it back out again and send the file meta data and link over to Salesforce. Flow would be good for that.

Re: Shipped to First Release: Flow integration for...

Re: Shipped to First Release: Flow integration for...

@Kerem Yuceturk and @Steve Nguyen You guys have got to do something about Yammer treating Flow as a 3rd party application. Anyone who has done their due diligence around risk profile has turned the 3rd party application setting off in Yammer, which then renders it completely unable to interact with Flow at all unless I do a crazy email based workaround.

 

I have actual real life use cases from my business wanting to use Flow into Yammer, I'll give you a couple examples:

 

  • A Deal in CRM is won or lost. Depending on the characteristics of that deal, I want Flow to post in specific Yammer groups with specific people tagged and specific messaging. This is meant to start a conversation around that deal to spread the knowledge of what it was and why it was won or lost.
  • A document is uploaded to a fairly intricate but well managed document library with well defined and understood metadata required. I want Flow to post to specific Yammer groups depending on that metadata "advertising" that document to drive not only consumption of that document out to broader audiences, but also the "rating" of that document to give its owners an idea of next steps for it (does it need edits? is it ready to move up to be shared more broadly? etc)

 

Their patience is running thin on this and I now regularly get the question about when can they use Teams instead of Yammer in these scenarios so they can move forward.

 

Yammer spends a lot of time talking about and demonstrating how it is good for the community aspect of an org, but you're ignoring the business value and how Yammer can integrate with other tools in Microsoft that are intended to solve business needs.

 

I realize there may be some engineering challenges around this that I don't have visibility into, but that is no excuse to not fix this. For a long time you guys said you would never add edit capability to Yammer posts because "it was hard", but now here comes edit capability soon I believe. You guys are famous for making decisions based on data, but this is often leading you down the wrong path because it is impossible to get data on something that is broken or simply does not exist yet.

 

 

Re: Shipped to First Release: Flow integration for...

I have tried this and it's working :) But is the created flow only working on the selected folder? What if i want a flow to be active on all the folders in the document library? Or all folders below a selected folder?

Re: Shipped to First Release: Flow integration for...

Hi @Ian Macnaughtan@Philip Worrell, thank you for giving this a try and taking the time to provide feedback. Much appreciated.

 

We do have some access to metadata, although we make you work for it a little bit. We are working on making this a lot better and intuitive in a couple of months, but here's how you can access it today in Flow.

 

If you try out any of the interactive flow templates (i.e. the templates that come up when you select a document library item, and then click on "Create a flow" in the command bar), you will see that it starts with a request, and then does a "Get Item" action for the selected item. This is an action that allows you to access the columns of the library. See this sample image below:

 

FlowWithDocumentLibraries.PNG

 

The actions and triggers we have today deal with either "files" or "items". The file trigger/actions deal with the binary part of the file, as well as things like file name, file size. The "item" triggers/actions deal with the list part of the library: custom columns. The transitions between the two are not great today, but we are working on making that happen over the next month or so. But today, you can still use the item commands to access the metadata columns in your library. Note that today, the "list" dropdown will not show document libraries, but if you type in the ID of the library, or type in the name of the library, it will just work. We will fix this issue in the same time frame.

 

As I mentioned, we are in the early phase of this integration, and we will keep adding more capabilities, and your feedback is instrumental in how we prioritize work and capabilities on our side.

 

Next up in our todo list are the two things I mentioned above (transitions between "item" and "file", and being able to connect to libraries), and being able to write to choice/people/lookup fields (these are read only in Flow today). 

 

Enabling PowerApps to connect to document libraries is also something we are looking at, but this will likely happen in the second half of 2017, a little later than improvements with Flow. I will pass along this scenario to my colleagues working on the PowerApps side as well so that they see this feedback. We can follow up privately if you'd like to see how we could devise a scenario to enable what you are trying to do.

 

Once again, thank you for taking the time to share feedback and your scenarios.

Re: Shipped to First Release: Flow integration for...

Hi @Rune Myrhaug, you are correct that when you use "File" triggers this is a limitation. They only work on the selected folder. 

 

Though if you use "item" based triggers, they work at the library level and will catch changes/new items that occur in the whole library. 

 

This is not intuitive, and the transitions between the item and file triggers/actions are not easy to do (one way to do it is to match things by their modified/created by dates, with some margin). Think of this as a workaround while we work on making this a lot better over the coming months. Let me know if you are trying to enable a specific scenario and I can try to help.

Re: Shipped to First Release: Flow integration for...

Hi @David Rosenthal, agreed that this is a scenario we would love to support. I've reached out to my colleagues in Yammer for details, and I'll let them or Steve Nguyen respond about your concerns. 

Re: Shipped to First Release: Flow integration for...

Thanks for such a detailed response very helpful indeed.

I will look forward to the updates and try some of this out.

Re: Shipped to First Release: Flow integration for...

Thanks :) Sounds good :)
I would like to get a message into a Slack Channel when a file is created/modified in a SharePoint document library, regardless what folder the file is placed in. I do NOT want to create a new flow for each folder in a document library :)

Re: Shipped to First Release: Flow integration for...

@Rune Myrhaug, you will run into some limitations today. I can show you some workarounds in private if you'd like :). In two months it will be easier to do.

Re: Shipped to First Release: Flow integration for...

Thank you Kerem. Kudos and great work to you for a very detailed thread with examples and guidance. Keep up the hard work like this and it won't be long before Flow is completely ubiquitous in Office 365.

RE: Shipped to First Release: Flow integration for...

Thanks to @Kerem Yuceturk for helping solve my tenant's problems with this. Above and beyond so a little public thanks for the help behind the scenes. Much appreciated. Teamwork makes the dream work.@Chris McNulty @Mark Kashman @Jeff Teper

Re: RE: Shipped to First Release: Flow integration...

I second that!

Re: Shipped to First Release: Flow integration for...

Thanks @Philip Worrell for the vote.

 

And thanks @Kerem Yuceturk for the detailed post.

 

Certainly looking forward to the improvements you mention especially from the PowerApps side. In the meantime, your details re the library meta-data looks interesting. I'll see what I can do.

 

Thanks again.

Re: Shipped to First Release: Flow integration for...

Hello @Kerem Yuceturk.

 

When I enter the library name manually, I can now see the meta-data / columns:

 

2017-04-03 15_06_17-Manage your flows _ Microsoft Flow - Internet Explorer.png

 

However, only Yes/No and Dropdown columns seem to be output in the flow. Single-line text columns are missing! For example, I have created the following flow:

 

2017-04-03 14_55_45-Manage your flows _ Microsoft Flow - Internet Explorer.png

When I add an item (which is a custom document type - word docx) to the library, the flow runs successfully and the email is delivered. However, the Project Number (text), Project Name, Scope and Address in the email are blank.

 

When I check the Outputs for 'When new item is created', the above columns are not listed. The only columns listed (in addition to the standard 'Created' etc.) appear to be Yes/No or Dropdown columns. I also wonder if only the default values of choice columns are being Output but have not checked this yet.

 

It seems really odd that text columns are not Output while choice columns are. Which makes me wonder if I'm doing something wrong. Am I doing something wrong? Or is this another thing on the roadmap for libraries?

 

Thanks.

Re: Shipped to First Release: Flow integration for...

My apologies. I should do more research before posting.

Text columns ARE output correctly when i use the standard 'Documents' library that was automatically added when Team site was created. I added some text columns and these are output to the email correctly. I have not modified document types or added any custom document types to this library.

Perhaps my problem is related to the my use of custom document types. I will try to investigate further.

Re: Shipped to First Release: Flow integration for...

Hi @Ian Macnaughtan, do let me know if you run into issues. 

Re: Shipped to First Release: Flow integration for...

Thanks @Kerem Yuceturk.

 

Let me know if I should post this in a new thread but this is my experience so far after spending quite a few hours on this since my previous emails. For reference, this is the flow I'm using to test:

 

2017-04-04 17_30_30-Clipboard.png

 

The trigger is linked to a library by typing in the library name manually (as suggested earlier).

 

It appears that the 'When a new item is created' trigger for a library fires before the custom columns are edited. This explains why the columns included in the 'Send Email' action have no values. Except where a default value has been defined for that column. In addition, the 'Create Item' action creates a list item with blank columns.

 

To stop this trigger firing until after the column edits, I have tried a variety of things like:

 

1. Make a column required

2. Change library to classic experience and require full dialogs

 

The New, Upload and Drag options all seem to work the same way - trigger fires as soon as the file is added to the library but before the columns are edited.

 

I then started looking at the 'When an existing item is modified' trigger. As you would expect, this trigger fires when each field is edited and saved. An interesting side affect of using the quickedit / details (?) pane in the new library experience is that my test flow generates an email when each column is edited and saved, with an increasing level of detail in each email - 5 column edits equals 5 emails. In order to get a single email with all edits, I have to use the 'Edit All' option to edit multiple fields before saving.

 

Unfortunately, this is where I think I've hit another road-block. As PowerApps cannot access library meta-data, I wanted to create/modify an item in a list whose columns match the library columns. And link PowerApps to this list. Unfortunately, there does not appear to be a way to match a list item with the library item being modified. For example, here is the rough logic:

 

When library item is modified

IF matching item already in the list

THEN Modify list item

ELSE Create list item

 

Perhaps I can use a loop to search the list but have not investigated this yet.

 

In the meantime, please fastrack the PowerApps <> Library integration! :)

Re: Shipped to First Release: Flow integration for...

Thank you @Ian Macnaughtan for the detailed write-up. It's not perfect but one way to overcome the multiple columns being edited is to wait for a while after the new item trigger fires if time criticality is not an issue.

 

Here's what that could look like: I use the same trigger, but then wait for 3 minutes to allow for the user to fill in the data (maybe adjust this value based on the complexity of the form). Then I do extra get item to get the latest updated values (new item will only have the initial value that's set), and use the values from GetItem in my email. This may be sufficient already, but if you really want to make sure the item is not being edited any more, you could also do a more complicated do until where you check if the last modified time of the item changes within a window, and only send it out afterwards.

NewItemWithDelay.PNG

 

I hear you about the PowerApps being able to connect to libraries. It is on the roadmap, but not coming as soon as some other improvements. We don't have an estimate for it yet.

Re: Shipped to First Release: Flow integration for...

Thanks @Kerem Yuceturk.

 

Good ideas that I'll definitely look at.

 

I may have also just found another way. In the library new item flow, I create an item in my list (as before) but now I also write the ID of the new library item into a list column called LibraryID (probably should be called LibraryItemID). :)

 

Like this:

 

2017-04-05 17_54_40-Clipboard.png

 

Then in the library item modified flow, I get the matching list item (created earlier) with an odata filter using the Library item ID I stored earlier using the new item flow. Like this:

 

2017-04-05 17_47_44-Manage your flows _ Microsoft Flow - Internet Explorer.png

2017-04-05 17_50_23-Manage your flows _ Microsoft Flow - Internet Explorer.png

 

 

This looks like it might work for me but relies on the flows running and in sequence. If the new item flow doesn't run then 'Get items' in the update flow will not find the list item and skip that step. I'm not sure yet if Flow enables me to do something if an error occurs.

 

Please let me know if you can see any other problems that should make me rethink my approach.

 

Thanks again for your help.

Re: Shipped to First Release: Flow integration for...

I've also hit the Quick Edit challenge. I've overcome it by adding a field and a condition check that acts as the switch to trigger the flow. However I'm not sure how it works in Flow's run time consumption model. For example, as you observe editing 5 columns in Quick Edit mode triggers the new item flow which terminates (with a success) as the switch is set to not run. Switching the switch causes the flow to run again so that's 5+1 flows which when scaled out could chew through Flow credits.

In the images below the internal name of my column with the switch is called 'reqapp' and it's display name is Request approval. Also another gremlin is the processing of Yes / No fields in conditions. The condition will only work if in advanced mode and the '' are removed from TRUE as shown below.

 

New item with switch as first conditionNew item with switch as first conditionFlow watching for changesFlow watching for changesNew item with switchNew item with switchQuick editQuick edit

Re: Shipped to First Release: Flow integration for...

@David Rosenthal - Thank you for your input.  I have good news to share -- In the Yammer App Directory, "Microsoft PowerApps and Flow" is now a 1st party app. You should have access, even if you've disabled 3rd party apps. 

 

Re: Shipped to First Release: Flow integration for...

This is awesome news @Sabra Goldick, thank you! We will start testing this as soon as we can!

Re: Shipped to First Release: Flow integration for...

Hi @Simon Denton, thank you for sharing. I agree it's a concern the number of people in your organization is small and if a lot of people editing things using quick edit, then as you say, running out of Flow quota can be an issue. We don't have a good way of being able to tell if an edit is the final one, or if another one is coming soon after. It's something to consider in future updates for sure.

 

I've filed a bug about boolean fields. Writing bool(0) or bool(1) in your conditions without going to advanced mode will work, but that's not at all intuitive. 

Re: Shipped to First Release: Flow integration for...

Thank you. I'll test using bool(0) method

Re: Shipped to First Release: Flow integration for...

It's a little confusing that the list of Flow templates is completely different after clicking on "create a flow", depending on whether or not a file was selected. If a file was selected, then the trigger is a "requst/response" that posts to Azure and returns the item ID and file url. If a file was not selected when clicking on "create a flow", then the trigger varies based on the selected template, but one option is the "when a file is created". This trigger is known to have significant shortcomings as it lacks the ability to access SharePoint metadata. So, we are left with two scenarios:

 

1. Create a flow that has access to metadata, but has to be manually triggered by users.

 

2. Create a flow that starts automatically, but has no access to metadata. 

 

I'd guess that most shops building workflows will want access to both of the above, the ability to start a workflow automatically as well as the ability to access metadata. 

 

I see that it was said that accessing metadata from a library-based flow is a feature that was being worked on. Is the current variation what was referenced? Or are there plans to support accessing metadata from automatically started Flows?