Using Tableau Data Driven alerts to let users know when a new workbook is published.
Recently a customer wanted to alert users when a new workbook had been uploaded to Tableau Server, there isn’t a standard way to do this but after wracking my brain I came up with a workaround using data driven alerts.
Firstly you will need to connect to the workgroup database via the readonly user of your Tableau Server postgres database – detailed instructions here – https://onlinehelp.tableau.com/current/server/en-us/perf_collect_server_repo.htm
Then connect to two tables, _workbooks and _users setting up the connection as shown below.
To reduce the amount of data I am connecting to I created an extract with a filter to only bring in today’s data.
I created two worksheets, one with information about the workbook, such as name, owner, project etc This will be the view that gets sent to your users.
The second worksheet contains the view that will trigger the data driven alert. You need an axis for this, so I created a count distinct measure of workbook name.
For both worksheets I have a filter which only shows workbooks that have been added in the last 15 mins this was built using the following calculation (this may need to be adjusted based on your server/desktop time settings)
The reason I have used 15 mins is because I am going to set my refresh schedule of my extract to run every 15 mins, this forces Tableau Server to check the criteria for the data driven alert every 15 mins, rather than the default of 60 mins. 15 mins will cover any workbooks that have been published since the last refresh.
I have then combined both these worksheets on a dashboard and then published up to Tableau Server the result. I have set a refresh schedule of every 15 mins. Obviously, there is nothing that has been published in the last 15 mins, so the dashboard doesn’t look great currently.
I can then set up the data driven alert from sheet 2 on server. First select the axis, and the click “Alert”.
This will then push the alert every time the refresh is run, 15 mins in my case, and if there is a new workbook published.
This is all good apart from the fact that this dashboard doesn’t look great, so go back to desktop select “Sheet 2” in the dashboard, make it floating and then via the layout settings, adjust the x,y to be 1,1 and the height and width to be 1,1.
This will then make “Sheet 2” almost invisible, sitting in the top left-hand corner of the dashboard. It is now still available to trigger the data driven alert but is not visible when the view is emailed to your users. Now when a workbook is published, within 15 minutes your user will get an email with details of the new workbook.