How to implement a workflow solution in order to automatically update data in a Displayr dashboard
This blog post describes how to implement third-party workflow solutions in order to be able to seamlessly update your Displayr dashboard when there is no direct API connection to the survey data.
A key benefit of using Displayr is that you can create a workflow, whereby you can set up a scheduled refresh of the data which will automatically update the data connected to the dashboard even if a direct connection from Displayr to the survey platform is not available.
There are four basic options for automatically updating data in a Displayr document. These are via the URL, SQL, R Code, and the Displayr API. These are discussed in more detail in Automatically Update Dashboards in Displayr.
In this blog, we will be focusing on integrating the URL option with a third-party cloud-based workflow app. A workflow app is a tool that allows you to automate tasks involved in a business process. These automated workflows, otherwise known as flows, will allow Displayr to connect to and automatically update data where a direct connection to the survey platform is not available. It is assumed that the survey platform being used has the capabilities to automatically generate one or more data files and send those data files via email as an attachment.
Microsoft Power Automate or Zapier are examples of workflow apps. Each has its own strengths and weaknesses. Microsoft Power Automate integrates directly with Office 365 apps. This makes it an easy choice for those working with Office 365 products. Whilst, Zapier, on the other hand, tends to be the go-to choice for people looking to automate their workday while using Googleโs productivity suite. There are a plethora of workflow apps on the market and whilst the interface, the approach, and the terminology may be different for each app, in essence, they all perform the same function: getting your favorite apps to talk to one another.
The first step is to create a flow triggered by an event. The event is triggered by an email arriving in your inbox which has properties matching specific criteria such as the email's subject heading or the email's sender. The flow then extracts the email attachment and saves it to a predefined location that syncs with a cloud-app, for example, OneDrive, Dropbox, etc. The filename of the data file needs to be called the same throughout so that when the flow extracts the attachment it overwrites the previous data file.
For the rest of this blog, we have saved our data set on OneDrive Personal. For more information using other cloud data storage apps please see Finding URLs to Download Data.
- Go to the OneDrive website and sign in.
- Pick the data file you want to share. In the Tiles view more, select the circle in the upper corner of the item. Otherwise, the circle will be located to the left of the data file.
- Right-click, selectย Share > Copy Link > Anyone with the link > Apply.
- Select Copy to copy the link to your clipboard.
This URL is not a direct download link. A direct download link is a URL that will immediately download the file when pasted into your web browser. For Displayr to download fresh data when it loads your document then you will need a direct download URL.
The easiest way to do this is to copy the link. The URL will be a direct path to the file. Copy the URL in Chrome and click download, and download the file as normal. Whilst still in Chrome, go to Menu > Downloads or press Ctrl
+ J
to open the download window, and you should see the direct link that was used. Right-click on the file that was downloaded and select copy link address.ย Many browsers show the actual download URL in the Downloads
section. In these, you can start the download and cancel it right away, then copy the URL from the download history.
Next, we need to create a new document in Displayr. We then need to add a Data Set to your Displayr document by selecting Add a data set in the Data Tree or you can select Home > Data > New Data Set. A dialog box will appear on the screen, select URL, as shown below:
The next screen titled Fetch data using a URL will appear. Paste the URL direct download link previously created into the URL (web address) and select how frequently you want the link to automatically refresh the data and click OK.
Back in the main Displayr user interface, you may want to rename the file by selecting the data file container, right-click and select Rename. For example, see below.
If you are looking at a page in Displayr in your browser, you will not see the results automatically update. This will only happen by making the screen refresh. For example:
- You can press the Refresh button in your browser
- If Displayr has fallen asleep when it wakes it will update.