Subscriptions

Imagine you've built an automation that sends you a warning email if any of your machines is getting too hot. Then, you want another coworker to receive this email as well.

What you could do is add your coworker as another recipient of the mail in the automation, but there is one problem:

Automations are always executed by the person who owns the automation. This means that e.g. datasets used in the automation will only return rows from things to which the user owning the automation has access.

This basically means, that while you have access to things A, B, and C and get warning emails about these things, maybe your coworker only has access to things D, E, and F. By adding your coworker as a recipient to the automation, he or she will still get the mail about A, B, and C.

Here's where subscriptions come into play!

With subscriptions, you can allow different groups to subscribe to your automation. The automation is then not only executed for the owner, but also for every subscribed user, taking into account e.g. the things they have access to. The mail that is sent by the automation will also automatically be sent to the email of the subscribed user.

Long story short, when you give a group that your coworker is in access to your automation, your coworker can subscribe to it and will then get warnings for the things D, E, and F sent to his mail address.

Enabling subscriptions in your automation

The first thing you need to do is enable subscriptions in your automation.

Subscriptions are only available in automations with an email action.

To do that go into your automation and navigate to the email action. In the Mail config settings, you will see a toggle Enable subscriptions that need to be turned on. After enabling the toggle, a list with all the subscribed groups will be displayed, which will be empty if you just turned on subscriptions for the first time. After you've allowed some groups to subscribe to your automation, you can see these groups in this list.

Enable subscriptions toggle in the mail action settings of an automation

The general execution of a subscription will be turned on or off by activating and deactivating the automation (at the Automation menu) - regardless of whether a user is subscribed or not.

Allowing groups to subscribe

After enabling subscriptions, you will also need to allow groups to access your subscription. To do this, navigate to the group management and select a group you want to allow subscribing. After selecting, you can either scroll down until you reach the Subscriptions to Automations section, or just click on Subscriptions in the quick links on the left.

Here you will see all the subscriptions that the group currently has. To edit the subscriptions click on the Edit subscriptions button which will open a new modal window, showing all available subscriptions to add to or remove from this group.

Edit subscriptions modal in group management

After e.g. adding a subscription to a group, click the Finish button to close the modal. The added subscription should now be visible in the subscriptions section table, as seen in the following image:

If you are happy with your changes, save the group and your work is done!

Managing subscriptions

If you want to check what subscriptions are available to you, either click the Subscriptions entry in the main menu or go to the Automations main menu entry, and click on the Tab Subscriptions at the top of the screen. Whatever method you prefer, you should now see all the subscriptions you have access to.

To subscribe or unsubscribe, just search for the subscription you're interested in, and click the Toggle Button next to it in the Subscribe column.

Additional Privilege Requirements

As described above, the automation is executed in the name of the subscriber user. Additionally, these privileges must come from the same group that has been allowed to subscribe.

For example, the “Machine_Stop_Alert” automation requires access to both “Things_AU” and “Status_Code”. The subscriber group must have access to both. If access to “Things_AU” comes from “Group_A” and access to “Status_Code” comes from “Group_B” for a user, and the user has been subscribed via “Group_A”, only Group_A will be checked for access.