Writing a Record to Smartsheet
To write a record to Smartsheet, you need the following:
Configure Smartsheet
- From the menu under your Profile, select Apps and Integrations.
- From the Personal Settings menu, select API Access.
- Click Generate new access token.
- Name your token, and click OK.
- Your Smartsheet API token appears. Note this value for future use.
Determine Your Sheet ID
To retrieve or modify the contents of your Smartsheet, you need to determine the ID of the Smartsheet:
- Open your Smartsheet.
- Select File > Properties.
- Note the Sheet ID in the Properties window. You use it in the following steps.
Update Your SmartFlow
Note: Each column in a Smartsheet is represented as an ID. These IDs are needed to make inserts or updates at higher frequencies.
- Add an External Web Call action to your flow.
- Configure the action as follows:
- HEADER VALUES:
- CONTENT-TYPE: application/json
- AUTHENTICATION: Bearer {Your API Token Value}
- METHOD: GET
- URL OF SERVICE: https://api.smartsheet.com/2.0/sheets/{Smartsheet ID}/columns
- RESPONSE VARIABLE: Add one entry for each column you want to capture:
- Name:column<#>Id (e.g., column1Id)
- Query Expression:result.[<column#>].cells.[column#].columnId (e.g. result.[0].cells.[0].columnId)
- HEADER VALUES:
- Add an additional External Web Call action to your flow.
- Connect the two actions.
- Configure the second action as follows:
- HEADER VALUES:
- AUTHENTICATION: Bearer {Your API Token Value}
- METHOD: POST
- URL OF SERVICE: https://api.smartsheet.com/2.0/sheets/{Smartsheet ID}/rows
- CONTENT-TYPE: application/json
- BODY:
- HEADER VALUES:
[{
“toBottom“:true,
“cells”: [
{“columnId”: <column1Id>, “value”: “<column 1 Value>”},
{“columnId”: <column2Id>, “value”: “<column 2 Value>”}
]
}]
- Configure the RESPONSE VARIABLES to capture any additional information required. For more information, see the Smartsheet Rows support page.
- Save and Deploy your flow. When the flow is activated, it returned the row where your value is located.