Scheduled e-mails from embedded Tableau visualizations

Scheduling e-mails is easy in Tableau Server — as long as an SMTP server has been specified in the “Configure Tableau Server” program, there will be an e-mail subscription icon in the top of a viz when the user has permissions. The e-mail that is sent includes a PNG snapshot of the viz with a link to go directly to the view in Tableau Server. This poses a problem if you are embedding the views in your own portal and only want users to experience the embedded experience, as they will hit the Tableau Server vizportal UI directly, without the ?embed=y parameter and without any single sign-on.

The best way around this issue is to set up a “listener program” to “capture” the view at a different location than the real Tableau Server address, most likely in your main web application path. The “Tableau Server Location” entry box in the Tableau Server Configuration program will take any text string, and the final URLs are simply this “location” appended with the view location. For example, I have a very simple listener PHP script set up at /alerts/route_alert.php . By adding the “?view=” parameter at the end, the resulting URL in the generated e-mail will be:

http://{server}/alerting/route_alert.php?view=/views/EUMigrationCrisis/Wherethemigrantstravel

email configuration
After capturing the view location, you can set up a process to redirect to the appropriate page which embeds the given view (and perhaps log in for single sign-on). You could theoretically implement this same idea but do the routing via reverse proxy rules as well, but a dynamic listener page is more flexible as you can continually add routing rules, authentication, etc.

Big thanks to Reed Walton at Tableau for this solution.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s