How to Fix Error Message When Attempting to POST a Boolean Value Using the Build an HTTP Request Action?

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

I’m trying to use the Build an HTTP request action to POST Content-Type application/json to an endpoint using the Key-Value Pair editor. One of the keys is named active and the value should be active. However, I need it to be a boolean value - even though I type in true for the value, I get an error: “/active must be boolean.” Do you have any suggestions for how I could fix it?

To resolve the issue where the active key needs to be a boolean value in the HTTP request, you should ensure that the value is correctly interpreted as a boolean. When using the Key-Value Pair editor in the “Build an HTTP request” action, the values you input are typically treated as strings. To explicitly set a boolean value, you can use the JSON editor instead. Here’s how you can do it: 1. In the “Build an HTTP request” action, switch from the Key-Value Pair editor to the JSON editor. 2. Enter your JSON payload directly, ensuring that the active key is set to a boolean value. For example: on { "active": true, "other_key": "other_value" } This way, the active key will be correctly interpreted as a boolean value. ### Steps: 1. Open the HTTP Request Action: - In your workflow, add a new step and select the Send any HTTP Request action. 2. Switch to JSON Editor: - Instead of using the Key-Value Pair editor, look for an option to switch to the JSON editor. 3. Enter JSON Payload: - Enter your payload directly in JSON format, making sure to set the active key to true (without quotes). Here’s a visual guide to help you: 1. Starting a new HTTP request action in a workflow: !Starting a new HTTP request action in a workflow 2. Opening the HTTP Request Authorization Type dropdown: !Opening the HTTP Request Authorization Type dropdown 3. Select an account: !Select an account By following these steps, you should be able to correctly set the active key as a boolean value in your HTTP request. If you

Wow, Pi for the win. Impressed with this one.