How to Pass a Boolean Value in Firestore Update Template?

This topic was automatically generated from Slack. You can find the original thread here.

Hi, and anyone else who can help:

I am sing the Firestore Update Template. and I need to set a boolean value. However, typing ‘true’ is treated as a string.

How do I pass a boolean value?

To pass a boolean value in the Firestore Update Template, you need to use the expression syntax {{ }} to evaluate the value as a boolean rather than a string. For example, to set a boolean value to true, you would use: {{true}} Similarly, to set a boolean value to false, you would use: {{false}} Make sure to place the boolean value within the double curly braces {{ }} without quotes. This tells Pipedream to evaluate the expression as a boolean value rather than treating it as a string. Here’s how you might update your Data configuration for a boolean field: audio_url: {{steps.merge_variables.v1.$return_value.audio_url}} status: {{true}} // Assuming you want to set this to true This approach ensures that the status field is treated as a boolean true in Firestore.

How do I pass an enum ?