Resources quickstart
Learn about the fundamental concepts of connecting your data to Retool.
This guide serves as an introduction to resources, data sources, and integrations. It covers many of the concepts and terminology you can expect to use as you connect data sources to use with apps and workflows. After reading this page, you should have a good understanding of the fundamentals for connecting APIs and databases.
Introduction
You can connect almost any data source and make it available for use in your Retool organization as a resource. Retool includes a wide range of integrations and authentication methods so you can connect to almost any database or API.
Retool also offers a range of built-in solutions that you can use instead of external data sources.
Data sources
A data source is somewhere you store and perform operations with data. This could be a PostgreSQL database, the Twilio REST API, an Amazon S3 bucket, etc. You can add as many data sources as you need to Retool and make them available for users to query.
Resources
A resource is a saved set of user-configured properties that determine how Retool interacts with a data source. You create a resource for each data source you want to use with Retool. You can then select the resource when writing a query so you can interact with the data.
Each resource has its own configuration options that Retool uses when interacting with a data source. This configuration can include:
- Authentication credentials and flow (username and password, API key, OAuth, etc.)
- Database connection settings (host, port, database name, etc.)
- API settings (base URL, default headers, cookies, etc.)
Retool access to resources
Retool Cloud organizations must ensure that any configured resources, such as APIs and databases, allow access from Retool's IP addresses. If you make use of inbound firewall rules, include the following IP addresses in its allowlist. Refer to your data source or firewall documentation for specific guidance.
Retool is building support for querying firewalled resources without allowlisting Retool’s IP address. To learn more or be considered for early access, contact cloud-connect@retool.com.
The following IP addresses are for Retool's default us-west-2
region, based in Oregon, US. To route resources through Europe or other regions, see the outbound regions documentation.
3.77.79.248/30
35.90.103.132/30
44.208.168.68/30
3.77.79.249
3.77.79.250
35.90.103.132
35.90.103.133
35.90.103.134
35.90.103.135
44.208.168.68
44.208.168.69
44.208.168.70
44.208.168.71
If you use Retool Self-hosted, refer to the self-hosted network and storage requirements for additional details.
Lifecycle
When a resource query runs, Retool proxies the request to the data source, server-side, using the resource's configuration settings. This method ensures only Retool directly connects to a data source, not your users.
Retool abstracts away all of the complexities when connecting to a data source from your users. They only need to select the resource to use when writing a query. The type of data source is also displayed but your users only need to specify the resource. In addition, you can connect different data sources of the same type. For example, you can add multiple Amazon S3 buckets as different resources to distinguish their usage.
With this approach, users don't interact directly with your data sources. Retool avoids any client-side connections to the data source that could expose credentials and ensures all interactions use the same conditions. Resources also make query caching possible, which allows Retool to serve cached data and reduce the number of requests to a data source—potentially reducing costs.
Authentication methods
Retool supports wide range of authentication methods, including:
- API keys and tokens
- Auth0
- AWS IAM
- Basic HTTP authentication
- Bearer authentication
- Digest authentication
- Google service account
- Oauth 1.0
- Oauth 2.0
- OAuth 2.0 custom applications
- Session-based
You can also configure custom authentication to perform complex or bespoke resource authorization that require multiple steps.
Integrations
Integrations are the available data source types for which you can create a resource. Retool includes built-in integrations for many popular data sources that require minimal configuration, such as SQL databases, Twilio, and Stripe.
If Retool doesn't have a built-in integration for a particular type of data source, you can connect to almost any API using REST, GraphQL, or SOAP integrations.
Built-in solutions
Retool has a number of built-in resources with which you can store and use data.
Retool Database
Retool Database is a fast, secure solution for saving and editing data to use in Retool apps. It combines a PostgreSQL database with a spreadsheet-like interface to manage your data. On Retool Cloud, the underlying database is managed by Retool. On Self-hosted deployments, you host your own PostgreSQL database.
Retool Email
Retool Email is a hosted email resource for cloud-hosted organizations to send emails without needing to configure an email provider. You can build apps and workflows that send emails using the Retool Email resource.
Retool RPC
Retool RPC (Remote Procedure Call) is a fast, secure solution for connecting your own codebase to Retool. You define functions in your backend and then call them from Retool apps using a Retool RPC resource.
Retool Storage
Retool Storage is a Retool-hosted file store for cloud-hosted organizations. Using Retool Storage, you can upload and download files and use them in your apps and workflows. Retool Storage includes up to 5 GB of storage per organization. Files can be up to 250 MB each, although your browser may have settings that restrict this limit further.
Some file input components, such as Image and PDF, have built-in support for files on Retool Storage; automatically uploading files without the need for separate queries.
Retool Vectors
Retool-managed Vectors is a hosted vector database that enables you to store unstructured text from documents and web pages for use with AI models through Retool. Retool abstracts away the complexities of preparing text and automatically generates the required data for AI models to make decisions using your data.
Helper resources
Helper resources don't interact with data sources. Instead, they provide you with additional functionality to transform or manipulate data. These resources include:
Resource | Description |
---|---|
Query JSON with SQL | Write SQL statements to query JSON data. |
PDF Exporter | Export data as a PDF file. |
ParentWindow | Receive data from the parent page when using an embedded web app. |
Run JS Code | Write JavaScript code to transform data or control app behavior. |
Mobile Push Notifications | Send push notifications to Retool Mobile app users. |
Retool Workflow | Run a workflow using provided data and receive the output. |
User Action | Perform actions for external users. |
Import from Query Library | Import a query from the shared Query Library. |