Need Pabbly to return a single JSON object
Status: Closed · Asked by Matt2012 on · 0 views
I have a json object formatted in Pabbly Code, but even with Simple Response disabled I still get multiple responses. I think this is because 1 of the properties is an array.
var x = {
'a':'test',
'b':'test',
'c':['x':'test','y'...]
}
I need to put that entire object into one field in the next step.
I could construct the x object on the final step but the issue is sometimes x is empty and there is no way to conditionally map output.
Hey @Matt2012
var x = {
'a': 'test',
'b': 'test',
'c': [
{'x': 'test', 'y': '...'},
// Additional elements within the 'c' array
]
};
// Pass the entire object 'x' to the next step
output = {
'field_name': x // Assuming 'field_name' is the field in the subsequent step
};
Kindly try passing the entire JSON object 'x' into the 'field_name' in the subsequent step of your workflow, allowing you to access the entire object without converting it into a string. Adjust the syntax or field naming conventions as per your platform's requirements to ensure seamless integration.
Kindly try passing the entire JSON object 'x' into the 'field_name' in the subsequent step of your workflow, allowing you to access the entire object without converting it into a string. Adjust the syntax or field naming conventions as per your platform's requirements to ensure seamless integration.
Could you elaborate on how to access the raw response body from e.g. a webhook? It only lets me select different fields.

Hey @AllyDouillette
Could you please try the process again after capturing the response in advance format and check if it is working for you not

Hey @AllyDouilletteCould you please try the process again after capturing the response in advance format and check if it is working for you not
Sure, this doesn't simply give back a single item either:

The main difference is the following:
if you have a key that has an array attached to it, it'll be in one field when simple response is DEACTIVATED.

With simple response, this is split:
I sincerely apologize, but currently, it is not possible to capture the raw response from the webhook. The webhook can capture the response only if the application provides it in a format compatible with raw body type. If the application does not respond in this manner, the webhook will not be able to capture it in raw form.
I sincerely apologize, but currently, it is not possible to capture the raw response from the webhook. The webhook can capture the response only if the application provides it in a format compatible with raw body type. If the application does not respond in this manner, the webhook will not be able to capture it in raw form.
Wouldn't Zapier work either, then? Because they dealt with it just fine. It's all wrapped inside a big object.
by the way, Postman also has no problem just displaying the raw body, or is this the wrong form?

The documentation on the webhooks is also mentioning only raw json:
Currently, the specific action you are inquiring about is not feasible with Pabbly Connect. I apologize for any inconvenience this may have caused.
Currently, the specific action you are inquiring about is not feasible with Pabbly Connect. I apologize for any inconvenience this may have caused.
Thank you for the confirmation. Are you intending to implement this?
Currently, we are not aware of the possibility, but if any other user wants the same then we implement a solution in the future, we will notify you via email.
Can I make a different suggestion – the problem with the advanced response was that there was a key in the object which was an empty array, and it didn't show up in the field list. Dealing with an empty array can be accounted for in code, but if the Pabbly Field for said array is sometimes nonexistent, it causes problems (it's the "mentions"-key of the screenshot above)
Changing the API module slightly so that it e.g. takes this object:
{
"name": "Hello",
"MyFriends": ["Arshita", "Surpreme"],
"MyEnemies": []
}
and displays the "MyEnemies" *even if there are no items in the array* this would solve the issue.
I sincerely apologize, but the functionality you are inquiring about is not feasible. The only option available is to capture the response from the webhook in the advance format and use it accordingly.
I sincerely apologize, but the functionality you are inquiring about is not feasible. The only option available is to capture the response from the webhook in the advance format and use it accordingly.
How does the format of the response body have to differ for it to display empty fields, then?

The mentions *are* present, but Pabbly simply doesn't display them.

I know that I probably can check for whether the field exists with another combination of modules but it's imo questionable behaviour that you market yourself as a viable alternative to Zapier, try to tell your customers that they're simply using it wrong, then desert to "the API has to hand back the raw format correctly" – which are all valid points, just not when it's clear that the problem is the data processing of your own module.
I'm seriously considering making use of my return window simply for that and strongly recommend you re-checking why the module omits key value pairs it deems "unnecessary".
Please allow me some time to check this with our team. I will get back to you soon.
We've reviewed your request with our team, and unfortunately, this is not achievable with Pabbly Connect.
However, you can submit your request via the link below and upvote it. If any related features are introduced in the near future, I'll provide you with updates.
Since we get a lot of integration requests daily, we have added an integration request board to organize customers' requests and feedback.
You can add your integration request on the board and others can also upvote so that we can add new integrations on priority based on the feedback.
I would request you to please fill add your request to the board itself.
Please send us the request here for the new integration.
https://pabbly.hellonext.co/b/Integration-Request
We've reviewed your request with our team, and unfortunately, this is not achievable with Pabbly Connect.However, you can submit your request via the link below and upvote it. If any related features are introduced in the near future, I'll provide you with updates.
Since we get a lot of integration requests daily, we have added an integration request board to organize customers' requests and feedback.
You can add your integration request on the board and others can also upvote so that we can add new integrations on priority based on the feedback.
I would request you to please fill add your request to the board itself.
Please send us the request here for the new integration.
https://pabbly.hellonext.co/b/Integration-Request
Thank you, i did that.
https://pabbly.featureos.app/p/pabbly-connect-webhook
https://pabbly.featureos.app/p/pabbly-webhook-add-option-to-save-raw-response
For anybody reading this, THIS is the first (probably automated) response:
Thanks for using Pabbly Connect! We're sorry you're having trouble with saving the Webhook body into a single variable. We'd like to help. Can you specify the triggers and actions you're looking for in this integration? This would help us better understand your needs and address the issue more efficiently.We also recommend you reach out to the product team of Pabbly Webhook, to let them know you'd like this integration. Your feedback will be valuable in improving the process.
I wish I was joking, but they're absolutely serious about this. Gotta love the irony.