DEV Community

Cover image for How to use Supabase and hotglue to offer a native integration in your product
David Molot
David Molot

Posted on

How to use Supabase and hotglue to offer a native integration in your product

One of the most common feature requests in the SaaS world is an integration with a platform that a customer already uses. For example. if you are working on an email marketing software, you most likely will be asked to integrate with Salesforce, HubSpot, Mailchimp, and so on.

Integrations are messy, and even more so, dealing with the data that comes out of those APIs can be even messier. Even with all the trouble that integrations can put you through, Supabase and hotglue can help you standup a native integration for your users in no time.

What is Supabase?

Supabase is an open source Firebase alternative. It provides all the backend services you need to build a product, whether that is a database, auth, file store, or APIs for your database.

Supabase also offers a hosted platform which makes it very simple to get started without needing to manage any infrastructure.

What is hotglue?

hotglue enables you to offer native, user-facing SaaS integrations to your customers in minutes without sacrificing control over the data.

The integrations feel native because hotglue is embeddable, cloud-based, and built on the Python ecosystem — enabling developers to support more data sources, manage data cleansing & transformation, and offer a self-serve experience to their users. With hotglue, any developer can build a data integration pipeline in minutes without months of development and maintenance.

How to start creating your native integration

The first thing you need to do is figure out what integration you want to build. In this example, I am going to create a native Salesforce integration that pulls data from Salesforce and pushes the Salesforce data to Supabase. To build this integration, I am going to need a:

  • A Supabase database to push to (Supabase has a free plan to start with)

  • A Salesforce account with an OAuth app created

  • A hotglue account (hotglue has a 14-day free trial)

Collecting credentials

First and foremost, if you want to follow along with this Salesforce specific example, you can learn how to create your own OAuth app instantly here.

Once you’ve done that, you should keep the Salesforce OAuth app credentials handy as you will need those.

Next, you’re going to want to head to one of your projects in Supabase.

Supabase home page

On this page, you should go ahead and click on the Settings tab from the left hand side of your screen.

Supabase settings page

Then within the Settings page, you are going to want to head to the Database tab under Project Settings.

Supabase settings page, connection info

On the Database page, scroll down until you find the Connection info section. Note down the credentials, including the Host, Database name, Port, User, and Password.

Supabase settings page, heading to table editor

The last thing you will need is your Database schema. To find this, go ahead and click the Table Editor tab from the left-sided navigation bar.

Supabase, table schema

Whatever you see in that top-left bar is your Schema. Make sure to note that down!

Configuring your integration in hotglue

Now it is time to switch over to hotglue and create the integration.

hotglue home page

In hotglue, go ahead and head to the Sales flow in the upper left hand side of the screen. If you just made a hotglue account, there may be an additional flow called Invoices, as well as an additional tap inside of the Sales flow for HubSpot. You can ignore those for now.

hotglue flow page, sources

Once in the flow, go ahead and click on the Salesforce card. Now you can input the OAuth credentials you put aside earlier.

hotglue flow page, source credentials

Click the Save and Continue button, which will trigger a Salesforce OAuth screen to pop-up (if nothing comes up, you may have pop-ups blocked).

hotglue, Salesforce OAuth

Log in with your Salesforce account here.

hotglue, flow configuration panel

Now that you have successfully linked Salesforce, go ahead and jump into the fieldmapping to configure what you want to pull into Supabase. You do this by click on the card again and heading to the Customize Field Map option.

hotglue, field map editor

For this example, I am going to pull in Account, Contact, and Lead information.

hotglue, field map editor with selected tables

Once you have finished configuring the field mapping, go ahead and click Save.

hotglue, flow targets page

Now you need to configure your target. In hotglue, you are going to make your target the PostgreSQL target.

hotglue, target credentials page

Now you should use the credentials you got from Supabase earlier and plug them into hotglue. Once you’ve done that, click Save & Continue.

hotglue, jobs panel to start a job

Now, you are going to run a test job so that you can see the data you have in the account you connected populate your Supabase database. Head to the Jobs page and click the New job button in the top right hand corner. Now you can name your job and choose the source you want to run the job for! If you have already run the job and are retrying the job, you should click the “Reset source state” option.

❗ If you ran a job in hotglue and saw that the export failed, check and see if you have a description in your Supabase table. Sometimes it can cause issues when syncing the data. If you do have a description, go ahead and remove it, then try again.

hotglue, jobs panel

Once the job completes, you should be able to see the data in Supabase! Let’s go check my database to see the data.

Supabase, data loaded in

As you can see, the data has been populated in Supabase!

The end user’s experience

So now that you have set up your integration, and you see it working, you can see what it could look like for users of your product.

demo application

I’ve gone ahead and created small demo web-app to show what it could look like inside of your product! On this page, there is an open widget button. When I click it, it will open the hotglue widget.

hotglue, connection widget flow page

As you can see, the Sales flow we were working in earlier is here. I am going to click into it!

hotglue, connection widget source page

Now, I can see that I can link my Salesforce account (and if you added any other sources in this flow, you would see them here as well). I’ll go ahead and click Salesforce.

hotglue, connection widget Salesforce OAuth page

Now it is time to go ahead and log in to Salesforce! Once you put in your credentials, click Log In.

hotglue, source successfully connected

Now Salesforce has been linked!

hotglue, connection widget with Run Job

(Optional) If you want your user to run the job manually, you can have them click the three dots in the top right hand corner of the Salesforce card and run a job. Otherwise, it will follow the sync schedule configured in the hotglue admin panel!

Wrapping up

As you can see, using Supabase and hotglue together makes it really easy to get your native integration set up in a matter of minutes.

If you would like to check out the fastest growing open-source database company out there, you can head to Supabase’s site here.

If you would like to check out the easiest way to offer your users native integrations inside of your product, you can check out hotglue’s site here.

Top comments (0)