Where Can I Find Decode Info to load into Helium's Decoder?

I’m working using Pipedream to get info from my google form to my Helium Device.

I have everything connected and but it’s coming into the Cloud Console as a decoded message. Is the data being encoded BEFORE it makes it into the webhooks or after?

I’m looking to find out what the decode “code” is to input into the Helium Decoder.

Hi @lavellladishmon ,

First off, welcome to the Pipedream community. Happy to have you!

Just a couple of follow up questions to better understand you workflow and problem:

It sounds like your workflow is connecting a Google Form directly to your Helium console via the Helium API, how does Google Cloud fit in?

Which Helium API endpoint are you using specifically? From there we can look at the Helium docs and see what you’re referring to as the “code”.

Thanks!

Sorry,
By cloud console I meant the Helium Console.


I’m using the endpoint provided by pipedream and plugging that into my Helium Integration’s Endpoint

Oh got it @lavellladishmon thank you. I spend far too much time in hosting and I automatically read Cloud Console as Google Cloud Console. My mistake :sweat_smile:

The Pipedream HTTP webhook source doesn’t encode or alter the payload data incoming from a webhook. Any payloads coming from Helium are as-is.

Perhaps their API documentation would answer that question better, but I can say from our side that the body of payload is not encoded.

1 Like

It looks like the problem is that there isn’t a parameter called “payload” being passed from PD to the Helium Console.

I get the error “(downlink_decode failed): payload_raw_not_found”

Is there a way to configure the parameters that are being passed through from the endpoint through the PD webhook?

Hi @lavellladishmon ,

Yes absolutely.

In the HTTP trigger, make sure the HTTP Response field is set to Return a custom response from your workflow. It’s the last dropdown item in that screenshot you shared above.

Then in your workflow you can use a Node.js code step to return a response using $.respond that includes the JSON data that Helium expects:

In your case, it might look something like this:

defineComponent({
  async run({ steps, $ }) {
    await $.respond({
      status: 200,
      body: { message: "My custom response" }, // This can be any string, object, Buffer, or Readable stream
    });
  }
});

Awesome !!
What would that look like if I wanted to pass the Timestamp and Untitled_Question though? The data I need to pass through is under “Events”. It also doesn’t have “Payload Raw” as a step.

This is the format Helium needs to receive that data in…

Hi @lavellladishmon

Here’s the documentation for understanding Step Exports which is the screenshot you shared:

You can use a reference to the steps.trigger.event.Timestamp or steps.trigger.event.Untitled_Question in any steps, which can send an API request to Helium directly.

Alternatively you can process it with a custom Node.js, Python, Go or Bash powered code step or use one of our hundreds of API integrations.

I’ve been looking and watching videos on JSON and Axios and Node.js for hours and still can’t figure it out…

Where would I insert the “steps.trigger.event.Untitled_Question” into the code for it to pull it from the webhook and push it to the Helium API?

When we figure this out it’ll be nice because the next person won’t have to spend 3 days learning code just to use a webhook. haha

Hi @lavellladishmon ,

Here’s a short guide on how to use step exports in your Pipedream workflow actions, pre-built or Node.js powered:

In your case within the Node.js step, the steps variable contains all steps data - including the webhook data from Helium.

Try console.log(steps.trigger.event.Untitled_Question) within your Node.js step within the run function and you’ll see the output from the event.

I’m back at it @pierce … a little farther ahead but still stuck in the same spot.

I watched your video which was great. But I’m running into another issue. I’ve included the console log in the code (left), and it’s spitting out the correct details in the “Log” (bottom left). But when it’s received by the Helium console, its returning details about my Helium Device (right) and not the downlink data. I feel like my formatting isn’t correct somewhere.

Any suggestions? This is the last step to wrap this thing up after 4 months.

Hi @lavellladishmon ,

Sure thing! Thanks for the screenshots, they’re super helpful.

According the HTTP guide on Helium under the Downlink section your API call format should look like this:

https://console.helium.com/api/v1/down/{Integration_ID}/{Downlink_Key}/{:optional_device_id}

Your screenshot has cropped out most of the URL, but I have a hunch that it’s possible the link is missing the device_id option.

Could you share the URL you’re currently using in that axios call? We can double check against the documentation.

I think everything’s connected correctly because I’m receiving the information. It’s just not coming through in the correct form.

In my setup I see that it’s posting to the device url. But where does it communicate “what” is being posted to the URL? Could that be the issue? The console log is logging the correct information but I’m not sure how to tell it specifically what information to pass through to the device.

Hi @lavellladishmon

Thanks for the screenshots, they’re very helpful to follow along where you’re at.

Passing data to APIs from Pipedream

When sending POST HTTP requests, typically the body contains the data that you want to send to the 3rd party API.

I see you have the url and the method defined, but the data key is missing in your axios request to Helium.

There’s where you should place a variable or data to send to Helium.

Here’s an axios reference to show you all of the options in an axios request: Request Config | Axios Docs


Separately I just wanted to point out your URL may not be correct, double slashes are most likely breaking it:

Hopefully this helps, but if you need more help please provide the following:

  1. A link to the endpoint in the Helium API documentation that you’re trying to interact with
  2. Your full helium Node.js code step code. The screenshot is helpful, but the full URL is cropped out of the photo.