How get the environment

I'm using retool cloud and need get the environment that execute in workflow, similar how you can use in selfhosting: {{retoolContext.environment}}

You can access the environment via {{workflowContext.environment}}!

Not work in values headers:

@zeroray Which type of workflows block are you using in the screenshot above?

Is a function inside the workflow :grinning:

@zeroray Ah, I see! Thanks for sharing. This may be a bug, where the Headers section doesn't have access to the workflowContext scope for REST API resource queries inside functions; I have filed a report internally. For now, I recommend using a standard REST API resource query block (instead of a REST query inside a function block), because this issue seems to only be present inside functions.

Hi @zeroray,

Just wanted to follow up and let you know this has been reported as of April 12th and I will comment here with any updates. Apologies for any inconveniences or delays!

1 Like

@AbbeyHernandez - I came across this while searching for an issue I’m having where an API POST I am making gives different responses when called as a function in a workflow vs a standalone block. Despite having the exact same setup, one of the keys (of course the one I rely on…) doesn’t show up when I call the API as a function.

Use case was trying to rewrite some complicated flow logic into a custom loop with nested sub-loops (thus the API as a function not a block).