Here’s how to make a dynamic POST API request to push data from Google Sheets to an external software platform.

Step 1: Install Apipheny

Apipheny is a Google Sheets add-on that makes it easy to make GET and POST API requests from Google Sheets.

You can install the add-on in Google’s G Suite Marketplace: https://gsuite.google.com/marketplace/app/apipheny/966163326746

Watch our demo video to learn how to use it:

Step 2: Make a dynamic POST request using variables in the POST Body field of the add-on.

Using variables, a cell can be referenced in the request. Then, data can be POSTed on a schedule or the function can be called.

You can reference cells on the spreadsheet in any of the add-on’s form fields (API URL, Headers, or POST Body) by wrapping them within 3 curly braces. E.g. {{{Sheet1!A1}}}

Let’s use a CRM as an example. In your CRM you could have a tab for a specific customer you update frequently.

For example, let’s assume “customer id” is in B1, customer name is in A1, and customer email is in A2)

POST xyzcrm.com/api/customers/123
POST Body:
{
name: {{{Sheet1!A1}}},
email: {{{Sheet1!A2}}}
}

If you schedule this request to fire every hour, it would pull the data from the sheet every hour and send it to the server, triggering the CRM to update based on data in the sheet.

Where this gets slightly complicated, is you’ll want to avoid the response overwriting your sheets contents. So although you’ll reference cells on Sheet1, you’ll want to push the output to Sheet2 by changing the “Sheet” field in the saved request to say “Sheet2”.

Related Posts

Leave a Comment