Artik Cloud with Particle HW

Hi @butilbenceno.
I am not an expert (just learning)...but re your question:

And maybe, just maybe, and I am thinking while typing I just need to massage the message increase the string size, and input the data variable with JSON string format including my refreshed data.
I don't know if that would work.

I am pretty sure it would. Whilst I didnt have a large array to deal with, I asked this question of the forum:
https://community.particle.io/t/how-to-pass-multiple-data-items-from-particle-device-to-webhook/

I too needed to pass multiple separate variables from the device to my webhook, then have the webhook parse these into the correct JSON variables when setting up a POST. The great tutorial by @rickkas7, at GitHub - rickkas7/particle-webhooks: Particle Webhooks Intermediate Tutorial which I quoted above explains nicely how to do that by creating a JSON string for the particle device "data" variable in the webhook, then using mustache templates to extract the variables up at the webhook.

To quote @rickkas7
> Sending Complex Data

In the examples above we pass a simple string in the "value" field in JSON. But what if you have multiple pieces of data you want to send to the server? Mustache can help you there too!

In the Google Elevation API example below we sent data from the Photon in JSON format.

The Photon code looks like this:

float lat = 39.73915360;
float lng = -104.98470340;

char data[256];
snprintf(data, sizeof(data), "{"lat":%f, "lng":%f}", lat, lng);

Particle.publish("getElevation", data, PRIVATE);
This will sent the data up to the cloud formatted like this:

{"lat":39.73915360, "lng":-104.98470340}
Then, in your query and json webhook templates, you can now use {{lat}} and {{lng}} Mustache variables to access the values of those fields.

Also handy: If you need to generate an access token on your Particle device, you can pass it up along with other data in JSON format, then include it in an Authorization header or in a URL query parameter using Mustache.

In my case I solved my problem (of having to send two variables - an authorisation token and a message body to a SMS API service) with this Photon code

  if (token.length() > 0)  {
    String message = "{\"SMSTokString\": \"Bearer ";
    message.concat(token);
    message.concat("\", \"body\": \"");
    message.concat(body);
    message.concat("\"}");
    Particle.publish("SendSMS",message,60,PRIVATE); 

and this JSON webhook setup text file (setting the webhook up from the CLI using a text file is definitely the way to go).

{
"event": "SendSMS",
"url": "https://api.telstra.com/v1/sms/messages",
"requestType": "POST",
"headers": {
"Authorization": "{{SMSTokString}}"
},
"json": {
"to": "cell number",
"body": "{{body}}"

},

"mydevices": true,
"noDefaults": true
}

I hope this helps