Update firebase document using the existing Update Document template with boolean

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?

Hi @Timfong888,

To pass a boolean value instead of a string in the Firestore Update Template, you can use an expression. In Pipedream, expressions allow you to run Node.js code and use the result as the value. To set a boolean value, you would use double curly braces {{ }} and include the boolean value true or false without quotes inside the braces. For example:

{{true}}

or

{{false}}

This tells Pipedream to treat the value as a boolean instead of a string. Remember, when you’re manually entering or editing an expression in Pipedream, you just enter or edit a value between double curly braces {{ }}, and Pipedream provides auto-complete support as soon as you type. This approach allows you to dynamically set values based on the execution context of your workflow.

For more details on entering expressions, you can refer to the Pipedream documentation on manually entering or editing an expression: Manually enter or edit an expression.

I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double-check my answers and code! Learn how to build your own.