Question

How to hide an empty URL Parameter in Zap

  • 12 October 2022
  • 1 reply
  • 31 views


Hi Zapier Community,

I’m trying to hide a URL parameter in my API request. See example below:

www.example.com/orders?team={{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. 

www.example.com/orders?team=&api-key=123

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

Thanks


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.