How to trigger a flow when a document is pasted in a synced sharepoint folder? - sharepoint

I want to trigger a flow whenever a file is added to a Sharepoint folder.
When using the "When a file is created in a folder" trigger, the flow is triggered if I upload a new file from the Sharepoint Web UI or if I save a new file into the synced folder on my computer.
But if I copy/paste or move a file from my computer's filesystem to the Sharepoint synced folder, the flow isn't triggered.

This is expected behavior and it is by design it seems.
Files uploaded to SharePoint have a modification date of today
and the document that I copied locally and Synced to
SharePoint kept their original date. ...
A lot of the Flow technology
depending on web hooks and one of the things webhooks does is use a
last change token. This is to ensure that you only pickup changes
since a certain date.
... make sure that you upload document to SharePoint rather than
synchronising document to SharePoint.
Uploading documents to SharePoint using OneDrive/Sync and Microsoft Flow ignores these
Author in comment:
I’ve not found a solution for this yet. The only real option at the moment is to use a recurring flow.

Related

SharePoint document library not showing actual user's name in 'Modified By' on Custom List's meta-data

I have created an utility for browsing and uploading file from user's machine (OS is Windows10) to a SharePoint site's document library. This utility is created using 1. a canvas form created in Power App, 2. a workflow created in Power Automate and 3. destination document library of SharePoint site.
To briefly summarize about its working; when any user uploads any file using this form, workflow is triggered to store this file as an entry to a SharePoint list, and it is then sent to designated reviewers to get it reviewed and approved. On approval, file is moved from SharePoint list to another site's document library.
Files are successfully being moved to the destination document library.
Here is the problem I'm facing for the moved files - The document library has 'modified by' meta-data column associated with files. This field does not display actual user's name whoever uploads a file or replaces an existing file by uploading a modified version of this file. It always shows my name in 'Modified By' field.
Is there any way to fix this and show the actual user's name in this field who uploads any new file or replaces any existing one.
Any help is really appreciated.
Thank you.
The issue you are having is by design.
The kind of trigger you are using in SharePoint connector always operate in context of the owner of the flow (you)
Please check the following for detailed description and possible workarounds: https://sharepoint.stackexchange.com/questions/269396/microsoft-flow-always-run-in-context-of-user-who-published-it
You can try using 'update file properties'. I have not tested if this works or not, but it seems practical solution to test.

OneDrive for business Client sync Sharepoint Library with Read-only permissions

Office 365 / Sharepoint Libraries
OneDrive for business Client
Windows 7
I was testing out Syncing capabilities of OneDrive for business client for users with only Read-Only permissions.
When a user has Read-only permissions the Sync button on the Sharepoint library site does not show itself. But I was able to copy the URL and manually Sync the library through the OneDrive for business client.
When doing this, the folder will Sync to the local client.
If the user deletes a file, it will temporarily be deleted out of the client's sync folder, but it does not delete from the Sharepoint library.
The next time it syncs, the file will be pulled back down to the client, but this time without a green check indicating fully synced (it looks like a regular file in the folder).
If the user deletes the file again, the next Sync cycle will NOT pull the file back to the client.
I tried editing the file once in the Sharepoint Library as the next step, and the File synced back to the client.
If the client deleted it, it would not get pulled back to the client.
If I tried editing, or overwriting the file the problem was not resolved.
If I un-synced and re-synced the library the problem is rectified.
My question: Is this working as intended? Or is there a proper sequence of events to always force the file to be re-uploaded to the client?
Thanks,
Dennis

Is it possible to update a TFS task whenever an artefact is uploaded into TFS-Sharepoint

We use TFS integrated with Sharepoint for storing artefacts. Examples: end user documentation.
The artifacts are uploaded using Visual studio 2010 and not from web interface.
For each artefact preparation, there will be a task created in TFS.
Example:
Documentation preparation
The requirement is whenever a document is uploaded or modified in the sharepoint folder, can the user be alerted?
Example:
which TFS task he/she needs to update the completed hours
FOlder structure:
similar to the one shown in the 2nd answer to the below question
Share project documents in TFS different ways, what are your best practices?
It's not there by default, but one could build it oneself using a ListItemEventHandler (http://msdn.microsoft.com/en-us/library/ms437502.aspx) in sharepoint or a custom aproval workflow that activates from within sharepoint and creates workitems in TFS using the object model (http://msdn.microsoft.com/en-us/library/bb130322.aspx).
The requirement is whenever a document is uploaded or modified in the
sharepoint folder, can the user be alerted?
A simpler way to achieve only this requirement might be to put an sharepoint alert on the document list so one would recieve an e-mail when an item is created.

Sharepoint 2010: Copy or add file to Document Library

I have a silverlight application inserted in a SharePoint page. The SilverLight application runs on a different server thatn that of SharePoint. From an event in the SilverLight, I generate a document on the server side from SQL Server. I can generate the doc on the server hosting the silverlight application and also copy it to the SharePoint server. I wanted to know if I can include this file in a sharepoint document library automatically. I was thinking if like emailing to a list allows us to copy the file into the library, can we configure the reverse, means copying the file make it part of the list.
Update:
I wanted to avoid uploading. For me uploading is sending the file from one location to the target location. But what I am saying is, if I copy the file into the folder where SharePoint keeps the file physically for the particular list, can it be added to the list automatically?
I am not sure, how well I am being able to describe the point. Please elaborate if required or I can answer your queries.
SharePoint stores the files in a database, not a folder.
WebDAV access may be what you're looking for - it's a backbone of the the Explorer View feature that allows a user to access a document library as if you were accessing a file system through a Windows Explorer window.
You can configure "incoming e-mail" properties for the document library, and assign an e-mail address.
After that, when you e-mail a document as attached to e-mail to this e-mail address, then attachment will be saved to that library by sharepoint automatically.

SharePoint Online file storage

We have a requirement to store documents in SharePoint Online as people copy files to a shared network directly.
Is there a way of automating this? I was thinking of a windows service which will poll the directories, find any changes like new subdirectories or new files, then upload them to a SharePoint Online document library.
You don't have to poll if you use a FileSystemWatcher inside your Windows service for real-time notifications.
http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx
However, if your requirement is 100% accuracy, you will need to build in some sort of tracking/checksum mechanism to make sure that every document was 1) detected and 2) successfully moved to SharePoint.
You may want to have your service check the delta every time it starts up, and then subsequently only respond to FileSystemWatcher events.
EDIT: Per Tony's question below, here are some additional thoughts on getting files to SharePoint.
First, try a simple test.
1) Copy the URL of a document library within the BPOS SharePoint site. Make sure you're on a machine that has the Office Online sign in app on it.
2) Open Notepad. Type some random text.
3) Click on File -> Save As.
4) Paste the URL.
5) Attempt to save the file.
This works great on "regular" SharePoint (done it many times). If this works with BPOS, it opens up several options.
File System Replication to a SharePoint Online or Office 365 document library is planned to be released with the "Cloud Connector for Office 365". With the current version database content is supported only, but bi-directional with V2.0

Resources