Looking for Webhook POST example with multiple values

Question: What’s the best practice to access multiple parameters and pass them along in a webhook?

In Blynk 1.0, you could specify
{"value1":"/pin[0]/", "value2":"/pin[1]/", "value3":"/pin[2]/"}

In Blynk 2.0, we have device_pinValue to work with; the POST code looks like this:
{"value1":"{device_pinValue}", "value2":""{device_pinValue}", "value3":"{device_pinValue}"}

Except, of course, the 3 values should be [0], [1], [2] or something liked that.

On the initiation side, the virtual PIN that triggered it has moved from the app to the cloud, but it would be consistent if the parameters were sent through a code such as:
Blynk.virtualWrite(webhookVirtualPIN,value1,value2,value3);

Hello,

Did you mean support multiple values in a single pin?

That’s right. I’m using a POST example. I need to send information from Blynk and can’t use multiple webhooks, I need 3 data points in 1 webhook.

This will be added in the next deployment.

Thx. Is there an ETA for that?

https://docs.blynk.io/en/blynk.cloud/update-multiple-datastreams-api

Pete.

Possibility via placeholder will be added

thx. This is the other way around - the link you provide let you update multiple blynk values simultaneously. What’s missing is a way to send out multiple values with a single webhook (without resorting to some hacks).

1 Like

still new to blynk, is json a workaround (would mean extra data to be pushed from device) but maybe you push one last pin that has aggregate data in json and you then just have the webhook fire on that to pass it all as well?

Hello, @jbotte

Someone is using the API. Like in Update Multiple Datastreams Simultaneously - Blynk Documentation

Someone is using the placeholder "{device_pinValue}" in Custom JSON of Webhook

In next next deployment will support multiple values in a single pin

In sketch can be used like:
Blynk.virtualWrite(VirtualPIN,value1,value2,value3) for string type datastream

And use Custom JSON like:
{
“value0”: “{device_pinValue[0]}”,
“value1”: “{device_pinValue[1]}”,
“value2”: “{device_pinValue[2]}”
}

Regards

thank you. Yes, that’s what I had tried. Looking forward to this working in the near future

Happy to report that this functionality is now working. 2/2023.

I do have a follow-up question, @Oleksii-QA : when I wanted to add a 6th webhook, I received a message that I have reached the maximum number of webhooks I can create. I currently have a Plus 20 plan. It would be helpful to, at the very least, be able to create 1 webhook per device, preferably more than 1. I don’t see a limit on the number of webhooks one can create in the documentation. Would you know how one is able to increase this? It would be a real pity if one has to implement workarounds.

It’s here…

Pete.

Agree. We’ll increase this limit for the PLUS plan. Webhooks is relatively new feature so we have low limits, so we don’t make our server feel bad :slight_smile: .

thank you. It would be helpful to have a link to the limits on any page where the plans are discussed, most notably the billing page.