Skip to main content

Publish an automation's result to an API endpoint

Publish a connection's result to a private URL that another system can read on demand.

Written by Jonatan Gomes

Use API endpoint as your automation's destination to give another system a private URL it can read on demand. The other system makes a GET request and receives the result of the connection's most recent run.

Sheetgo never pushes or sends the result to the other system. Consumers fetch a cached result, which refreshes only when the connection runs. API endpoint is in beta.

Set up the API endpoint destination

  1. In the Sheetgo automation builder, choose API endpoint under APPS & SERVICES. The destination panel has the heading "API", the subtitle "API endpoint", and a BETA badge.

  2. Under ENDPOINT URL, select Copy to copy the connection's URL. Each connection has its own endpoint, in this format: https://api.sheetgo.com/rest/beta/api-destination/<id>

  3. Under AUTHORIZATION, check the authorization header. The panel partly hides the Sheetgo API key, which begins with sg_. Use Manage keys to create or replace the key.

  4. Run the connection to publish its result. Check STATUS for the run state. For example, "Never run" means the connection has not run yet.

Read the result from another system

Configure the consuming system to make a GET request to the endpoint URL with this header:

Authorization: Bearer sg_<your-key>

Replace sg_<your-key> with your Sheetgo API key. For example:

curl -H "Authorization: Bearer sg_<your-key>" https://api.sheetgo.com/rest/beta/api-destination/<id>

Use your connection's endpoint URL in place of the example URL. You can also expand EXAMPLE REQUEST in the destination panel and use its Copy button to copy the example request.

The request reads the cached result of the most recent run. It does not refresh the data or run the connection. To publish updated data, run the connection again.

Protect access to your data

The Sheetgo API key is a user-level key, not a connection-specific key. Anyone with both the endpoint URL and a valid key can read the data.

Keep the key private, and share access only with systems and people you intend to let read the result. Use Manage keys when you need to replace the key.

Did this answer your question?