# 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:

{% hint style="info" %}
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.
{% endhint %}

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.

{% hint style="info" %}
Subscriptions are only available in automations with an email action.
{% endhint %}

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 o&#x6E;**.** 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](/files/KIPPeq0fsKR2Vvk4jSWA)

{% hint style="info" %}
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.
{% endhint %}

{% hint style="info" %}
If the subscription is enabled (Enable Subscriptions toggle), E-mail receiver field is no longer mandatory: automation can be saved with it being empty. This means, e-mails are going to be sent to subscribed users only (if available).
{% endhint %}

### 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.&#x20;

{% hint style="info" %}
Editing subscriptions can only be done if the group has at least read access to automations.
{% endhint %}

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](/files/gOeTjBkUBEuWMPGX8MIw)

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:

![Subscriptions section in group management](/files/cGE5tzo24A8W6YBPLJpv)

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.&#x20;

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.

![List of subscriptions for a user](/files/LgqUuouzfZrjgJUQkjKY)

{% hint style="warning" %}
When someone gives you access to a new subscription, the subscription is turned off by default. Check your subscriptions and turn on the ones you want.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.senseforce.io/manual/sf-platform/automations/subscriptions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
