Hi pipedreamers,
I’ve tried to script-kiddy my way through it with use of previous help topics, but I’m kind of stuck due to lack of node.js knowledge my side.
I’ll try to simplify my request for the sake of clairity.
Let’s say I receive a webhook with an array of data (e.g. item details of a shoppingcart). I want to loop through the array and store some data for each item with some basic join / concatenation into Data-Store.
For my next step I want to fetch that data from my Data-Store, use it and empty the Data-Store awaiting the next webhook arrival.
- I’m aware of (data-store) performance issues. I anticipate on about one to ten array items for each run/webhook, I guess performance will be fine.
- Yes, I know this github topic, it is working but not quite what I’m looking for
- This topic might help me on my final step, but I’m not there yet.
So for example, my webhook gives me the following details for every single item within steps.trigger.event.body.order.products.resource.embedded
steps.trigger.event.body.order.products.resource.embedded[0].articleCode
steps.trigger.event.body.order.products.resource.embedded[0].quantityOrdered
steps.trigger.event.body.order.products.resource.embedded[0].productTitle
steps.trigger.event.body.order.products.resource.embedded[0].variantTitle
Into Data-Store key embedded[0]
I want to join/concatenate the related data as “quantityOrdered | articleCode | productTitle | variantTitle” as a single value.
I want the same thing for all remaining items (embedded[1]
,embedded[2]
, etc etc)
In my final step I want to retrieve all data from the Data-Store, spit it out as single Telegram message.
I guess what I’m asking for will be a piece of cake from some of you, wizards as you are. Who wants to help me out?
Cheers!