Fetch config setup on each instance in scripts / elements

How can I use environment variables in my apps ?
I have an identifier of some of our resources which I want to be able to display in our apps when they're opened.

I tried using %RETOOL_EXPOSED_MY_CONFIG% in apps, but this notion isn't recognized

Hey @nishant.vashisth!

Happy to help here! I believe these would only be available on the resource setup page and not in the app itself. Let me know if you have any questions! :slight_smile:

Hi @Chris-Thompson

Is there then any way of having a config available to apps which can change per instance of retool?

For example multiple config values (say provider identifier) to point to a different values in each app per instance.

i.e. Multiple dynamic configs per instance of retool in apps

Hey @nishant.vashisth — would you mind telling me a little more about these dynamic configs? Are you looking for data to persist per user or per app? You may be able to use global JS (link to our docs on this here) for this.

Hi Chris,

This config is a mongo db generated identifier of one of the database resources.
Since we have a retool instance per environment, the mongo db identifier is different, and I'd like to have access to that identifier when running queries to be there as an extra filter to the mongo query.

For you, yes, I did end up using organization level java script to inject the value in functions.

window.myIdentifier(() =>
return 1234567890;

However, if this was a secret identifier, then it would've been super difficult for me to achieve this.

Is there a way to provide a secret identifier the same way ?

Hey @nishant.vashisth — so after asking around here, it sounds like this is not currently possible in Retool. I don't believe there is a way to include a secret value in the body of a query. Would you mind posting this as a feature request on the community so that other users who are interested can chime in on this?

Hi @Chris-Thompson,
That's unfortunately, for now, I'm using organization level javascript since it's not transferred to instances automatically via git sync.

I've created a feature request