Skip to main content

Push notifications

Learn about push notifications in Retool Mobile.

Retool Cloud and Self-hosted organizations can send push notifications to Retool Mobile users. Push notifications are a built-in feature made available using the Retool Mobile app for iOS and Android.

Retool uses Amazon SNS to provide a centralized service for push notifications in Retool Mobile. This makes it possible for Retool organizations to send push notifications without any additional configuration or dependencies.

The Mobile Push Notification resource

Retool makes push notifications available as a resource. This enables you to write queries that send push notifications using any Retool app or workflow. For instance, you could configure a webhook-triggered workflow to send a push notification if a PagerDuty incident is created or if the daily order volume in Stripe exceeds a particular threshold.

Users must first explicitly subscribe to push notifications—you cannot automatically enroll a user.

Topics

Push notifications use topics to represent the scope for recipients. Topics are similar in function to mailing lists—users subscribe to them based on what information they want to be notified about. Users subscribe to push notifications using a subscription query in which you specify the topics to use. To send a notification, you use a query that references the relevant topic rather than managing a separate list of users.

Retool initially includes the ALL_USERS topic, which represents all Retool Mobile users in your organization. You can add or remove topics, and set your own, such as SALES_TEAM or ENG_ONCALL. You specify the topics to use in both the subscribe and send queries. Once subscribed, a user can receive notifications to the topics in which they're included.

For example, the overall process to send notifications to sales managers could be:

  1. You create a query to subscribe users to a set of topics, such as SALES_TEAM and SALES_MANAGERS.
  2. A sales manager opens the mobile app containing the subscription query and then subscribes to those topics.
  3. To send a notification, you specify the topics to use. To notify sales managers, you would use the SALES_MANAGERS topic.

You can also subscribe users to direct notifications on an individual basis using the USER topic (e.g., USER:{{current_user.email}}).

Action type

The query's Action type determines what action to take in relation to push notifications.

Subscribe

The Subscribe action type subscribes users to push notifications. You add subscribe queries to mobile apps that run automatically when launched by a user. This adds the user to the topics defined in the query. Only Retool Mobile apps can contain subscribe queries.

To subscribe a user to direct push notifications intended only for them, use USER:{{current_user.email}}.

Send

The Send action type sends push notifications. These queries use the specified topics to represent the recipients. For instance, SALES_TEAM sends a push notification to all users who subscribed to the SALES_TEAM topic. You can send notifications directly to individual users if they subscribed with the USER topic with their email address.

Push notifications can include deep links to other Retool Mobile apps and the screens they contain. This enables users to tap on a notification and be taken directly to a relevant app.

You can also include data as key-value pairs when sending a push notification which can be referenced in apps using initialDeepLink.params. This enables you to further customize the deep link experience. For example, you could include a user ID using id=123 and reference it in a query to look up users with {{initialDeepLink.params.id}}.

initialDeepLink.params also includes the following properties:

PropertyValueDescription
appNamestringThe app to launch when the notification is tapped.
releaseVersionstringThe release version of the mobile app.
screenstringThe specific screen in the app to open, if set.

For example, a workflow could automatically send a notification whenever a new sales lead is received. The notification deep links to a sales CRM app and includes the id of the new lead. A recipient can tap on the notification and navigate directly to the app. By including the id, the app can automatically display the lead's information.