Hey! Would love some help with a custom HTTP request I have. The query wont run, and says "some inputs missing" if any of the inputs are empty. How can I make the query run, even if salary max, salary min, and salary unit are blank?
To make your custom HTTP request run in Clay even if inputs like salary max, salary min, and salary unit are blank, you can use the "Remove empty fields from the request" option. Here's how: 1. In your HTTP API integration setup, look for the option "Remove null and undefined values" or "Remove empty fields from the request". 2. Toggle this option on. This will automatically remove any fields in the request that are empty, null, or undefined, preventing blank values from being sent to the API. This helps avoid potential data overwrites or errors caused by missing information. If you're still experiencing issues, please copy and paste your JSON into the chat so we can troubleshoot further.
I have "Remove empty fields" enabled
To make your custom HTTP request run even with blank salary fields while "Remove empty fields" is enabled, you have a couple of options:
1. Disable the "Remove null & undefined values" option. This will send all fields, including blank ones.
2. If you need to keep this option enabled, you can modify your request body to include default values for these fields. For example: LBKS{ "salary_max": ##{{salary_max}} || null, "salary_min": ##{{salary_min}} || null, "salary_unit": ##{{salary_unit}} || "" }LBKS
This approach ensures these fields are always included, even if blank.
If you're still experiencing issues, please paste your JSON in the chat so we can troubleshoot further.
Nevermind, I have figured this out
Haha! Just spotted that, thanks!
Incredible! Let us know if this is fully resolved James, happy to dig in deeper here. :)