Forum Discussion
Shipped to First Release: Flow integration for SharePoint document libraries
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.
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:
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.
- Ian MacnaughtanApr 03, 2017Brass Contributor
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.
- Ian MacnaughtanApr 03, 2017Brass Contributor
Hello Kerem Yuceturk.
When I enter the library name manually, I can now see the meta-data / columns:
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:
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.
- Ian MacnaughtanApr 03, 2017Brass ContributorMy 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.
- Philip WorrellMar 29, 2017Iron ContributorThanks for such a detailed response very helpful indeed.
I will look forward to the updates and try some of this out.