# Glide

> Read and write the Big Tables behind your Glide apps: list and create tables, get, add, update and delete rows, bulk-load rows through a stash, and start a workflow when a row is added.

App · 12 actions. Web page: https://docs.lodol.com/docs/integrations/glide

## Actions

### Add row

Add a row to a Big Table, with a value for each column you fill in.

**Inputs**

- Table (`table_id`, text, required): The Big Table. Pick one, or give its id from an earlier step.
- Values (`values`, object): A value for each column of the table. Leave a field empty to leave it out. Columns are read from the table's rows, so a new table's columns go in Other columns.
- Other columns (`other_values`, object): Values for columns not listed in Values, by column ID (as 'Get rows' shows it, such as fullName).
- If data doesn't fit the columns (`on_schema_error`, text): What Glide does with a column that doesn't exist or a value of the wrong type. Defaults to stopping and changing nothing. One of: `abort` (Stop and change nothing (default)), `dropColumns` (Leave out the values that don't fit), `updateSchema` (Add missing columns and widen types). Default: `abort`.

**Outputs**

- `row` (object): The values sent, by column ID
- `row_id` (text): The new row's id
- `table_id` (text): The table's id

**Example output**

```json
{
  "row": {
    "fullName": "Alex Bard",
    "invoiceDate": "2024-07-29T14:04:15.561Z",
    "paid": false,
    "totalAmount": 34.5
  },
  "row_id": "zcJWnyI8Tbam21V34K8MNA",
  "table_id": "2a1bad8b-cf7c-44437-b8c1-e3782df6"
}
```

### Add rows

Add many rows to a Big Table at once, from a list or a stash. If one row doesn't fit the columns, none are added unless you choose otherwise.

**Inputs**

- Table (`table_id`, text, required): The Big Table. Pick one, or give its id from an earlier step.
- Rows (`rows`, list): A list of rows from an earlier step, each with column IDs and values, such as [{"fullName": "Alex Bard", "age": 30}]. Up to 1,000; stash more.
- Stash ID (`stash_id`, text): Use every row put in this stash with 'Stash rows' instead of Rows, in one go.
- If data doesn't fit the columns (`on_schema_error`, text): What Glide does with a column that doesn't exist or a value of the wrong type. Defaults to stopping and changing nothing. One of: `abort` (Stop and change nothing (default)), `dropColumns` (Leave out the values that don't fit), `updateSchema` (Add missing columns and widen types). Default: `abort`.

**Outputs**

- `row_count` (number): How many rows were added
- `row_ids` (list): The added rows' ids, in the order the rows were given
- `table_id` (text): The table's id

**Example output**

```json
{
  "row_count": 2,
  "row_ids": [
    "zcJWnyI8Tbam21V34K8MNA",
    "93a19cf7c44437b8c1e9acb"
  ],
  "table_id": "2a1bad8b-cf7c-44437-b8c1-e3782df6"
}
```

### Create table

Create a Big Table with the columns given, and optionally its first rows (or a stash of them). Without columns, Glide works them out from the rows.

**Inputs**

- Name (`name`, text, required): The table's name, as Glide's Data Editor shows it.
- Columns (`columns`, list): The table's columns in order, each with an ID (fixed once made, such as fullName), a name people see, and a type: Text (`string`), Number (`number`), True/false (`boolean`), Date and time (`dateTime`), Date (`date`), Time (`time`), Duration (`duration`), Link (URL) (`uri`), Image link (`imageURI`), Audio link (`audioURI`), Email address (`emailAddress`), Phone number (`phoneNumber`), Markdown (`markdown`), Emoji (`emoji`).
- Rows (`rows`, list): A list of rows from an earlier step, each with column IDs and values, such as [{"fullName": "Alex Bard", "age": 30}]. Up to 1,000; stash more.
- Stash ID (`stash_id`, text): Use every row put in this stash with 'Stash rows' instead of Rows, in one go.
- Link to apps (`apps_to_link`, text): App IDs to make the table available in (the part after /app/ in the app's builder link), separated by commas.
- If data doesn't fit the columns (`on_schema_error`, text): What Glide does with a column that doesn't exist or a value of the wrong type. Defaults to stopping and changing nothing. One of: `abort` (Stop and change nothing (default)), `dropColumns` (Leave out the values that don't fit), `updateSchema` (Add missing columns and widen types). Default: `abort`.

**Outputs**

- `linked_app_ids` (list): The apps the table was linked to
- `name` (text): The table's name
- `row_count` (number): How many rows were added
- `row_ids` (list): The added rows' ids, in the order the rows were given
- `table_id` (text): The table's id

**Example output**

```json
{
  "linked_app_ids": [],
  "name": "Invoices",
  "row_count": 1,
  "row_ids": [
    "zcJWnyI8Tbam21V34K8MNA"
  ],
  "table_id": "2a1bad8b-cf7c-44437-b8c1-e3782df6"
}
```

### Delete row

Delete one row of a Big Table. This can't be undone.

**Inputs**

- Table (`table_id`, text, required): The Big Table. Pick one, or give its id from an earlier step.
- Row ID (`row_id`, text, required): The row's id, from 'Get rows', 'Add row' or the 'New row' trigger.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `row_id` (text): The row's id
- `table_id` (text): The table's id

**Example output**

```json
{
  "deleted": true,
  "row_id": "zcJWnyI8Tbam21V34K8MNA",
  "table_id": "2a1bad8b-cf7c-44437-b8c1-e3782df6"
}
```

### Delete stash

Throw away a stash and every chunk in it, without writing its rows.

**Inputs**

- Stash ID (`stash_id`, text, required): The stash to delete, as given to 'Stash rows'.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `stash_id` (text): The stash deleted

**Example output**

```json
{
  "deleted": true,
  "stash_id": "20240215-job32"
}
```

### Get row

Get one row of a Big Table by its row id, with its values by column ID.

**Inputs**

- Table (`table_id`, text, required): The Big Table. Pick one, or give its id from an earlier step.
- Row ID (`row_id`, text, required): The row's id, from 'Get rows', 'Add row' or the 'New row' trigger.

**Outputs**

- `row` (object): The row's values, by column ID
- `row_id` (text): The row's id
- `table_id` (text): The table's id

**Example output**

```json
{
  "row": {
    "fullName": "Alex Bard",
    "invoiceDate": "2024-07-29T14:04:15.561Z",
    "paid": false,
    "totalAmount": 34.5
  },
  "row_id": "zcJWnyI8Tbam21V34K8MNA",
  "table_id": "2a1bad8b-cf7c-44437-b8c1-e3782df6"
}
```

### Get rows

Get a page of a Big Table's rows, each with its row id and values by column ID. To see more, run it again with the continuation it gives.

**Inputs**

- Table (`table_id`, text, required): The Big Table. Pick one, or give its id from an earlier step.
- Most rows (`limit`, number): The most rows to get, 1 to 10,000. Glide may return fewer. Leave empty for Glide's default. From 1 to 10000.
- Continuation (`continuation`, text): The continuation from an earlier page, for the next.

**Outputs**

- `continuation` (text): Give this for the next page; empty on the last
- `count` (number): How many rows on this page
- `has_more` (true/false): Whether more rows remain
- `rows` (list): The rows: row_id, then a value by column ID
- `table_id` (text): The table's id

**Example output**

```json
{
  "continuation": "",
  "count": 2,
  "has_more": false,
  "rows": [
    {
      "fullName": "Alex Bard",
      "invoiceDate": "2024-07-29T14:04:15.561Z",
      "paid": false,
      "row_id": "zcJWnyI8Tbam21V34K8MNA",
      "totalAmount": 34.5
    },
    {
      "fullName": "Alicia Hines",
      "invoiceDate": "2023-06-15T10:30:00.000Z",
      "paid": true,
      "row_id": "93a19cf7c44437b8c1e9acb",
      "totalAmount": 50.75
    }
  ],
  "table_id": "2a1bad8b-cf7c-44437-b8c1-e3782df6"
}
```

### Get table version

Get a Big Table's version, a number that goes up whenever its data changes. Give it to 'Update row' or 'Overwrite table' so they change nothing if someone else changed the table first.

**Inputs**

- Table (`table_id`, text, required): The Big Table. Pick one, or give its id from an earlier step.

**Outputs**

- `table_id` (text): The table's id
- `version` (text): The table's version

**Example output**

```json
{
  "table_id": "2a1bad8b-cf7c-44437-b8c1-e3782df6",
  "version": "1042"
}
```

### List tables

List every Big Table in the team the API token belongs to, with its id.

**Inputs**: None.

**Outputs**

- `count` (number): How many tables
- `tables` (list): The team's Big Tables

**Example output**

```json
{
  "count": 2,
  "tables": [
    {
      "id": "2a1bad8b-cf7c-44437-b8c1-e3782df6",
      "name": "Invoices"
    },
    {
      "id": "93a19-cf7c-44437-b8c1-e9acbbb",
      "name": "Customers"
    }
  ]
}
```

### Overwrite table

Delete every row of a Big Table and add the rows given instead (or none, to empty it), optionally with new columns. User-specific columns are cleared too. This can't be undone.

**Inputs**

- Table (`table_id`, text, required): The Big Table. Pick one, or give its id from an earlier step.
- New rows (`rows`, list): The rows the table holds afterwards, each with column IDs and values. Leave empty to delete every row.
- Stash ID (`stash_id`, text): Use every row put in this stash with 'Stash rows' instead of Rows, in one go.
- New columns (`columns`, list): Replace the table's columns. Leave empty to keep them. Each has an ID, a name and a type: Text (`string`), Number (`number`), True/false (`boolean`), Date and time (`dateTime`), Date (`date`), Time (`time`), Duration (`duration`), Link (URL) (`uri`), Image link (`imageURI`), Audio link (`audioURI`), Email address (`emailAddress`), Phone number (`phoneNumber`), Markdown (`markdown`), Emoji (`emoji`).
- Only if the table is still at version (`expected_version`, text): The version from 'Get table version'. If the data changed since, Glide changes nothing. Leave empty to write regardless.
- If data doesn't fit the columns (`on_schema_error`, text): What Glide does with a column that doesn't exist or a value of the wrong type. Defaults to stopping and changing nothing. One of: `abort` (Stop and change nothing (default)), `dropColumns` (Leave out the values that don't fit), `updateSchema` (Add missing columns and widen types). Default: `abort`.

**Outputs**

- `row_count` (number): How many rows were added
- `row_ids` (list): The added rows' ids, in the order the rows were given
- `table_id` (text): The table's id

**Example output**

```json
{
  "row_count": 2,
  "row_ids": [
    "zcJWnyI8Tbam21V34K8MNA",
    "93a19cf7c44437b8c1e9acb"
  ],
  "table_id": "2a1bad8b-cf7c-44437-b8c1-e3782df6"
}
```

### Stash rows

Put a chunk of rows in a stash, Glide's holding area for large writes. Stash chunks one after another, then give the stash ID to 'Add rows', 'Create table' or 'Overwrite table' to write them all at once.

**Inputs**

- Stash ID (`stash_id`, text, required): A name you choose for the stash: letters, digits, '-' and '_', such as 20240215-job32. It is made on first use.
- Chunk number (`serial`, text, required): This chunk's place in the stash, such as 1, 2, 3. Chunks are written in this order; the same number replaces a chunk.
- Rows (`rows`, list, required): The chunk's rows, each with column IDs and values, up to 1,000.

**Outputs**

- `row_count` (number): How many rows were stashed
- `serial` (text): The chunk number
- `stash_id` (text): The stash

**Example output**

```json
{
  "row_count": 2,
  "serial": "1",
  "stash_id": "20240215-job32"
}
```

### Update row

Change the columns you fill in on one row of a Big Table; the others keep their values.

**Inputs**

- Table (`table_id`, text, required): The Big Table. Pick one, or give its id from an earlier step.
- Row ID (`row_id`, text, required): The row's id, from 'Get rows', 'Add row' or the 'New row' trigger.
- Values (`values`, object): A value for each column of the table. Leave a field empty to leave it out. Columns are read from the table's rows, so a new table's columns go in Other columns.
- Other columns (`other_values`, object): Values for columns not listed in Values, by column ID (as 'Get rows' shows it, such as fullName).
- Only if the table is still at version (`expected_version`, text): The version from 'Get table version'. If the data changed since, Glide changes nothing. Leave empty to write regardless.
- If data doesn't fit the columns (`on_schema_error`, text): What Glide does with a column that doesn't exist or a value of the wrong type. Defaults to stopping and changing nothing. One of: `abort` (Stop and change nothing (default)), `dropColumns` (Leave out the values that don't fit), `updateSchema` (Add missing columns and widen types). Default: `abort`.

**Outputs**

- `changes` (object): The values sent, by column ID
- `row_id` (text): The row's id
- `table_id` (text): The table's id
- `updated` (true/false): Always true once updated

**Example output**

```json
{
  "changes": {
    "paid": true
  },
  "row_id": "zcJWnyI8Tbam21V34K8MNA",
  "table_id": "2a1bad8b-cf7c-44437-b8c1-e3782df6",
  "updated": true
}
```
