How to hide an empty URL Parameter in Zap

  • 12 October 2022
  • 1 reply

Hi Zapier Community,

I’m trying to hide a URL parameter in my API request. See example below:{{team}}&api-key={{apikey}}

The team parameter is optional and should be empty for most users. However if I make an API request with the team team parameter empty i.e.

Then my API request fails. How can I configure Zapier to hide the team parameter if it’s empty?  


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 4
Badge +9

Hey @James N 👋

Are you able to include that team parameter in the request body, instead of the URL parameters, would the API you’re using accept that?

Otherwise, another idea would be to switch to Code Mode to add scripting to only include that team parameter in the url if the value exists.