Can't access Stating after connecting a spreadsheet resource to my app

After I added a spreadsheet resource to my app I can no longer use the app to access staging at all. Is it possible to set a different spreadsheet in staging so we can use the same app both in staging and production?

Contact Retool Support

Hello @Mercedes_Anahi_Spataro Welcome to Retool Community! ,

Yes, it’s possible to set different spreadsheet resources for staging and production while using the same app in Retool. Retool supports environment-specific resource configurations, which allows seamless switching between environments without duplicating your app.Steps to Configure Different Spreadsheet Resources for Staging and Production

  1. Create Separate Resources for Each Environment
  • Go to Settings > Resources in Retool.

  • Create two resources, for example:

  • Spreadsheet_Staging for your staging spreadsheet.

  • Spreadsheet_Production for your production spreadsheet.

  • Configure each resource to point to the respective spreadsheet.

  1. Set Environment-Specific Resource Variables
  • Navigate to Settings > Environments in Retool.
  • Create or use an environment variable like SPREADSHEET_RESOURCE for each environment.
  • In the Staging environment, assign SPREADSHEET_RESOURCE to Spreadsheet_Staging.
  • In the Production environment, assign SPREADSHEET_RESOURCE to Spreadsheet_Production.
  1. Use the Environment Variable in Queries
  • When creating queries, reference the environment variable instead of hardcoding a specific resource.

  • No App Duplication: Use a single app that dynamically switches resources.

  • Seamless Environment Management: Reduces manual switching and potential errors.

2 Likes