Send data using API

Hi,
I would like to develop an application to send data using API to a MS SQL Server. The data source is from pre-defined google sheet / Excel spreadsheet.

The only issue I can’t understand is how to post data from the App to external Db (currently in MS SQL Server / AMAZON) using JSON format (I have the dB API).

Do I need Zapier (or other tool) to do that or does the standard API features allows me to create this JSON-style post.

If I recall correctly, the Glide Basic API allows to add, update, and delete data within Glide tables directly and not to external Db.

So, is it possible?

I will be grateful if you can send a link to a tutorial/documentation dealing with this issue since this is one of the critical features I need.

You would need to use Glide computed columns to construct a JSON payload, and then send that via a webhook to an external service such as Make/Zapier, which could then forward it to your MS SQL Server API.

Note however that webhooks in Glide must be user-initiated. That is, it would require an action (button press or similar) from a user to trigger the webhook.

If it needs to be done on a schedule, then you would need to fetch the data via the Glide API (you’d need a Business or Enterprise licence to get access to the Get All Rows endpoint), and then construct your JSON payload outside of Glide - again using something like Make/Zapier.

Thanks for the quick reply :slight_smile:
No problem with user-initiation…
As for the “construct a JSON payload”, I’m not familiar with that.
Is there any tutorial/documantation/example on how to do that?

No, but there is now :wink:

.

9 Likes

Well Darren,
YOU ARE THE BEST !!
Thanks

Community star :star: :star:

4 Likes

A short one if I may:
Does Glide itself sends the webhook (button press is great for me) or do I need Make/Zapier to send it?

If you have a webhook action, when a user press the button, it will send the payload you choose to whatever URL you specify in the webhook action.

1 Like

Hi Community

We are using the get Row API and found that the return values are a mixture of ID and Column name.

How can we make sure the that get values are column names ?

They are the Glide internal column names, and are guaranteed not to change. You should use them in your API calls.

For example, if you rename a column in Glide, the internal column name will not change, and so your API integrations will not break.

2 Likes

Thanks for your prompt reply!

Weird that some are with the name intact but some are in raw internal column name

Yeah. I’m not exactly sure how that works.

1 Like

Yes indeed shout out to @Darren_Murphy one of the pillars

1 Like

@Darren_Murphy - I can see that this is an old post, but I wanted to see how you construct a JSON Payload, for whatever reasons it seems like a gif to me, unable to click on anything.

I’m guessing you use a Joined List type and join all the individual json objects into one. I’m wondering where you’ll store this single payload as it doesn’t make sense to store in the original table that has the independent json values as multiple rows. :face_with_peeking_eye:

It depends on the use case. I often use a single row helper table.

There are better ways to construct JSON now. Check out the JSON Object and JSON Template columns.

I added a column of type JSON Object in my table that has the required information and constructed it. Now seeing how to combine all these JSON objects into 1 JSON Payload and then pass it to a Zap.

If you want all rows, use a lookup.
If you need a subset, use a lookup through a relation or query.
Then pass the lookup into another JSON Object column (or a JSON Template, depending on the structure required).

Awesome. I was thinking of making use of Fetch rows options available in Glide Tables API to fetch a subset. This alternative seems a lot simpler. Let me give it a try. You are a :star:

Are there any links that explains the difference between JSON Object and a JSON Template? I did a decent search but don’t seem to come across any. Is JSON Template something where I can keep adding JSON objects?