Skip to main content
Question

How to hide an empty URL Parameter in Zap

  • October 12, 2022
  • 1 reply
  • 32 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

Did this topic help you find an answer to your question?
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

Forum|alt.badge.img+9
  • Zapier Staff
  • 238 replies
  • October 12, 2022

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.