How can I connect Mongodb atlas to google spreadsheets?

I am working on a project which needs integrating Mongodb to Google Spreadsheets, writing an SQL query, and showing the data received from the query to a HTML5 website.
I am new to this database and didn’t do anything but create a project and a Google Cloud cluster.

Regards,

Abhinav :wink:

Hi @programer151,

You can potentially use the Atlas BI connector enabled on your platform and have an ODBC driver connection to your Atlas cluster from Google sheets similar to the Microsoft excel tutorial:
https://docs.mongodb.com/bi-connector/master/connect/excel

Alternatively you can setup a realm app with webhook to expose data to Google sheets

Stitch is the old name for MongoDB Realm.

Best
Pavel

2 Likes

@Pavel_Duchovny Thanks! now I know how to connect Google Spreadsheets, where should I write the Sql query for the sheet? Also I don’t know google apps script :sweat:

Hi @programer151,

The specific place to write code or sql queries depanding on your ODBC connector.

Usually the data source defined should allow you to define queries on top of it.

There us also a zapier connector available, however I never used it.

Best
Pavel

Hi @programer151,

What framework are you using for this project to host your website so far? There’s some sample code here available in different languages that shows you how you can access google sheets data. If you are starting from scratch on this you don’t necessarily have to use the BI connector - you might be able to just use the native MongoDB Query Language.

Let us know how you get on :slight_smile:

1 Like

@Naomi_Pentrel This is how I created my website :
I first created a html and css website, then I watched a video which told me how to present the spreadsheets data into my website ,after that I used netlify to host my website,then I needed to make a search function to present only one specific row when the query input was typed in
to do that I needed to connect mongodb to google spreadsheet and write SQL code to make this project work.

can I use Zapier to connect to google sheet and still write SQL code?
like @Pavel_Duchovny said

@programer151 can you link to that video? I’m still wondering what you’re using to access the data - is that javascript? The reason I’m asking that is because, if you don’t have to or specifically want to use SQL, it would be easier to access the data in MongoDB using the native MongoDB Query Language (MQL) than to add the BI connector.

What are you planning to do on the website itself? Maybe that’ll help us suggest the right tools :slight_smile:

As for zapier - here are the integrations available: https://zapier.com/apps/google-sheets/integrations/mongodb. I don’t believe it allows you to query data in SQL format.

2 Likes