# Convex (/integrations/convex)





{/* MANUAL-CONTENT-START:intro */}

Connect to [Convex](https://www.convex.dev/) with a deployment URL and deploy key from that deployment's settings. Grant the key the function and data access required by your operations.

Use **Run Query**, **Run Mutation**, or **Run Action** to call a function with JSON arguments; **Run Function** lets Convex resolve its type. **List Tables** returns document schemas. **List Documents** pages a consistent snapshot, and **Document Deltas** retrieves subsequent changes, including deletions, for incremental synchronization.

Function calls are available across plans. List Tables, List Documents, and Document Deltas use [streaming export](https://docs.convex.dev/production/integrations/streaming-import-export), which Convex documents as requiring a Pro plan. Its deploy key needs `deployment:data:view`; confirm that your current plan includes streaming export.

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

Run query, mutation, and action functions on your deployment, list tables with their schemas, and export documents with snapshot pagination and change deltas.

## Actions [#actions]

### Convex Run Query [#convex-run-query]

Run a Convex query function and return its result

<ReferenceDetails>
  #### Input [#input]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `deploymentUrl` | string | Yes | Convex deployment URL (e.g., [https://your-deployment.convex.cloud](https://your-deployment.convex.cloud)) |
  | `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |
  | `functionPath` | string | Yes | Path to the query function (e.g., messages:list or folder/file:myQuery) |
  | `args` | json | No | Named arguments to pass to the function as a JSON object |

  #### Output [#output]

  | Parameter | Type | Description |
  | - | - | - |
  | `value` | json | Result returned by the query function |
  | `logLines` | array | Log lines printed during the function execution |
</ReferenceDetails>

### Convex Run Mutation [#convex-run-mutation]

Run a Convex mutation function to write data and return its result

<ReferenceDetails>
  #### Input [#input-1]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `deploymentUrl` | string | Yes | Convex deployment URL (e.g., [https://your-deployment.convex.cloud](https://your-deployment.convex.cloud)) |
  | `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |
  | `functionPath` | string | Yes | Path to the mutation function (e.g., messages:send or folder/file:myMutation) |
  | `args` | json | No | Named arguments to pass to the function as a JSON object |

  #### Output [#output-1]

  | Parameter | Type | Description |
  | - | - | - |
  | `value` | json | Result returned by the mutation function |
  | `logLines` | array | Log lines printed during the function execution |
</ReferenceDetails>

### Convex Run Action [#convex-run-action]

Run a Convex action function and return its result

<ReferenceDetails>
  #### Input [#input-2]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `deploymentUrl` | string | Yes | Convex deployment URL (e.g., [https://your-deployment.convex.cloud](https://your-deployment.convex.cloud)) |
  | `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |
  | `functionPath` | string | Yes | Path to the action function (e.g., emails:send or folder/file:myAction) |
  | `args` | json | No | Named arguments to pass to the function as a JSON object |

  #### Output [#output-2]

  | Parameter | Type | Description |
  | - | - | - |
  | `value` | json | Result returned by the action function |
  | `logLines` | array | Log lines printed during the function execution |
</ReferenceDetails>

### Convex Run Function [#convex-run-function]

Run any Convex function (query, mutation, or action) by path without specifying its type

<ReferenceDetails>
  #### Input [#input-3]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `deploymentUrl` | string | Yes | Convex deployment URL (e.g., [https://your-deployment.convex.cloud](https://your-deployment.convex.cloud)) |
  | `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |
  | `functionPath` | string | Yes | Path to the function (e.g., messages:list or folder/file:myFunction) |
  | `args` | json | No | Named arguments to pass to the function as a JSON object |

  #### Output [#output-3]

  | Parameter | Type | Description |
  | - | - | - |
  | `value` | json | Result returned by the function |
  | `logLines` | array | Log lines printed during the function execution |
</ReferenceDetails>

### Convex List Tables [#convex-list-tables]

List all tables in a Convex deployment along with their JSON schemas. Requires streaming export, available on Convex paid plans.

<ReferenceDetails>
  #### Input [#input-4]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `deploymentUrl` | string | Yes | Convex deployment URL (e.g., [https://your-deployment.convex.cloud](https://your-deployment.convex.cloud)) |
  | `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |

  #### Output [#output-4]

  | Parameter | Type | Description |
  | - | - | - |
  | `tables` | array | Names of the tables in the deployment |
  | `schemas` | json | Map of table name to the JSON schema of its documents |
</ReferenceDetails>

### Convex List Documents [#convex-list-documents]

List documents from a Convex table via a paginated snapshot. Pass the returned snapshot and page cursor back in to fetch the next page. Requires streaming export, available on Convex paid plans.

<ReferenceDetails>
  #### Input [#input-5]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `deploymentUrl` | string | Yes | Convex deployment URL (e.g., [https://your-deployment.convex.cloud](https://your-deployment.convex.cloud)) |
  | `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |
  | `tableName` | string | No | Table to list documents from. Omit to list documents from all tables. |
  | `snapshot` | string | No | Snapshot timestamp from a previous page. Omit on the first request to start a new snapshot. |
  | `pageCursor` | string | No | Page cursor from a previous page of the same snapshot. Omit on the first request. |

  #### Output [#output-5]

  | Parameter | Type | Description |
  | - | - | - |
  | `documents` | array | Documents in this page of the snapshot |
  | `hasMore` | boolean | Whether more pages remain in the snapshot |
  | `snapshot` | string | Snapshot timestamp to pass back in when fetching the next page |
  | `pageCursor` | string | Page cursor to pass back in when fetching the next page |
</ReferenceDetails>

### Convex Document Deltas [#convex-document-deltas]

List documents that changed after a snapshot or previous delta cursor. Deleted documents are returned with a \_deleted flag. Requires streaming export, available on Convex paid plans.

<ReferenceDetails>
  #### Input [#input-6]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `deploymentUrl` | string | Yes | Convex deployment URL (e.g., [https://your-deployment.convex.cloud](https://your-deployment.convex.cloud)) |
  | `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |
  | `cursor` | string | Yes | Timestamp cursor to read deltas after. Use the snapshot value from List Documents or the cursor from a previous Document Deltas page. |
  | `tableName` | string | No | Table to read deltas from. Omit to read deltas from all tables. |

  #### Output [#output-6]

  | Parameter | Type | Description |
  | - | - | - |
  | `documents` | array | Changed documents, each including \_table and \_ts fields |
  | `hasMore` | boolean | Whether more delta pages remain |
  | `cursor` | string | Cursor to pass back in when fetching the next page of deltas |
</ReferenceDetails>
