Best answer

JSON parameters in Webhooks POST action

  • 2 July 2021
  • 2 replies
  • 1086 views

I need to send this from Zapier (see “parameters” field)

{
  "account": "5698227xxxx",
  "name": "requerimiento_1",
  "parameters": ["Francisco"],
  "phone": "5699349xxxx"
}

 

But Zapier sends this

{  "account": "5698227xxxx",  "name": "requerimiento_1",  "parameters": "Francisco",  "phone": "5699349xxxx"}

 

I tried to use nested parameters (with the double underscore) and got this

{  "account": "5698227xxxx",  "name": "requerimiento_1",  "parameters": {    "": "Francisco"  },  "phone": "5699349xxxx"}

 

Help!! 

Thanks!!!

icon

Best answer by SamB 2 September 2021, 16:16

View original

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

2 replies

Userlevel 7
Badge +14

Hi @fromero 

Can you please further elaborate on your use case?

Are you getting an error from the receiving app?

Userlevel 7
Badge +11

Just wanted to follow up here for anyone also running into similar issues here to mention that in order to send a nested array the Custom Request action would need to selected for the Webhooks by Zapier app.

 

If that action is selected and it’s still altering the format when double underscores are used, then it could be that the Unflatten option needs to be set to No. By default it will automatically try to convert fields with double underscores so that may be why it’s being altered:
398fbe9cc1facdfbc943da29aa1faf7a.png

If that doesn’t do the trick, it may be worth using a JSON validator like JSONLint to check its valid. And we have some helpful guides and resources that may be useful in troubleshooting further: