Tips to maximize your Smartsheet API integrations

by Taylor Krusen

Two Smartsheet developer advocates present at ENGAGE'18

Many of our customers use the Smartsheet application programming interface (API) to set up processes to organize and accelerate their workflows so their team can make a bigger impact. But what if you need to automate and scale workflows throughout your entire organization?

Once you move beyond the basics of the Smartsheet API, you can learn more advanced strategies to benefit your company at large. While the transition from building integrations for yourself to building for others can be challenging, the reward is certainly worth the effort.

Read on to learn about how you can establish a secure connection to the Smartsheet API, then automate processes and optimize your integration to scale.

1. Secure your data with OAuth Flow

The people who will use your integration need to be able to interact with their Smartsheet data in a safe and secure way. The OAuth 2.0 standard, which is an open, widely-supported authorization protocol, helps to promote secure connections with third-party applications.

Implementing a Smartsheet OAuth Flow means others can use your integration to interact with their Smartsheet data without any sensitive information (username, password, etc.) actually changing hands.

Since building your first OAuth Flow with the Smartsheet API can be a little tricky, we created this Smartsheet OAuth Flow in Node.js tutorial to help you get started.


The competing forces of access and security

2. Automate processes using webhooks    

Another important consideration is process automation, especially if your integration needs to respond to changes in your Smartsheet data. Currently, there are two options available to you:

  1. Periodically call the Smartsheet API to check for changes (use Get Sheet Version).

  2. Get notified of changes automatically through use of Smartsheet webhooks.  

We strongly recommend using webhooks, which is the more efficient option. This sample webhook implementation is a good starting point to build and test your webhook locally. At the time of writing, the scope of a webhook is limited to all events on a sheet. In other words, a webhook can only listen for changes on a single sheet and will trigger based on all saved changes to a sheet.

The payload of a webhook is deliberately thin: it tells you where something changed rather than what changed. You’ll need to make a second call to the Smartsheet API to pull the relevant sheet data into your integration.


Smartsheet selected for FedRAMP Connect Program

3. Scale your integration

If your integration will be used by others, then you must carefully consider how it will handle heavy loads. Specifically, you need to think about how your integration will interact with the Smartsheet API at a higher volume.

This can be narrowed down to three main concerns: being smart about API usage, having a system for logging, and handling errors gracefully. It’s also important for you to be deliberate and efficient about making calls to the Smartsheet API. Many endpoints can perform bulk operations, allowing you to consolidate calls.


Smartsheet Developers Portal

For example, instead of updating a single row 60 times, you can call Update Rows once on an object with 60 rows. Using bulk operations results in better performance, prevents save errors, and keeps you from hitting the rate limit.

At the time of writing, the Smartsheet API implements throttling at 300 requests per minute (this is subject to change). The best strategy for dealing with rate limit errors is to wait and retry your call.

Handling rate limits errors is one of many reasons to make use of a Smartsheet SDK (Software Development Kit) when working with the API. Each respective SDK (C#, Java, Python, Ruby, and JavaScript) contains retry logic for when a rate limit error is thrown. Another great reason to use an SDK is they each have a system for logging built into them directly.

These three tips are just the beginning. If you want to learn even more advanced tips for implementing the Smartsheet API, watch the video session from ENGAGE’18 below. We covered how to set up a webhook, deal with API rate limits, programmatically generate access tokens, and more:

Subscribe to the Smartsheet IT Newsletter for tips, strategies, and ideas focused on helping IT professionals increase their impact on their business.