Notifications for Users using Analysis

Notifications for Users using Analysis

The Analysis is always a powerful tool when it comes to TagoIO, and that does not change for Notifications. Here you will learn how to send a notification for your TagoRun users using Analysis, how to use buttons, and how to handle user decisions over your notification.

Customized Notifications

When sending a notification using Analysis, the immediate features available are buttons. You can have up to four different buttons in your notification. There are different behaviors you can set a button to do:

  • Redirect to a TagoIO page.
  • Redirect to an external link.
  • Trigger an Analysis when pressed.

You also have a few customizable options:

  • Set the button label.
  • Set the button color. 

How to Setup an Analysis

We provide you with an Analysis template that will have a code for a demonstration. The following analysis does send a notification to all your users with given tags. 

Follow these instructions to setup your analysis and send the notifications. You can make any change to the analysis after it is installed in your account, to properly fit your needs.

  1. Go to your account settings by clicking on the upper corner of TagoIO page and enter My Account.
  2. Select your Profile in the sidebar.
  3. Go to the Tokens Section, create a new token with Expire In set to "Never" and copy the Token.
  4. Install the Analysis Template.
  5. Go to the Environment Variables of your analysis.
  6. Replace the field value "Your Account Token Here" with the token you copied in step 3.
  7. Fill the field value for tag key and tag value to match at least one of the tags of your users in the User Management.
  8. If you didn't setup a tag for any of your users, go to  User Management, enter one of your users, and create a tag key and value in the Tags section.
  9. Press Save and Run to start your analysis and send a notification to your users.

With this all up and running, you can open the script of your analysis and start to change it as needed. The code is fully commented on and detailed to guide you.

You can also create an Action to trigger the Analysis or set it to run every X minutes.

The Notification Object

You will notice it in the Analysis code, this is a quick copy and paste for you to use.

    "title": "title of your notification",
    "message": "message of your notification",
    "buttons": [{
        "label": "label of the button",
        "id": "id_of_the_button", // no space allowed
        "color": "color of the button",
        "url": "url to redirect the user",
         "analysis": "analysis to run when clicked"
    "buttons_autodisable": true // auto disable the buttons when one is clicked.

    • Related Articles

    • Notifications for Users

      You can push notification messages directly to the users registered in your TagoRun application.  This article will guide you on how to send notifications to your users using Actions or Analysis. Notifications for users are not much different from ...
    • Using Dictionaries & Multi-language

      Use the Dictionary to deploy applications to end-users (RUN users) in any language. All you have to do is to create a dictionary, use the #SLUG.KEY# format in the texts that will be substituted, and then select the languages that should be available ...
    • Security and Protection for RUN users

      With TagoRUN, you can provide actions and methods to increase your application's security and protection for your Run users, as well as make your application comply with the main laws regarding data privacy and security by providing your end-user ...
    • Defining Targets

      You should define Targets in each policy that are used inside the Access Management module (AM). Targets can be users or things (scripts). Targets are to whom or to what you are giving the permissions. Currently, you can select Run Users and Analysis ...
    • Access Management

      Access Management (AM) is a module that helps you securely grant access to certain resources in your account. You create Targets (users or things) and determine which type of Permissions for the resources they will have. Some examples of how AM can ...