Connect with Smartsheet using Webhooks

Dina Bennett
Dina Bennett
  • Updated

Use the Smartsheet Webhook integration to automatically create and update Smartsheet records. See updates in Smartsheet in real time for new proofs, comments, decisions, and more. 

Available for administrators on: Enterprise

You can create a flow that starts when a Ziflow event occurs. If you are new to flow creation and webhooks, see Understand automation flows (Connect) and Build flows with Webhook Zibots.


Get your Smartsheet access token

To connect Ziflow with Smartsheet, you need an access token (API key) from your Smartsheet account. 

Access tokens are only available in certain Smartsheet plans. 

  1. Select your account icon on the left navigation bar and choose Apps & Integrations.

  2. In the Personal Settings form, select API Access.

  3. Select Generate new access token. 

    Smartsheet access token
     

  4. Enter a name for the token, for example Ziflow. 
    Once the access token is generated, copy it and save it somewhere safe. You cannot view it again after you close the window.

    You can also revoke existing tokens in this tab if needed.


Find your sheet ID

To set up your Webhook Zibot, you need your Smartsheet sheet ID.

  1. Open your sheet. 

  2. Select the menu (⋮) next to the sheet name and choose Sheet properties.

  3. Copy the Sheet ID.

Smartsheet-sheetID.png


Find column IDs

You also need the column ID of each column you want Ziflow to update.

  1. In your sheet, create the columns you want to fill with Ziflow data. In this example, the sheet has four columns: Proof Name, Proof Version, Status, and Public Link.
  2. Double-click a column header.
  3. Copy the Column ID.
  4. Repeat for each column. Save the column IDs to use when you set up the Webhook Zibot.
Columns in your Sheet

 

Create a new flow

  1. Select Connect in Ziflow’s main navigation and select Create Flow.

    create-flow-open.png
     
  2. Select Ziflow as your flow’s application source.
  3. Enter a name for your flow.
  4. Select the event that will start the flow. See Ziflow events for a list of all Ziflow events and details on each setting.

    choose-event-ziflow.png
     
  5. Create your flow. Follow the examples below for additional guidance.

    Create a new row in Smartsheet from a new proof
    Update Smartsheet row based on proof decision update
    Update Smartsheet row based on new proof version
    Update Smartsheet row with approval decision and date

Create a new row in Smartsheet from a new proof

This flow creates a new row in your Smartsheet sheet and updates the columns you specify when you create a proof in Ziflow.

  1. Select the New proof/version Ziflow event and configure the fields and select Next.
  2. Select Webhook Zibot.
  3. Fill out the Webhook Zibot details. This Zibot creates a row in Smartsheet and fills in the columns you specify.

    Smartsheet-create-new-row.png

    Field Description
    Request type POST
    URL

    Enter your Smartsheet URL and the Sheet ID you copied in a previous step. 

    https://api.smartsheet.com/2.0/sheets/{sheet_id}/rows
    Request body

    Enter the JSON body referencing columns that you would like to update in Smartsheet with the columns and column IDs.

    The fields (proof_name_column_id, version_column_id, status_column_id, proof_public_url_column_id) must match the column IDs in your sheet.

    Columns in Smartsheet
    [{"toTop":true,
    "cells": [
    {"columnId": {proof_name_column_id}, "value": "{$.proof.name}"},
    {"columnId": {version_column_id}, "value": "V {$.proof.version}"},
    {"columnId": {status_column_id}, "value": "In Progress"},
    {"columnId": {proof_public_url_column_id}, "value": "{$.proof.public_link}"}
    ]}]
    Headers

    Create a header:

    Key: Authorization

    Value: Bearer {your generated Smartsheet access token}

    header-info.jpg

  4. Select Next. Save your flow.

Create custom properties

  1. Create a custom property in Ziflow to hold the Smartsheet Row ID information. 
    See the example:

    Smartsheet-create-ziflow-property.png
     

Add a Zibot to store the Smartsheet row ID

  1. Add an Update proof custom property Zibot to your flow after the webhook. This Zibot gets the Smartsheet row ID from Smartsheet to store that value in the custom property you just created and use it to tell Ziflow which record to update when there are updates from the Ziflow side (new version or approval status).

    Smartsheet-update-proof-custom-property-zibot.png
     
  2. Select the group that your new property is in and the property from the lists.
  3. In Provide text, add

    #{$.zibot[0].data.result.id}#
  4. Select Next and Save and Turn on.
  5. Test your flow by creating a sample proof in Ziflow and check that the Smartsheet Row ID property shows the row ID on the Proof Details page.

    Smartsheet-test-proof-details-page.png

Update Smartsheet row based on proof decision update

This flow updates your Smartsheet sheet when a decision is updated.

  1. Select the Decision update Ziflow event, configure the fields and select Next.
  2. Select Webhook Zibot.
  3. Fill out the Webhook Zibot details. This Zibot updates the Smartsheet row status with a proof decision once it is calculated in Ziflow.

    Smartsheet-update-decision-zibot.png

To update an existing Smartsheet row, use the PUT request type and include the row ID in the request body.

Field Description
Request type PUT
URL

Enter your Smartsheet URL and the Sheet ID you copied in a previous step. 

https://api.smartsheet.com/2.0/sheets/{sheet_id}/rows
Request body

Enter the JSON body referencing columns that you would like to update in Smartsheet with data from Ziflow. This example updates Proof status from Ziflow.

Correctly reference your custom group property and property name in the JSON body. 
​
​{$.proof.custom_properties[?(@.properties[?(@.name=='Integrations')])].properties[?(@.name=='Smartsheet Row ID')].value
​

[{"id": "{$.proof.custom_properties[?(@.properties[?(@.name=='Integrations')])].properties[?(@.name=='Smartsheet Row ID')].value}",
"cells":
[
{"columnId": {status_column_id}, "value": "Approved"}

]}]
Headers

Create a header:

Key: Authorization

Value: Bearer {your generated Smartsheet access token}

Enter the generated access token copied from your profile within Smartsheet.

Smartsheet access token  entered in headers section

Select Next and Save and Turn on.

Test your flow by submitting a proof decision on a sample proof in Ziflow and then checking if the flow has passed the correct proof status in the Smartsheet row record.


Update Smartsheet row based on new proof version

This flow updates your Smartsheet sheet when a new proof version is created.

  1. Select the New proof/version Ziflow event, configure it to trigger for a new version and select Next.
  2. Select Webhook Zibot.
  3. Fill out the Webhook Zibot details. This Zibot updates the proof version and public link in the Smartsheet row.

    Smartsheet-update-proofversion-zibot.png

To update an existing Smartsheet row, use the PUT request type and include the row ID in the request body.

Field Description
Request type PUT
URL

Enter your Smartsheet URL and the Sheet ID you copied in a previous step. 

https://api.smartsheet.com/2.0/sheets/{sheet_id}/rows
Request body

Enter the JSON body referencing columns that you would like to update in Smartsheet with data from Ziflow. This example updates Proof version and public proof link from Ziflow.

Correctly reference your custom group property and property name in the JSON body. 
​
​{$.proof.custom_properties[?(@.properties[?(@.name=='Integrations')])].properties[?(@.name=='Smartsheet Row ID')].value
​

[{"id": "{$.proof.custom_properties[?(@.properties[?(@.name=='Integrations')])].properties[?(@.name=='Smartsheet Row ID')].value}",
"cells":
[
{"columnId": {version_column_id}, "value": "V {$.proof.version}"},
{"columnId": {proof_public_url_column_id}, "value": "{$.proof.public_link}"}
]}]
Headers

Create a header:

Key: Authorization

Value: Bearer {your generated Smartsheet access token}

Enter the generated access token copied from your profile within Smartsheet.

Smartsheet access token entered in headers section

Select Next and Save and Turn on.

Test your flow by creating a new proof version on a sample proof in Ziflow and then checking if the flow has updated the version and link in the Smartsheet row.

Update Smartsheet row with approval decision and date

This flow updates your Smartsheet sheet when a decision is made and updates the approval time (you must have the columns set up and the column IDs).

  1. Select the Decision update Ziflow event, configure the fields and select Next.
  2. Select Webhook Zibot.
  3. Fill out the Webhook Zibot details. This Zibot updates the Smartsheet row status with a proof decision once it is calculated in Ziflow.

    Smartsheet-update-decision-date-zibot.png

To update an existing Smartsheet row, use the PUT request type and include the row ID in the request body.

Field Description
Request type PUT
URL

Enter your Smartsheet URL and the Sheet ID you copied in a previous step. 

https://api.smartsheet.com/2.0/sheets/{sheet_id}/rows
Request body

Enter the JSON body referencing columns that you would like to update in Smartsheet with data from Ziflow. This example updates Proof status and the Approval date from Ziflow.

Correctly reference your custom group property and property name in the JSON body. 
​
​{$.proof.custom_properties[?(@.properties[?(@.name=='Integrations')])].properties[?(@.name=='Smartsheet Row ID')].value
​

[{"id": "{$.proof.custom_properties[?(@.properties[?(@.name=='Integrations')])].properties[?(@.name=='Smartsheet Row ID')].value}", 
"cells": 
[
{"columnId": {status_column_id}, "value": "Approved"},
{"columnId": {approval_time_id}, "value": "#{$fromMillis($.trigger.proofSerializedModel.calculatedProofStatusDate)}#"}
]}]
Headers

Create a header:

Key: Authorization

Value: Bearer {your generated Smartsheet access token}

Enter the generated access token copied from your profile within Smartsheet.

Smartsheet access token  entered in headers section

Select Next and Save and Turn on.

Test your flow by submitting a proof decision on a sample proof in Ziflow and then checking if the flow has passed the correct proof status in the Smartsheet row record.

 

Related articles

Related to

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.