1 of 1 people found this helpful
First, could you add your attachments? Looks like they didn't make it into the post.
Overall, though, the way things work is this:
The subscription schedule determines when the "trigger viz" you subscribed to is executed.
The data from the "trigger viz" determines the actions that take place when the schedule runs.
The only thing blocking you from emailing a few external people a dashboard once a week is that they aren't users in Tableau Server. You don't actually need VizAlerts to be able to do that on a small scale--you can create a few Users representing the external users, with email addresses matching their true addresses. Then subscribe them on the appropriate schedule to whatever Viz you want them to get. Should work.
Where that falls down, however, is when you need to add / remove external recipients over time to the point that the previous approach becomes too much work. It's then that you need the ability to dynamically determine who to email based on the data in your trigger viz. And that's what VizAlerts is great for.
What you will need to do is:
1. Publish the vizzes you want to email out.
2. Publish the trigger viz (it may be a part of the workbook containing the vizzes you want emailed, or not--doesn't really matter)
3. Ensure your ScheduledTriggerViews viz is set up to allow your trigger viz to send to any email address.
#2 is the part that you likely need the most help with. This viz will be a simple set of instructions that use the Email To / From / Subject / Body field convention to tell VizAlerts what you want to do. The data will be a list of the people you want to email the viz to.
As an example, let's say that you have four customers and you want to email each of them a personalized version of a certain dashboard every week. What's more, your business is growing and you know you'll be getting more customers over time, and you don't want to do much, if any, work when new accounts land. You have a simple Excel spreadsheet that contains a list of all your customers' names, their email addresses, and a unique ID.
To build your trigger viz, you will connect to your Excel spreadsheet. You will copy in (or create) the Email fields in as the User Guide describes. Then drag each of the Email fields with asterisks to the Rows shelf, so that you can see them. The Email To * field you will edit, and inside the calc, will simply reference the Customer Email Address field from your excel file. The Email Subject * you will edit to, say, 'Weekly report for ' + [Customer Name]. Email From ~ will be whatever email address you want the customers to see the email coming from. Email Body * is the part that is interesting, so it seems like a good time to create a new paragraph.
For Email Body *, you will use the placeholder text 'VIZ_IMAGE()' in your calculation to tell VizAlerts that you want to embed an image of a viz there. In VizAlerts, we call this a "content reference". By default it will embed the viz that the calc itself lives in. Right now that's the trigger viz, which is just your Email data, and therefore is not what you want to have happen. You want the embedded viz to be a separate one that you published as a part of another workbook. So you will reference it as a sort of parameter to the content reference, as it would appear in the URL you see when you access the viz in a browser:
Now it will reach out to the Weekly Reports workbook and embed the Status Dashboard sheet on Tableau Server into the email body at that position. But you don't want to send the same data to all your customers. You want them only to receive their own data. The answer is to use the Customer ID field in your Excel spreadsheet as a URL Parameter filter for the viz in your content reference. So now your Email Body * field will look like:
'VIZ_IMAGE(WeeklyReports/StatusDashboard?Customer Name=' + [Customer Name] + ')'
On your trigger view, you should see one row for every customer you have, with the properties of the email you'll be sending them reflected in the Email fields you just edited.
Finally, you are ready to test the alert. Make one last edit--change the Email To * field to your own email address so that you can send these test emails to yourself. ALWAYS TEST YOUR ALERTS, ESPECIALLY IF THEY GO OUTSIDE YOUR COMPANY! Can't stress that enough! Publish the trigger viz to Tableau Server, and once it's there, scroll down and add a comment in the comment box at the bottom that simply contains "test_alert". If VizAlerts is running, it will see that and fire off the trigger viz immediately, one time. You should get all the emails you expect to be sent within a few minutes.
Hopefully that helps. Let us know if you have any more questions.
1 of 1 people found this helpful
Sorry, forgot one thing. Nothing about this alert is conditional yet. All we have done is told VizAlerts to send custom reports out to these individuals every week. If you want to conditionally send these reports out, those conditions will need to be derived from the trigger viz. When the data is showing in the trigger viz, and the schedule runs, those actions will be executed. If the data is not showing, they won't. That means that if you have data you want to base your conditional logic on, it needs to live in the trigger viz.
As an example, in this case, maybe you only want to send your customers one email when they first become a customer. Like a "hey, welcome new customer!" email. So in that case, the rows you want showing in your trigger view would be only those customers that were added in the last week (since your report runs weekly). In that case, you would need the Customer Addition Date as a field in the Excel sheet, and then you would create a relative date filter to the trigger viz filtered to "Previous Week". So if you set your schedule to run every Monday morning at 7am or so, any customer who was added Sunday through Saturday during the previous week would receive an email. Thereafter, they would never get another one, because the date filter would weed them out.
You can create whatever conditions for your alerts that your data can support. Just find a way to filter the data out of the trigger view when you don't want it to fire.
First of all thank you for reply - it moved my thoutghs in right direction!
I still suffer on have no results in alert emailing, but...
I understood that propblem is likely on devOps side because whatever I set up in trigger viz - nothing happens. I'll pass it them back to check.
You mensioned that "The only thing blocking you from emailing a few external people a dashboard once a week is that they aren't users in Tableau Server." so I added unlicensed user with required emails. But further you give an example with new customers (a "hey, welcome new customer!" email) that uses their emails from CRM DB. How could I automatically add them to Tableau Server unlicensed user list?
The condition to send or not send email is contained in trigger viz fields body or attachments - if set reference parameter (eg VIZ_IMAGE(WeeklyReports/StatusDashboard)') returns empty data - email won't be sent, will it?
"Ensure your ScheduledTriggerViews viz is set up to allow your trigger viz to send to any email address." Suspect that default allowed address fields can block emailing. Can I leave them empty while testing?
Here's attached workbook, that contains viz-to-email (CPM by profit) and trigger viz (alerting). Trigger viz is subscribed with special disabled subscription starting with ѴizAlerts.
CPM by profit.twbx 60.7 KB
1 of 1 people found this helpful
Doing this WITHOUT VizAlerts:
Subscriptions for unlicensed users are ignored by Tableau Server, so if you're using Tableau Server without VizAlerts, you'd be stuck licensing each external customer you wanted to send an email to. You wouldn't need to allow them to actually sign in, mind you, you just need a way to get their email address in a place Tableau could send subscriptions to. You could automate the addition of new external customers and automatically subscribe them to the viz in question with the REST API. If you're on a user-based license and not core, that'd get expensive! And that approach comes with security concerns as well. So, probably not the best solution.
Doing this WITH VizAlerts:
No, the condition to send or not send email is not contained in any field in VizAlerts right now. Right now, if the data is present, e.g. appears in your viz, then emails will be sent. If nothing appears in the viz, no email is sent. That is the condition. Now, next version, we will make the condition the value in the Email Action * field, so things will be even better and still be backward-compatible. But that's not in the current version.
IF you have data in your trigger viz when the Schedule is set to run, your data will be examined, and emails will be sent according to the field values you've provided in the Email ___ fields. There is no conditionality in content references, so 'VIZ_IMAGE(WeeklyReports/StatusDashboard)' is always going to result in whatever that viz shows being embedded in the Body of your email, assuming that's where you put it. If that viz is empty, you'll get a blank image in there.
default_allowed_address_fields can block emailing, yes. And yes, you can leave it "empty" while testing, but since it is a regular expression, you want ".*" (without the quotes). That's just a wildcard, so it means "any address".
I can't see the data in your workbook, because it connects to your data live, but that's okay--I saw the Email calcs and they look just fine, so as long as there's data in your viz, emails will be sent. If you are adding the "test_alert" comment, and you don't get any emails, there is something wrong, probably with the way that VizAlerts was configured. The admin will need to investigate to determine why. If you are the administrator, then doing this will be much easier.
the problem was (as expected) on Windows Server side - not enough access rights.
Thanks for your explanation - now it's ruther more clear!
Glad to hear it, thanks for following up with the solution!