Integrating with InfluxDB Cloud

Navigate to:

If you followed the tutorial I presented a couple of years ago about integrating with InfluxDB and were unhappy, or simply couldn’t get it working, have I got a treat for you! Integrating with InfluxDB Cloud is very straightforward and requires no outside services or customizations outside of what Particle Cloud already offers. Here are the steps to get it all working:

  1. Go to your Console and click on the Integrations tab.
  2. Click on New Integration, and choose Webhook.
  3. Fill out the form! You need to know your event name, and it needs to be spelled exactly the same as it is in your on-device code!
  4. You'll then enter the URL of your InfluxDB Cloud instance. It might be different depending on the region you signed up for, which can be found on Load Data > Client Libraries Page: https://<your region>.<aws or gcp>

You will need to know the name of your Organization and Bucket as well, which you can grab from the InfluxDB Cloud management interface.

InfluxDB Cloud Particle - edit integration

Next you’ll want to choose ‘Custom Body’ as your request format, and then expand the ‘Advanced’ setting as well. In there, you will insert the following:

InfluxDB Cloud Particle integration advanced settings

You can set whatever tags, if any, that you’d like, and then use the ‘mustache’ notation to reference the Event Name and the Event Value, which will be used as the value name and value in InfluxDB.

Finally, you will need to add the Authorization Header exactly as below. The Authorization Header should have the value ‘Token long-token-string-from-InfluxDBCloud’ in it. This is the exact same header needed when accessing any of the InfluxDB Cloud APIs. You can then save your integration, and you’re all set.

InfluxDB Cloud Particle integration - authorize

Once you save your integration, you will see a page that tells you all the details of it:

InfluxDB Cloud Particle - save integration

And below that, it even gives you some sample on-device code that will trigger the integration:

InfluxDB Cloud Particle - trigger integration

And that’s it! So simple! Try it out and let us know what you think in our Community Slack.