Hi Guys,
I am using workflows and under results usually thell be fields which i can write my JSON output to.
Cant seem to find it.
Anything i am doing wrong?
Regards,
Dilip
Hi Guys,
I am using workflows and under results usually thell be fields which i can write my JSON output to.
Cant seem to find it.
Anything i am doing wrong?
Regards,
Dilip
Query the JSON Once, Outside the Loop
Loop over the transformed JSON
Extract Specific Values Inside the Loop (e.g. userID)
Use the Extracted Values in Your “Add Row” Action
Hope this helps!
Hi @Eric_Penn ,
Thank you replying. Your reply saved my life. It works now.
however I have one more query, what if i need to send brandName as a field in my webhook along with JSON body? because i want this brand name to be typed in each row for which the value is put in the table. Is there anyway i can do it?
PS: this BrandName is not part of my JSON body which ill send over webhook
Thank you in advance for your help
Regards,
DIlip
Hmmmm… maybe you can send it as a request query parameter, although I haven’t tested that approach. Alternatively, you could add another field to your JSON. Feel free to experiment and let me know if it works.
Hi @Eric_Penn ,
I tried sending one more paramter in the paramteres sent from webhook.
It looked like this when it was recieved
But it gave an error saying Loop source not an array. I am assuming its because its still treating the entire thing to be a string i guess.
PS: it needs to by dynamic as itll differ for every request
I hope you meant send one more parmaeter in the webhook body?
Regards,
Dilip
Apologies, I haven’t tested beyond what I’ve shown. Personally, I’d include it directly in the request body.
Hi @Eric_Penn
Thank you for your reply. Will experiment, not sure how i can fetch dynamic values.
Regards,
Dilip
As long as you send it along with your request body when you trigger the webhook, you should be able to query for it in the webhook workflow.
Hi @ThinhDinh ,
thank you for replying. When I send both parameters in Webhook its received like this
But when I pass the response body containing the above through a query like this
Its saying ---- Too Large : true
The loop is configured to take the output of this query
For which the error is shown that its not array
What would be wrong thing I am doing in this config?
Thank you in advance for your help
Regards,
Dilip
Shouldn’t you query the “New Column A Copy” part to loop (please also name your variable).
Hi @ThinhDinh ,
Thank you for replying. Apologies I renamed it now.
I also want to get the BrandName written to every row under column name BrandName which is being added with other values under New Column A Copy.
is that possible?
Regards,
Dilip
Just have another query module to get the brand name from your body, then reference it in the add row step.
Hi @ThinhDinh ,
I did that, In the first Qurty JSON outside Loop I am getting Data Too Large
ANd in the loop for which the input is output of Query JSOn above it is giving error “loop Source is not an array” I am assuming the error is because of the extra parameter I sent in web hook which is brand name.
So its not going to query JSON inside the loop.
Regards,
Dilip
How many items are you working with here?
The extra parameter should not be an issue if you can query out the JSON array.
Hi @ThinhDinh ,
There are 20 items in here.
But the extra parameter is out of this 20 items, Would that be an issue?
Regards,
Dilip
Again, at the point you start working with it, just query that extra param out as a query step.
Then, query the array, loop through that array.
Hi @ThinhDinh ,
I followed what you said.
I am able to get BrandName in output.
But in Loop where I am inputting Second query input Its throwing error . Saying Loop source is not an Array
Please find the screenshot of my Second JSON query
Below is my JSON body I am getting in from webhook
Regards,
Dilip
Can you show me the result of that BrandJSON step from a run?
Hi @ThinhDinh ,
thank you for your reply. Since I was not able to copy paste, I have put the entire web hook received in below link
Regards,
Dilip
That is certainly too long. Is there a way you can query out only the fields that you need from this JSON? How many do you need the workflow to process?