Create a SmartSuite backup process with Make.com

I was able to create a backup process using Make.com - here's how it works:

  1. I have it configured to pull the information about a specific Solution by Id using a custom API call

  2. The Solution data contains a list of its Apps by Id

  3. For each App:

    1. I get the App structure

    2. I get the CSV export of the App via the API

    3. Each of the records' export data is aggregated into a single value

    4. The aggregated data is stored in a CSV file in Google Drive

Here's the scenario diagram:

Step Details:

#1 - Get Solution

This step uses the "make an authenticated API call" SmartSuite action to retrieve the structure of the target Solution. We're doing this to get the list of App id's that we need to retrieve them and their records.

#2 - Iterate the App Ids

The second step uses a make iterator module that is pointed at the application_ids[] array returned in the first step. The following actions will happen for each App id returned.

#3 - Get App (optional)

This step retrieves detail about the App so that we know things like its name. This is optional, but allows us to give things more human-friendly names. This is another authenticated API call, and we're using the index value returned by the iterator to refer to the then-current item in our App array.

#4 - Get CSV Data

This is the key step in the process - we're retrieving our record data in CSV format. Here I used an HTTP module to work around a small issue we're having with Make.com's "make an authenticated API request" (it fails if the request's body is populated - we're trying to work with them to resolve this ASAP!) Things are pretty similar in the HTTP module setup, but you have to specify all of the headers (Content-Type, Authorization and account-id).

You can tell the API to return CSV formatted data by appending /generate_csv/ to the regular records query:

You also have to give it a list of fields in the request body:

#5 - Aggregate Data

Now we'll use a make Array Aggregator module to pull all of our CSV data together. We're going to use a "custom" structure type and just aggregate the "Data" field from our CSV export step.

#6 - Save the Data

The final step in the process is to save your data. I decided to create a file in Google Drive. I named the file [App Name].csv and pass in my aggregated data array as it's Data value.

That's it, now you're able to back up Solution data on a schedule, or you could configure the system to run when it recognizes a particular condition. Enjoy!

9
7 replies