Skip to content

Commit df365cc

Browse files
committed
feat(integrations): add Convex integration with function execution and data export tools
1 parent f4d22ff commit df365cc

20 files changed

Lines changed: 1290 additions & 0 deletions

File tree

apps/docs/components/icons.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,6 +2038,32 @@ export function ConfluenceIcon(props: SVGProps<SVGSVGElement>) {
20382038
)
20392039
}
20402040

2041+
export function ConvexIcon(props: SVGProps<SVGSVGElement>) {
2042+
return (
2043+
<svg
2044+
{...props}
2045+
width='24'
2046+
height='24'
2047+
viewBox='31 31.5 122 125'
2048+
fill='none'
2049+
xmlns='http://www.w3.org/2000/svg'
2050+
>
2051+
<path
2052+
d='M108.092 130.021C126.258 128.003 143.385 118.323 152.815 102.167C148.349 142.128 104.653 167.385 68.9858 151.878C65.6992 150.453 62.8702 148.082 60.9288 145.034C52.9134 132.448 50.2786 116.433 54.0644 101.899C64.881 120.567 86.8748 132.01 108.092 130.021Z'
2053+
fill='#F3B01C'
2054+
/>
2055+
<path
2056+
d='M53.4012 90.1735C46.0375 107.191 45.7186 127.114 54.7463 143.51C22.9759 119.608 23.3226 68.4578 54.358 44.7949C57.2286 42.6078 60.64 41.3097 64.2178 41.1121C78.9312 40.336 93.8804 46.0225 104.364 56.6193C83.0637 56.831 62.318 70.4756 53.4012 90.1735Z'
2057+
fill='#8D2676'
2058+
/>
2059+
<path
2060+
d='M114.637 61.8552C103.89 46.8701 87.0686 36.6684 68.6387 36.358C104.264 20.1876 148.085 46.4045 152.856 85.1654C153.3 88.7635 152.717 92.4322 151.122 95.6775C144.466 109.195 132.124 119.679 117.702 123.559C128.269 103.96 126.965 80.0151 114.637 61.8552Z'
2061+
fill='#EE342F'
2062+
/>
2063+
</svg>
2064+
)
2065+
}
2066+
20412067
export function TwilioIcon(props: SVGProps<SVGSVGElement>) {
20422068
return (
20432069
<svg {...props} xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 272 272'>

apps/docs/components/ui/icon-mapping.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import {
3737
CloudWatchIcon,
3838
CodePipelineIcon,
3939
ConfluenceIcon,
40+
ConvexIcon,
4041
CrowdStrikeIcon,
4142
CursorIcon,
4243
DagsterIcon,
@@ -253,6 +254,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
253254
codepipeline: CodePipelineIcon,
254255
confluence: ConfluenceIcon,
255256
confluence_v2: ConfluenceIcon,
257+
convex: ConvexIcon,
256258
crowdstrike: CrowdStrikeIcon,
257259
cursor: CursorIcon,
258260
cursor_v2: CursorIcon,
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
---
2+
title: Convex
3+
description: Use Convex database
4+
---
5+
6+
import { BlockInfoCard } from "@/components/ui/block-info-card"
7+
8+
<BlockInfoCard
9+
type="convex"
10+
color="#FFFFFF"
11+
/>
12+
13+
{/* MANUAL-CONTENT-START:intro */}
14+
[Convex](https://www.convex.dev/) is an open-source reactive backend platform that combines a document database, serverless functions, and real-time sync in one developer-friendly package. Instead of writing SQL, you define queries, mutations, and actions in TypeScript that run right next to your data, and every client subscribed to a query updates automatically when the underlying data changes.
15+
16+
**Why Convex?**
17+
18+
- **Functions as the API:** Queries (reads), mutations (transactional writes), and actions (side effects like calling external APIs) are the building blocks of your backend — typed, versioned, and deployed together.
19+
- **Reactive by default:** Query results update live as data changes, with no cache invalidation or polling logic to maintain.
20+
- **Transactional writes:** Mutations run as ACID transactions with serializable isolation, so your data stays consistent without manual locking.
21+
- **Built-in schema awareness:** Convex tracks the shape of every table, so tooling can introspect your data model without a separate migration system.
22+
23+
**Using Convex in Sim**
24+
25+
Sim's Convex integration connects your workflows to any Convex deployment with two fields: the deployment URL and a deploy key from the dashboard Settings page. From there you can:
26+
27+
- **Run functions:** Call query, mutation, and action functions with named JSON arguments — or use Run Function when you don't want to specify the function type.
28+
- **Inspect your data model:** List Tables returns every table in the deployment with the JSON schema of its documents.
29+
- **Export and sync data:** List Documents pages through a consistent snapshot of a table, and Document Deltas returns only the documents that changed since a snapshot — including deletions — making incremental syncs to warehouses, search indexes, or other tools straightforward.
30+
31+
Typical patterns include agents that read and write application data through your existing Convex functions, scheduled exports to analytics destinations, and change-driven automations that react to new or updated documents.
32+
{/* MANUAL-CONTENT-END */}
33+
34+
35+
## Usage Instructions
36+
37+
Integrate Convex into the workflow. Run query, mutation, and action functions on your deployment, list tables with their schemas, and export documents with snapshot pagination and change deltas.
38+
39+
40+
41+
## Actions
42+
43+
### `convex_query`
44+
45+
Run a Convex query function and return its result
46+
47+
#### Input
48+
49+
| Parameter | Type | Required | Description |
50+
| --------- | ---- | -------- | ----------- |
51+
| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., https://your-deployment.convex.cloud\) |
52+
| `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |
53+
| `functionPath` | string | Yes | Path to the query function \(e.g., messages:list or folder/file:myQuery\) |
54+
| `args` | json | No | Named arguments to pass to the function as a JSON object |
55+
56+
#### Output
57+
58+
| Parameter | Type | Description |
59+
| --------- | ---- | ----------- |
60+
| `value` | json | Result returned by the query function |
61+
| `logLines` | array | Log lines printed during the function execution |
62+
63+
### `convex_mutation`
64+
65+
Run a Convex mutation function to write data and return its result
66+
67+
#### Input
68+
69+
| Parameter | Type | Required | Description |
70+
| --------- | ---- | -------- | ----------- |
71+
| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., https://your-deployment.convex.cloud\) |
72+
| `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |
73+
| `functionPath` | string | Yes | Path to the mutation function \(e.g., messages:send or folder/file:myMutation\) |
74+
| `args` | json | No | Named arguments to pass to the function as a JSON object |
75+
76+
#### Output
77+
78+
| Parameter | Type | Description |
79+
| --------- | ---- | ----------- |
80+
| `value` | json | Result returned by the mutation function |
81+
| `logLines` | array | Log lines printed during the function execution |
82+
83+
### `convex_action`
84+
85+
Run a Convex action function and return its result
86+
87+
#### Input
88+
89+
| Parameter | Type | Required | Description |
90+
| --------- | ---- | -------- | ----------- |
91+
| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., https://your-deployment.convex.cloud\) |
92+
| `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |
93+
| `functionPath` | string | Yes | Path to the action function \(e.g., emails:send or folder/file:myAction\) |
94+
| `args` | json | No | Named arguments to pass to the function as a JSON object |
95+
96+
#### Output
97+
98+
| Parameter | Type | Description |
99+
| --------- | ---- | ----------- |
100+
| `value` | json | Result returned by the action function |
101+
| `logLines` | array | Log lines printed during the function execution |
102+
103+
### `convex_run_function`
104+
105+
Run any Convex function (query, mutation, or action) by path without specifying its type
106+
107+
#### Input
108+
109+
| Parameter | Type | Required | Description |
110+
| --------- | ---- | -------- | ----------- |
111+
| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., https://your-deployment.convex.cloud\) |
112+
| `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |
113+
| `functionPath` | string | Yes | Path to the function \(e.g., messages:list or folder/file:myFunction\) |
114+
| `args` | json | No | Named arguments to pass to the function as a JSON object |
115+
116+
#### Output
117+
118+
| Parameter | Type | Description |
119+
| --------- | ---- | ----------- |
120+
| `value` | json | Result returned by the function |
121+
| `logLines` | array | Log lines printed during the function execution |
122+
123+
### `convex_list_tables`
124+
125+
List all tables in a Convex deployment along with their JSON schemas
126+
127+
#### Input
128+
129+
| Parameter | Type | Required | Description |
130+
| --------- | ---- | -------- | ----------- |
131+
| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., https://your-deployment.convex.cloud\) |
132+
| `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |
133+
134+
#### Output
135+
136+
| Parameter | Type | Description |
137+
| --------- | ---- | ----------- |
138+
| `tables` | array | Names of the tables in the deployment |
139+
| `schemas` | json | Map of table name to the JSON schema of its documents |
140+
141+
### `convex_list_documents`
142+
143+
List documents from a Convex table via a paginated snapshot. Pass the returned snapshot and cursor back in to fetch the next page.
144+
145+
#### Input
146+
147+
| Parameter | Type | Required | Description |
148+
| --------- | ---- | -------- | ----------- |
149+
| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., https://your-deployment.convex.cloud\) |
150+
| `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |
151+
| `tableName` | string | No | Table to list documents from. Omit to list documents from all tables. |
152+
| `snapshot` | string | No | Snapshot timestamp from a previous page. Omit on the first request to start a new snapshot. |
153+
| `cursor` | string | No | Pagination cursor from a previous page. Omit on the first request. |
154+
155+
#### Output
156+
157+
| Parameter | Type | Description |
158+
| --------- | ---- | ----------- |
159+
| `documents` | array | Documents in this page of the snapshot |
160+
| `hasMore` | boolean | Whether more pages remain in the snapshot |
161+
| `snapshot` | string | Snapshot timestamp to pass back in when fetching the next page |
162+
| `cursor` | string | Pagination cursor to pass back in when fetching the next page |
163+
164+
### `convex_document_deltas`
165+
166+
List documents that changed after a snapshot or previous delta cursor. Deleted documents are returned with a _deleted flag.
167+
168+
#### Input
169+
170+
| Parameter | Type | Required | Description |
171+
| --------- | ---- | -------- | ----------- |
172+
| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., https://your-deployment.convex.cloud\) |
173+
| `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page |
174+
| `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. |
175+
| `tableName` | string | No | Table to read deltas from. Omit to read deltas from all tables. |
176+
177+
#### Output
178+
179+
| Parameter | Type | Description |
180+
| --------- | ---- | ----------- |
181+
| `documents` | array | Changed documents, each including _table and _ts fields |
182+
| `hasMore` | boolean | Whether more delta pages remain |
183+
| `cursor` | string | Cursor to pass back in when fetching the next page of deltas |
184+
185+

apps/docs/content/docs/en/integrations/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"cloudwatch",
3535
"codepipeline",
3636
"confluence",
37+
"convex",
3738
"crowdstrike",
3839
"cursor",
3940
"dagster",

0 commit comments

Comments
 (0)