Convex

Connect to Convex 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, which Convex documents as requiring a Pro plan. Its deploy key needs deployment:data:view; confirm that your current plan includes streaming export.

Use the block

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

Actions

Convex Run Query

Run a Convex query function and return its result

Inputs and outputs

Input

ParameterTypeRequiredDescription
deploymentUrlstringYesConvex deployment URL (e.g., https://your-deployment.convex.cloud)
deployKeystringYesConvex deploy key from the dashboard Settings page
functionPathstringYesPath to the query function (e.g., messages:list or folder/file:myQuery)
argsjsonNoNamed arguments to pass to the function as a JSON object

Output

ParameterTypeDescription
valuejsonResult returned by the query function
logLinesarrayLog lines printed during the function execution

Convex Run Mutation

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

Inputs and outputs

Input

ParameterTypeRequiredDescription
deploymentUrlstringYesConvex deployment URL (e.g., https://your-deployment.convex.cloud)
deployKeystringYesConvex deploy key from the dashboard Settings page
functionPathstringYesPath to the mutation function (e.g., messages:send or folder/file:myMutation)
argsjsonNoNamed arguments to pass to the function as a JSON object

Output

ParameterTypeDescription
valuejsonResult returned by the mutation function
logLinesarrayLog lines printed during the function execution

Convex Run Action

Run a Convex action function and return its result

Inputs and outputs

Input

ParameterTypeRequiredDescription
deploymentUrlstringYesConvex deployment URL (e.g., https://your-deployment.convex.cloud)
deployKeystringYesConvex deploy key from the dashboard Settings page
functionPathstringYesPath to the action function (e.g., emails:send or folder/file:myAction)
argsjsonNoNamed arguments to pass to the function as a JSON object

Output

ParameterTypeDescription
valuejsonResult returned by the action function
logLinesarrayLog lines printed during the function execution

Convex Run Function

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

Inputs and outputs

Input

ParameterTypeRequiredDescription
deploymentUrlstringYesConvex deployment URL (e.g., https://your-deployment.convex.cloud)
deployKeystringYesConvex deploy key from the dashboard Settings page
functionPathstringYesPath to the function (e.g., messages:list or folder/file:myFunction)
argsjsonNoNamed arguments to pass to the function as a JSON object

Output

ParameterTypeDescription
valuejsonResult returned by the function
logLinesarrayLog lines printed during the function execution

Convex List Tables

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

Inputs and outputs

Input

ParameterTypeRequiredDescription
deploymentUrlstringYesConvex deployment URL (e.g., https://your-deployment.convex.cloud)
deployKeystringYesConvex deploy key from the dashboard Settings page

Output

ParameterTypeDescription
tablesarrayNames of the tables in the deployment
schemasjsonMap of table name to the JSON schema of its 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.

Inputs and outputs

Input

ParameterTypeRequiredDescription
deploymentUrlstringYesConvex deployment URL (e.g., https://your-deployment.convex.cloud)
deployKeystringYesConvex deploy key from the dashboard Settings page
tableNamestringNoTable to list documents from. Omit to list documents from all tables.
snapshotstringNoSnapshot timestamp from a previous page. Omit on the first request to start a new snapshot.
pageCursorstringNoPage cursor from a previous page of the same snapshot. Omit on the first request.

Output

ParameterTypeDescription
documentsarrayDocuments in this page of the snapshot
hasMorebooleanWhether more pages remain in the snapshot
snapshotstringSnapshot timestamp to pass back in when fetching the next page
pageCursorstringPage cursor to pass back in when fetching the next page

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.

Inputs and outputs

Input

ParameterTypeRequiredDescription
deploymentUrlstringYesConvex deployment URL (e.g., https://your-deployment.convex.cloud)
deployKeystringYesConvex deploy key from the dashboard Settings page
cursorstringYesTimestamp cursor to read deltas after. Use the snapshot value from List Documents or the cursor from a previous Document Deltas page.
tableNamestringNoTable to read deltas from. Omit to read deltas from all tables.

Output

ParameterTypeDescription
documentsarrayChanged documents, each including _table and _ts fields
hasMorebooleanWhether more delta pages remain
cursorstringCursor to pass back in when fetching the next page of deltas