Query resources with the Resource query block
Learn how to interact with data sources in a workflow.
Learn more about Retool's built-in API and database integrations, and how to connect your own data sources.
You can add Resource query blocks to workflows that enable you to write queries that interact with the resources in your Retool organization, such as SQL databases or APIs.
The available options in a Resource query block depend upon the selected resource. For example, if you select a PostgreSQL database then you can write SQL statements or use GUI mode to construct queries that write or modify data.
If your resource uses OAuth, make sure Share credentials between users is enabled on the resource configuration page. This ensures workflows run automatically.
Configure block settings
You can configure the following settings for Resource query blocks.