Exporting Data using an API

I need to export the data into an external database using an API (experimental code Fetch), anyone done this ?

This is what I want to do :

  1. concatenate all/selected columns into a single column and then use SHA256 to hash it.
    Is there an easy way to concatenate all the columns into one
  2. Create a JSON string with the key:value format. So that in the future when I add in new columns it doesn’t break.
  3. use an API to send the JSON data across to my API which will then also produce a SHA256 hash and send it back
  4. compare the hash and if they are the same then mark row for deletion

Interested in how others are exporting data. The export Glide App Data doesn’t seem to export the calculated fields which I need.

Use a template column to concatenate, and then you can get your hash using this plugin.

You can use a template column to create the JSON structure. For the API part, it depends what the API expects. If it responds to GET requests, then you can probably use the Fetch JSON plugin. Otherwise, you might need to use something like Integromat.

I made a tutorial a while back that shows how to create a CSV export. Not entirely applicable in this case, but may give you some ideas about how to use a template column to prepare your JSON.

3 Likes

Thanks Darren,

This is very helpful. Let me take a look into this a bit more. Is there way we can automate the sending of the CSV file based on time (at midnight) or does it require user action.

Rgds

Unfortunately it needs an action to trigger the webhook.

1 Like

Maybe this 2 part scenario from @Mark_Turrell could be of some use

2 Likes