How to confirm environment.variables.NAME is correct in Python Workflow

Recently, I was able to print the value found under environment.variables.NAME in my Workflow. There's a message that says the value is redacted now, which is fine. However, Ever since they changed to the redacted messaging, I'm not able to get a Cipher from cryptography to read a key that is passed from the environment.variables.NAME.

When I run the test inside the Workflow Configuration page and pass the expected values, my block works as intended. That same block of code was working as well until now and I can't seem to confirm environment.variables.NAME when the webhook is live. The error I'm seeing comes from that line of code that looks at this key. I have the key set under the post body of the webhook that triggers the workflow. Based on the documentation it should be passed as environment.variables.NAME which I'm doing. Can anyone help me out with what the issue is here? After 6 months of working fine, without any changes, it's frustrating that it's not working now.

Hi @Aldo_Lambruschini - thanks for raising this! To confirm, is the error only occurring when you run the block individually to "test things out" (but everything works as intended when you run the workflow in its entirety)?

When I test under the Workflow configuration page and I add the test JSON:


I "Run" the complete workflow and it works as it did when it was live a few days ago. When I run the same code through the actual webhook trigger and pass along the key inside the post body as recommended, it keeps failing, and I can't check the value in my logs. I've tried to delete and add the environment variable, tried it as a secret and not and still getting the same error.

Hopefully this gives you the details you need to help troubleshoot.

@cathyretool is there an update on this?

@Aldo_Lambruschini Thanks for sharing the details! That makes sense.

We recently introduced sanitization of secret values in workflow logs and results, to make sure sensitive information doesn't get exposed. It seems that the webhook post body is also being sanitized, which is why the "actual webhook trigger" path doesn't work despite the "run the complete workflow with the test JSON" working. Thanks for calling attention to this - we'll look into addressing this promptly.

Fortunately, though, we're actually releasing support for referencing configuration in workflows in the next two weeks! I imagine that passing environment.variables.NAME in the webhook post body is just a workaround for reading your configuration variable directly in the code block? I just added your cloud organization to the beta (and sent you an email with more details) - please give it a try, as I think it should resolve this!

@cathyretool Awesome! I'll try out the beta feature. Accessing directly from the code block itself was always the goal. This was a workaround. I'll provide feedback if needed. Thanks again for providing a resolution!

1 Like

Closing the loop here - the original issue has been fixed!