Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION

How to: Getting started with Microsoft Onedrive/Sharepoint in Qlik Application Automation

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
MarkGeurtsen
Support
Support

How to: Getting started with Microsoft Onedrive/Sharepoint in Qlik Application Automation

Last Update:

May 10, 2022 1:43:00 PM

Updated By:

Jamie_Gregory

Created date:

Sep 22, 2021 7:15:38 AM

Attachments

Within the available connectors in Qlik Application Automation are Microsoft Onedrive & Microsoft Sharepoint . This article intends to describe some potential use cases that can be performed through the use of these connectors and provide an easy to use template to do so. Most examples are built using the Onedrive connector, however the same use cases can be performed for shared drives using the Sharepoint connector.

  • Monitoring changes to a user's drive.
  • Automatically modifying file locations and renaming of files
  • Create sharing links for files and share with emails
  • Set up sharing permissions for files.

Authentication for the connector happens with oAuth2. We are making use of the following scopes for the Onedrive connector:

  • Files.ReadWrite.All
  • User.Read
  • offline_access

These scopes should be accessible for all users in a default Office 365 tenant. If you are having troubles attempting to authorize Qlik Application Automation to obtain these scopes consult your Office 365 administrator.

Monitoring changes to a user's Onedrive

Using Automations in Qlik Cloud it is possible to monitor changes to a user's personal Onedrive or to a Sharepoint shared drive. When changes to a personal or shared drive happen, automatic actions can be performed, such as automatically obtaining data from an uploaded excel spreadsheet and updating a Qlik Sense app.

Onedrive makes use of a delta token to view changes that have happened since that token. As we do not have a data store within Automations, we are bound to use a separate store for the delta tokens. Options could be an excel file / text file stored on Onedrive, an app on Qlik Sense or any other place where data is persisted.

An example automation to monitor changes might look like the following. The automation is also added as JSON to the article to import into a Qlik Cloud tenant.

MarkGeurtsen_0-1632309118968.png

Modifying file locations and renaming files


The Microsoft Onedrive and Microsoft Sharepoint connectors in Qlik Application Automation provide blocks to Move and Rename items on drives. These can be used for example in conjunction with other connectors to perform these actions whenever … happens

An example could be to move all files from an incoming folder to an archive folder after a Qlik Sense reload is complete.
A simple example automation is added as an attachment to this article. In the automation editor this might look like the following:

MarkGeurtsen_1-1632309159889.png

 

Create sharing links for files and share with emails

The block Create Sharing Link can create a shareable URL that can be send over email to a user.
It offers the user the choice whether the URL works for the organization of the user or anonymous. The scope can be set to view, edit or embed and it is possible to provide a password as well as an expiration time for the shareable link.

The following automation would obtain data from a table in Qlik Sense, copy the rows to an Excel file hosted on Onedrive, create a shareable link and share this link to a user by email:

MarkGeurtsen_3-1632309304122.png

 

Setup sharing permissions for files

Sharing permissions can be done with the Send Sharing Invitation. This block sends an invitation to an email recipient including a message, subject, reading or writing permissions and the choice if an invitation has to be sent out and whether a user has to be signed in. A password can also be provided, but only if the user is using a personal Onedrive account.

Furthermore it is possible to list sharing permissions, updating these permissions and removing permission to access a file on a user's Onedrive.

The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.

Labels (1)
Comments
T-Lambourne
Contributor III
Contributor III

I am really interested in Monitoring changes to a SharePoint Drive. I see the automation here will see the changes but it is based on when the automation runs. Is there a way to start the automation with any changes? We have an Excel file in SharePoint, we would like it to automatically update the apps when the data in the file changes. Any ideas?

Ken_T
Specialist
Specialist

tangentially related, i know the connection does not support STORE command, but is there any other block in Automations that can write a file to OneDrive?

Sonja_Bauernfeind
Digital Support
Digital Support
Version history
Last update:
‎2022-05-10 01:43 PM
Updated by: