Export Data to Third-Party Application

Hello!

Is there a limit to how data from a Losant application can be exported into a third-party application? We are working with a customer that has many different vendors with their own visualizations and would like to have it all in one place. What is the best way to get the data out from Losant into the third-party application?

Thank you,
Kyle Wisbrock

Are you looking to feed the data to the third-party application in real time? If so, it will depend on what the third-party application is and how it ingests data but you have some options …

If you want to feed the data in bulk on an interval, I suggest using the Device: Data Export API endpoint. That can email you a CSV, which you can then import into the third-party application. Or, the endpoint also supports a callback URL, so if your third-party supports webhooks, you could provide their URL and feed the export file automatically.

Out of curiosity, would you mind sharing what the third-party application is and what visualizations it supports that are missing from Losant? We’re always looking for ways to improve our platform and this data could help us shape our roadmap to meet our users’ needs.

Hello @Dylan_Schuster, Correct, this would be feeding the data in real-time. I am asking our customer to confirm the other application vendor they are utilizing for this pilot so that we can confirm their capabilities with the options you provided.

From my understanding, the use of the third-party is not so much due to a lack of functionality from Losant, but rather working with different hardware manufacturers and the applications they are currently utilizing, in my case Losant, in order to perform some test and learn evaluations. In that sense, some of the data from many different hardware vendors is being Frankenstein’d together just for proof of concept purposes. I would imagine any final solution would have a single application.

Please advise if you have any other questions.

Thank you,
Kyle Wisbrock

Hello @Dylan_Schuster

I had some time to review the information you provided and discussed options with our customer. They wanted to know more about the CSV export option. By using the Device: Data Export API, would we be able to automatically send out emails with the CSV information at regular intervals to select emails? What would that process look like? Or would the CSV generation take place within the dashboard and essentially be a push button that would send out the email?

Any feedback you have on this would be great!

Thank you,
Kyle

@Kyle_Wisbrock,

You could automate this using a workflow; it would look something like this …

  • Timer Trigger configured to fire on a schedule you define.
  • Connects to a Losant API Node that calls the Data: Export action. I originally suggested the Device: Export endpoint, but that would only allow for exporting data for one device at a time. It sounds like you’ll want multiple devices at once.

The Data: Export endpoint allows for sending the result to a single email address; if you want to send to multiple, you could also accomplish that within a Losant workflow …

  • Set up a webhook in the application.
  • Pass a callbackUrl property in the first workflow’s Data: Export configuration, and use the URL of the webhook you created.
  • Create a separate workflow …
    • Webhook Trigger that fires from your created webhook.
    • Connects to a SendGrid Node that sends the export’s URL (received in the webhook POST body) to the email addresses of your choosing. This would require setting up a SendGrid account. You could use the Email Node when building out the proof of concept but I don’t recommend using that in your final build.

We have a Library Template that is close to this, but instead it sends the data to an AWS S3 bucket. You could follow my instructions above or instead import that template and modify it for your use case if that’s easier.

@Dylan_Schuster I have been doing some tests with the Email Node in a workflow, which I have some questions about, but I will follow up in a different thread since that is now a different topic.