How to Synchronize Database Users with Retool Users in Any Plan

Andrea Avatar

·

·

linking retool with database

At Backofficely, we understand the complexities of managing user data across platforms. One of the most common needs is synchronizing your database users with Retool users. Fortunately, whether you’re on the Free, Team, Business, or Enterprise plan, there are several ways to automate this process.

Let’s walk through how to set up user synchronization based on your Retool plan.


For Free, Team and Business Plans: Sync Using a Custom Page

Even without the Enterprise plan, you can easily sync users by creating a custom page in Retool that triggers database user creation when they log in.

Step 1: Set Up Retool Authentication

Each user in Retool gets a unique Retool User ID upon login. This ID can be utilized to manage users in your database.

Step 2: Build a “Continue” Page

Once a user logs in, direct them to a “Continue” page within Retool. This page can prompt a user action, such as clicking a button, which will trigger a workflow to check for their user ID in your database. If they don’t exist, a new user is created in the database, and their Retool User ID is saved for future reference.

With the Business plan, you can take this a step further by setting up a landing page specifically for external users. This is especially helpful for businesses that have users who access your Retool apps without being a part of the organization(external users).

Here’s an overview:

  • User logs in → directed to “Continue” page.
  • Workflow checks if their Retool User ID exists in the database.
  • If not, a new user is created, and the Retool User ID is stored.

This method ensures that each Retool user is synchronized with your database, providing an easy link between the database user and the retool frontend.

For Enterprise Plan: Fully Automate with Retool Workflows and Events

If you’re on the Enterprise plan, you can automate the entire user sync process using Retool Workflows and Events.

Step 1: Set Up Retool Events

With Enterprise, Retool allows you to track user actions, including when a new user joins.

retool events page

Step 2: Automate User Creation

retool workflow that is triggered by a retool event

You can set up a workflow triggered by Retool Events to:

  • Detect when a new user joins.
  • Automatically create a database user.
  • Store the Retool User ID, ensuring a consistent link between the Retool user and your database.

This fully automated solution ensures seamless synchronization and removes the need for any manual intervention, making it ideal for larger-scale operations.


Storing Retool User ID in the Database

In all plans, it’s important to store the Retool User ID in your database to keep a consistent record and ensure smooth future operations, like user-specific queries or permissions management.


Conclusion

No matter what Retool plan you’re on, there’s a solution for synchronizing your database users. From manual triggers with a custom page on Free or Team plans to automated workflows with the Enterprise plan, Retool provides the flexibility you need to manage users efficiently. The Business plan even allows external users to be automatically redirected and synced when they log in.

(Images provided by Freepik)

Leave a Reply

Your email address will not be published. Required fields are marked *