Skip to main content
Best answer

{{bundle.inputData.field}} is sent even when empty


I have created a integration that requires a API POST call.

Everything goes smooth but when certain fields are empty the value {{bundle.inputData.field}} is printed in the DB.

It does not seem to happen for all fields, though - and that’s confusing.

Best answer by fratimo66Best answer by fratimo66

Hi Zane, thanks for having the time to look into it. I’m working in Code Mode.

 

I’ve sorted this by turning the

“field” : “{{bundle.inputData.field}}”

into

“field” : bundle.inputData.field

 

View original
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.

3 replies

Forum|alt.badge.img+9
  • Zapier Staff
  • 331 replies
  • March 23, 2022

Would you mind posting your code? Maybe some more eyes can help spot the issue.  

Note that, when configuring requests in “Form Mode” in the Platform UI there’s an option to omit empty values automatically: 

(If you’re working in Code Mode that’s not helpful, but posting here for other readers)

Before turning that on: here is the body of the message {"id":"55322","cars":"","pets":"","city":""}

After turning on those options: here is the body of the message {"id":"55322"}

Note that the empty values are null… not the variable name with curlies, which makes me think something is misconfigured.  


  • Author
  • New
  • 1 reply
  • Answer
  • March 23, 2022

Hi Zane, thanks for having the time to look into it. I’m working in Code Mode.

 

I’ve sorted this by turning the

“field” : “{{bundle.inputData.field}}”

into

“field” : bundle.inputData.field

 


Forum|alt.badge.img+9
  • Zapier Staff
  • 331 replies
  • March 23, 2022

Awesome! Glad you’re up and running. And thanks for posting the follow up. 😀