> ## Documentation Index
> Fetch the complete documentation index at: https://help.nextmatter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate with Smartsheet

> You can get a cell value from Smartsheet and pull it into the workflow.

## Before you begin

1. Generate an API key in Smartsheet. You can do it in Smartsheet by going to **Account > Apps & Integrations**. For details, see [Smartsheet documentation](https://help.smartsheet.com/articles/2482389-generate-API-key).

2. In your Smartsheet sheet, get the Sheet ID, Row ID, and Column ID. This will identify the cell you want to retrieve. For details on how to get this data, see [Smartsheet documentation](https://help.smartsheet.com/articles/2482711-get-smartsheet-ids).

## Get the cell value

1. In your Next Matter workflow, create an integration step.

2. Click **Settings** and enter the following details:

   * **URL**: [`https://api.smartsheet.com/2.0/sheets/SHEET_ID/rows/ROW_ID/columns/COLUMN_ID/history`](https://api.smartsheet.com/2.0/sheets/SHEET_ID/rows/ROW_ID/columns/COLUMN_ID/history)

   * **Method**: GET

   * **Headers**: Content-Type: `application/json`

   * **Headers**: Authorization: `SMARTSHEET_API_KEY`

   * Leave **Body**empty.

   * Create the following variables:

     * `$.data[0].displayValue`

3. Save your changes.

## Create a new row in the sheet

1. In your Next Matter workflow, create an integration step.

2. Click **Settings** and enter the following details:

   * **URL**: [`https://api.smartsheet.com/2.0/sheets/SHEET_ID/rows/`](https://api.smartsheet.com/2.0/sheets/SHEET_ID/rows/)

   * **Method**: POST

   * **Headers**: Content-Type: `application/json`

   * **Headers**: Authorization: `SMARTSHEET_API_KEY`

   * **Body**: The body contains the row you want to add and the setting to place the new row on top of the sheet (`"toTop": "true"`). In case you want to place it at the bottom use (`"toBottom": "true"`).

     <CodeGroup>
       ```json JSON theme={null}
       [{
           "toTop":true, 
           "cells": [ //Copy and paste that structure one for each cell you want to fill in in the row
                {
                      "columnId": COLUMN_ID, //this identifies the cell. No need to fill in the cells in the row
                      "objectValue": "CELL_VALUE",//add a cell value here
                       "strict": false
               }]
       }]
       ```
     </CodeGroup>

3. Create the following variables. It will allow you to use the data from the response in later steps.

* `$.result[0].id`
