diff --git a/apps/docs/components/icons.tsx b/apps/docs/components/icons.tsx index 4750caa45df..1368eb93b30 100644 --- a/apps/docs/components/icons.tsx +++ b/apps/docs/components/icons.tsx @@ -961,6 +961,24 @@ export function PeopleDataLabsIcon(props: SVGProps) { ) } +export function PersonaIcon(props: SVGProps) { + return ( + + + + ) +} + export function PerplexityIcon(props: SVGProps) { return ( @@ -1127,7 +1145,7 @@ export function NotionIcon(props: SVGProps) { ) @@ -2038,6 +2056,32 @@ export function ConfluenceIcon(props: SVGProps) { ) } +export function ConvexIcon(props: SVGProps) { + return ( + + + + + + ) +} + export function TwilioIcon(props: SVGProps) { return ( @@ -2243,6 +2287,17 @@ export function BrandfetchIcon(props: SVGProps) { ) } +export function BrexIcon(props: SVGProps) { + return ( + + + + ) +} + export function BrightDataIcon(props: SVGProps) { return ( ) { ) } +export function LatexIcon(props: SVGProps) { + return ( + + + + + + + + ) +} + export function LaunchDarklyIcon(props: SVGProps) { return ( @@ -3623,6 +3705,50 @@ export function QdrantIcon(props: SVGProps) { ) } +export function QuartrIcon(props: SVGProps) { + return ( + + + + + + + + + + + + + ) +} + export function QuiverIcon(props: SVGProps) { return ( ) { ) } +export function TemporalIcon(props: SVGProps) { + return ( + + + + ) +} + export function DatabricksIcon(props: SVGProps) { return ( @@ -5831,6 +5968,55 @@ export function DatadogIcon(props: SVGProps) { ) } +export function DaytonaIcon(props: SVGProps) { + return ( + + + + + + + + + + + ) +} + export function MicrosoftDataverseIcon(props: SVGProps) { const id = useId() const clip0 = `dataverse_clip0_${id}` @@ -7584,3 +7770,32 @@ export function WizaIcon(props: SVGProps) { ) } + +export function TriggerDevIcon(props: SVGProps) { + const id = useId() + const gradientId = `triggerdev_paint0_${id}` + + return ( + + + + + + + + + + ) +} diff --git a/apps/docs/components/ui/icon-mapping.ts b/apps/docs/components/ui/icon-mapping.ts index a0e3bf30e6e..c222a25e0e0 100644 --- a/apps/docs/components/ui/icon-mapping.ts +++ b/apps/docs/components/ui/icon-mapping.ts @@ -24,6 +24,7 @@ import { BoxCompanyIcon, BrainIcon, BrandfetchIcon, + BrexIcon, BrightDataIcon, BrowserUseIcon, CalComIcon, @@ -37,11 +38,13 @@ import { CloudWatchIcon, CodePipelineIcon, ConfluenceIcon, + ConvexIcon, CrowdStrikeIcon, CursorIcon, DagsterIcon, DatabricksIcon, DatadogIcon, + DaytonaIcon, DevinIcon, DiscordIcon, DocumentIcon, @@ -108,6 +111,7 @@ import { KalshiIcon, KetchIcon, LangsmithIcon, + LatexIcon, LaunchDarklyIcon, LemlistIcon, LinearIcon, @@ -145,6 +149,7 @@ import { ParallelIcon, PeopleDataLabsIcon, PerplexityIcon, + PersonaIcon, PineconeIcon, PipedriveIcon, PolymarketIcon, @@ -154,6 +159,7 @@ import { ProspeoIcon, PulseIcon, QdrantIcon, + QuartrIcon, QuiverIcon, RailwayIcon, RB2BIcon, @@ -193,9 +199,11 @@ import { TailscaleIcon, TavilyIcon, TelegramIcon, + TemporalIcon, TextractIcon, TinybirdIcon, TrelloIcon, + TriggerDevIcon, TwilioIcon, TypeformIcon, UpstashIcon, @@ -239,6 +247,7 @@ export const blockTypeToIconMap: Record = { azure_devops: AzureIcon, box: BoxCompanyIcon, brandfetch: BrandfetchIcon, + brex: BrexIcon, brightdata: BrightDataIcon, browser_use: BrowserUseIcon, calcom: CalComIcon, @@ -253,12 +262,14 @@ export const blockTypeToIconMap: Record = { codepipeline: CodePipelineIcon, confluence: ConfluenceIcon, confluence_v2: ConfluenceIcon, + convex: ConvexIcon, crowdstrike: CrowdStrikeIcon, cursor: CursorIcon, cursor_v2: CursorIcon, dagster: DagsterIcon, databricks: DatabricksIcon, datadog: DatadogIcon, + daytona: DaytonaIcon, devin: DevinIcon, discord: DiscordIcon, docusign: DocuSignIcon, @@ -338,6 +349,7 @@ export const blockTypeToIconMap: Record = { ketch: KetchIcon, knowledge: PackageSearchIcon, langsmith: LangsmithIcon, + latex: LatexIcon, launchdarkly: LaunchDarklyIcon, lemlist: LemlistIcon, linear: LinearIcon, @@ -379,6 +391,7 @@ export const blockTypeToIconMap: Record = { parallel_ai: ParallelIcon, peopledatalabs: PeopleDataLabsIcon, perplexity: PerplexityIcon, + persona: PersonaIcon, pinecone: PineconeIcon, pipedrive: PipedriveIcon, polymarket: PolymarketIcon, @@ -389,6 +402,7 @@ export const blockTypeToIconMap: Record = { pulse: PulseIcon, pulse_v2: PulseIcon, qdrant: QdrantIcon, + quartr: QuartrIcon, quiver: QuiverIcon, railway: RailwayIcon, rb2b: RB2BIcon, @@ -432,10 +446,12 @@ export const blockTypeToIconMap: Record = { tailscale: TailscaleIcon, tavily: TavilyIcon, telegram: TelegramIcon, + temporal: TemporalIcon, textract: TextractIcon, textract_v2: TextractIcon, tinybird: TinybirdIcon, trello: TrelloIcon, + trigger_dev: TriggerDevIcon, twilio_sms: TwilioIcon, twilio_voice: TwilioIcon, typeform: TypeformIcon, diff --git a/apps/docs/content/docs/en/integrations/brex.mdx b/apps/docs/content/docs/en/integrations/brex.mdx new file mode 100644 index 00000000000..09b49faf55b --- /dev/null +++ b/apps/docs/content/docs/en/integrations/brex.mdx @@ -0,0 +1,895 @@ +--- +title: Brex +description: Manage expenses, receipts, transactions, and team data in Brex +--- + +import { BlockInfoCard } from "@/components/ui/block-info-card" + + + +{/* MANUAL-CONTENT-START:intro */} +[Brex](https://www.brex.com/) is the AI-powered spend platform that gives companies corporate cards, expense management, banking, and bill pay in one place. Finance teams use Brex to control spend with budgets and spend limits, automate expense review, and keep every transaction reconciled with receipts and memos. + +With the Brex integration in Sim, your agents can work directly with your company's spend data: + +- **Expenses**: List and filter expenses by status, owner, or purchase date, fetch full expense details (merchant, amounts, receipts), and update expense memos. +- **Receipts**: Upload a receipt file straight onto a specific card expense, or let Brex automatically match an uploaded receipt to the right expense. +- **Transactions and accounts**: Pull settled card transactions, cash account transactions, account balances, and finalized statements for reporting and reconciliation. +- **Budgets and spend limits**: Read budgets and spend limits — including current period balances — to power utilization reports and proactive alerts. +- **Team**: Look up users, departments, locations, titles, and cards to enrich spend data with organizational context. +- **Payments**: Track vendors and money transfers to monitor payment status end to end. + +Authentication uses a Brex user token, which you can generate from **Developer → Settings** in your Brex dashboard. The integration is intentionally read-focused: it never moves money, issues cards, or exposes card numbers. +{/* MANUAL-CONTENT-END */} + + +## Usage Instructions + +Integrates Brex into the workflow. List and update expenses, upload and match receipts, view card and cash transactions, accounts, budgets, spend limits, vendors, transfers, and team data. + + + +## Actions + +### `brex_list_expenses` + +List expenses in the Brex account with optional filters for user, status, payment status, and purchase date range + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `userIds` | string | No | Comma-separated user IDs to filter expenses by owner | +| `statuses` | string | No | Comma-separated expense statuses to filter by: DRAFT, SUBMITTED, APPROVED, OUT_OF_POLICY, VOID, CANCELED, SPLIT, SETTLED | +| `paymentStatuses` | string | No | Comma-separated payment statuses to filter by: NOT_STARTED, PROCESSING, CANCELED, DECLINED, CLEARED, REFUNDING, REFUNDED, CASH_ADVANCE, CREDITED, AWAITING_PAYMENT, SCHEDULED | +| `purchasedAtStart` | string | No | Only include expenses purchased at or after this ISO 8601 timestamp | +| `purchasedAtEnd` | string | No | Only include expenses purchased at or before this ISO 8601 timestamp | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of expenses to return \(max 100\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Expenses matching the filters | +| ↳ `id` | string | Unique expense ID | +| ↳ `memo` | string | Memo on the expense | +| ↳ `status` | string | Expense status \(DRAFT, SUBMITTED, APPROVED, OUT_OF_POLICY, VOID, CANCELED, SPLIT, SETTLED\) | +| ↳ `payment_status` | string | Payment status \(NOT_STARTED, PROCESSING, CANCELED, DECLINED, CLEARED, REFUNDING, REFUNDED, CASH_ADVANCE, CREDITED, AWAITING_PAYMENT, SCHEDULED\) | +| ↳ `expense_type` | string | Expense type \(CARD, BILLPAY, REIMBURSEMENT, CLAWBACK, UNSET\) | +| ↳ `category` | string | Expense category \(e.g., RESTAURANTS, RECURRING_SOFTWARE_AND_SAAS, AIRLINE_EXPENSES\) | +| ↳ `merchant` | json | Merchant details | +| ↳ `raw_descriptor` | string | Raw merchant descriptor | +| ↳ `mcc` | string | Merchant category code | +| ↳ `country` | string | Merchant country | +| ↳ `user` | json | User who made the expense | +| ↳ `id` | string | User ID | +| ↳ `first_name` | string | First name | +| ↳ `last_name` | string | Last name | +| ↳ `budget` | json | Budget the expense belongs to | +| ↳ `id` | string | Budget ID | +| ↳ `name` | string | Budget name | +| ↳ `department` | json | Department of the expense owner | +| ↳ `id` | string | Department ID | +| ↳ `name` | string | Department name | +| ↳ `location` | json | Location of the expense owner | +| ↳ `id` | string | Location ID | +| ↳ `name` | string | Location name | +| ↳ `original_amount` | json | Original transaction amount | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `billing_amount` | json | Amount billed to the account | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `purchased_amount` | json | Amount at the time of purchase | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `receipts` | array | Receipts attached to the expense | +| ↳ `id` | string | Receipt ID | +| ↳ `download_uris` | array | Pre-signed receipt download URLs | +| ↳ `purchased_at` | string | Purchase timestamp \(ISO 8601\) | +| ↳ `updated_at` | string | Last update timestamp \(ISO 8601\) | +| ↳ `dashboard_url` | string | Link to the expense in the Brex dashboard | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_get_expense` + +Get a single Brex expense by its ID, including merchant, user, and receipt details + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `expenseId` | string | Yes | ID of the expense to fetch | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Unique expense ID | +| `memo` | string | Memo on the expense | +| `status` | string | Expense status \(DRAFT, SUBMITTED, APPROVED, OUT_OF_POLICY, VOID, CANCELED, SPLIT, SETTLED\) | +| `paymentStatus` | string | Payment status \(NOT_STARTED, PROCESSING, CANCELED, DECLINED, CLEARED, REFUNDING, REFUNDED, CASH_ADVANCE, CREDITED, AWAITING_PAYMENT, SCHEDULED\) | +| `expenseType` | string | Expense type \(CARD, BILLPAY, REIMBURSEMENT, CLAWBACK, UNSET\) | +| `category` | string | Expense category \(e.g., RESTAURANTS, RECURRING_SOFTWARE_AND_SAAS, AIRLINE_EXPENSES\) | +| `merchantId` | string | Merchant ID | +| `merchant` | json | Merchant details \(raw descriptor, MCC, country\) | +| ↳ `raw_descriptor` | string | Raw merchant descriptor | +| ↳ `mcc` | string | Merchant category code | +| ↳ `country` | string | Merchant country | +| `budgetId` | string | Budget ID | +| `budget` | json | Budget the expense belongs to | +| ↳ `id` | string | Budget ID | +| ↳ `name` | string | Budget name | +| `departmentId` | string | Department ID | +| `department` | json | Department of the expense owner | +| ↳ `id` | string | Department ID | +| ↳ `name` | string | Department name | +| `locationId` | string | Location ID | +| `location` | json | Location of the expense owner | +| ↳ `id` | string | Location ID | +| ↳ `name` | string | Location name | +| `userId` | string | ID of the user who made the expense | +| `user` | json | User who made the expense | +| ↳ `id` | string | User ID | +| ↳ `first_name` | string | First name | +| ↳ `last_name` | string | Last name | +| `originalAmount` | json | Original transaction amount | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| `billingAmount` | json | Amount billed to the account | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| `purchasedAmount` | json | Amount at the time of purchase | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| `usdEquivalentAmount` | json | USD equivalent amount | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| `purchasedAt` | string | Purchase timestamp \(ISO 8601\) | +| `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| `paymentPostedAt` | string | Timestamp the payment was posted \(ISO 8601\) | +| `receipts` | array | Receipts attached to the expense | +| ↳ `id` | string | Receipt ID | +| ↳ `download_uris` | array | Pre-signed receipt download URLs | +| `dashboardUrl` | string | Link to the expense in the Brex dashboard | + +### `brex_update_expense` + +Update the memo of a Brex card expense + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `expenseId` | string | Yes | ID of the card expense to update | +| `memo` | string | Yes | New memo for the expense | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Unique expense ID | +| `memo` | string | Updated memo on the expense | +| `status` | string | Expense status \(DRAFT, SUBMITTED, APPROVED, OUT_OF_POLICY, VOID, CANCELED, SPLIT, SETTLED\) | +| `paymentStatus` | string | Payment status \(NOT_STARTED, PROCESSING, CANCELED, DECLINED, CLEARED, REFUNDING, REFUNDED, CASH_ADVANCE, CREDITED, AWAITING_PAYMENT, SCHEDULED\) | +| `category` | string | Expense category \(e.g., RESTAURANTS, RECURRING_SOFTWARE_AND_SAAS, AIRLINE_EXPENSES\) | +| `merchantId` | string | Merchant ID | +| `budgetId` | string | Budget ID | +| `originalAmount` | json | Original transaction amount | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| `billingAmount` | json | Amount billed to the account | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| `purchasedAt` | string | Purchase timestamp \(ISO 8601\) | +| `updatedAt` | string | Last update timestamp \(ISO 8601\) | + +### `brex_upload_receipt` + +Upload a receipt file and attach it to a specific Brex card expense + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `expenseId` | string | Yes | ID of the card expense to attach the receipt to | +| `file` | file | Yes | Receipt file to upload \(max 50 MB\) | +| `receiptName` | string | No | Receipt file name including extension \(defaults to the uploaded file name\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `receiptId` | string | Unique identifier of the receipt upload | +| `receiptName` | string | Name the receipt was uploaded with | +| `expenseId` | string | ID of the expense the receipt was attached to | + +### `brex_match_receipt` + +Upload a receipt file and let Brex automatically match it with existing expenses + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `file` | file | Yes | Receipt file to upload \(max 50 MB\) | +| `receiptName` | string | No | Receipt file name including extension \(defaults to the uploaded file name\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `receiptId` | string | Unique identifier of the receipt match request | +| `receiptName` | string | Name the receipt was uploaded with | +| `expenseId` | string | Always null for receipt match \(Brex matches the receipt asynchronously\) | + +### `brex_list_card_transactions` + +List settled card transactions for all Brex card accounts + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `userIds` | string | No | Comma-separated user IDs to filter transactions by cardholder | +| `postedAtStart` | string | No | Only include transactions posted at or after this ISO 8601 timestamp | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of transactions to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Settled card transactions | +| ↳ `id` | string | Unique transaction ID | +| ↳ `card_id` | string | ID of the card used | +| ↳ `description` | string | Transaction description | +| ↳ `amount` | json | Transaction amount | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `initiated_at_date` | string | Date the transaction was initiated | +| ↳ `posted_at_date` | string | Date the transaction was posted | +| ↳ `type` | string | Transaction type \(PURCHASE, REFUND, CHARGEBACK, REWARDS_CREDIT, COLLECTION, BNPL_FEE\) | +| ↳ `merchant` | json | Merchant details | +| ↳ `raw_descriptor` | string | Raw merchant descriptor | +| ↳ `mcc` | string | Merchant category code | +| ↳ `country` | string | Merchant country | +| ↳ `expense_id` | string | Associated expense ID | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_list_cash_transactions` + +List transactions for a Brex cash account + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `accountId` | string | Yes | ID of the cash account to list transactions for | +| `postedAtStart` | string | No | Only include transactions posted at or after this ISO 8601 timestamp | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of transactions to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Cash account transactions | +| ↳ `id` | string | Unique transaction ID | +| ↳ `description` | string | Transaction description | +| ↳ `amount` | json | Transaction amount | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `initiated_at_date` | string | Date the transaction was initiated | +| ↳ `posted_at_date` | string | Date the transaction was posted | +| ↳ `type` | string | Transaction type | +| ↳ `transfer_id` | string | Associated transfer ID | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_list_card_accounts` + +List all Brex card accounts with balances and limits + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `accounts` | array | Card accounts | +| ↳ `id` | string | Unique account ID | +| ↳ `status` | string | Account status | +| ↳ `current_balance` | json | Current balance | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `available_balance` | json | Available balance | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `account_limit` | json | Account limit | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `current_statement_period` | json | Current statement period \(start_date, end_date\) | + +### `brex_list_cash_accounts` + +List all Brex cash accounts with balances and account details + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of accounts to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Cash accounts | +| ↳ `id` | string | Unique account ID | +| ↳ `name` | string | Account name | +| ↳ `status` | string | Account status | +| ↳ `current_balance` | json | Current balance | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `available_balance` | json | Available balance | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `account_number` | string | Bank account number | +| ↳ `routing_number` | string | Bank routing number | +| ↳ `primary` | boolean | Whether this is the primary cash account | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_get_cash_account` + +Get a Brex cash account by ID, or the primary cash account when no ID is provided + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `accountId` | string | No | ID of the cash account \(defaults to the primary cash account\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Unique account ID | +| `name` | string | Account name | +| `status` | string | Account status | +| `currentBalance` | json | Current balance | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| `availableBalance` | json | Available balance | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| `accountNumber` | string | Bank account number | +| `routingNumber` | string | Bank routing number | +| `primary` | boolean | Whether this is the primary cash account | + +### `brex_list_card_statements` + +List finalized statements for the primary Brex card account + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of statements to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Finalized card account statements | +| ↳ `id` | string | Unique statement ID | +| ↳ `start_balance` | json | Balance at the start of the period | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `end_balance` | json | Balance at the end of the period | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `period` | json | Statement period \(start_date, end_date\) | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_list_cash_statements` + +List finalized statements for a Brex cash account + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `accountId` | string | Yes | ID of the cash account to list statements for | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of statements to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Finalized cash account statements | +| ↳ `id` | string | Unique statement ID | +| ↳ `start_balance` | json | Balance at the start of the period | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `end_balance` | json | Balance at the end of the period | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `period` | json | Statement period \(start_date, end_date\) | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_list_users` + +List users in the Brex account, optionally filtered by email + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `email` | string | No | Filter users by exact email address | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of users to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Users in the Brex account | +| ↳ `id` | string | Unique user ID | +| ↳ `first_name` | string | First name | +| ↳ `last_name` | string | Last name | +| ↳ `email` | string | Email address | +| ↳ `status` | string | User status \(INVITED, ACTIVE, CLOSED, DISABLED, DELETED, PENDING_ACTIVATION, INACTIVE, ARCHIVED\) | +| ↳ `manager_id` | string | ID of the manager | +| ↳ `department_id` | string | Department ID | +| ↳ `location_id` | string | Location ID | +| ↳ `title_id` | string | Title ID | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_get_user` + +Get a Brex user by their ID + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `userId` | string | Yes | ID of the user to fetch | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Unique user ID | +| `firstName` | string | First name | +| `lastName` | string | Last name | +| `email` | string | Email address | +| `status` | string | User status \(INVITED, ACTIVE, CLOSED, DISABLED, DELETED, PENDING_ACTIVATION, INACTIVE, ARCHIVED\) | +| `managerId` | string | ID of the manager | +| `departmentId` | string | Department ID | +| `locationId` | string | Location ID | +| `titleId` | string | Title ID | + +### `brex_get_current_user` + +Get the Brex user associated with the API token + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Unique user ID | +| `firstName` | string | First name | +| `lastName` | string | Last name | +| `email` | string | Email address | +| `status` | string | User status \(INVITED, ACTIVE, CLOSED, DISABLED, DELETED, PENDING_ACTIVATION, INACTIVE, ARCHIVED\) | +| `managerId` | string | ID of the manager | +| `departmentId` | string | Department ID | +| `locationId` | string | Location ID | +| `titleId` | string | Title ID | + +### `brex_list_departments` + +List departments in the Brex account, optionally filtered by name + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `name` | string | No | Filter departments by name | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of departments to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Departments in the Brex account | +| ↳ `id` | string | Unique department ID | +| ↳ `name` | string | Department name | +| ↳ `description` | string | Department description | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_list_locations` + +List locations in the Brex account, optionally filtered by name + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `name` | string | No | Filter locations by name | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of locations to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Locations in the Brex account | +| ↳ `id` | string | Unique location ID | +| ↳ `name` | string | Location name | +| ↳ `description` | string | Location description | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_list_titles` + +List job titles in the Brex account, optionally filtered by name + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `name` | string | No | Filter titles by name | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of titles to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Job titles in the Brex account | +| ↳ `id` | string | Unique title ID | +| ↳ `name` | string | Title name | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_list_cards` + +List cards in the Brex account, optionally filtered by card owner + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `userId` | string | No | Filter cards by the ID of the card owner | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of cards to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Cards in the Brex account | +| ↳ `id` | string | Unique card ID | +| ↳ `owner` | json | Card owner \(type, user_id\) | +| ↳ `status` | string | Card status | +| ↳ `last_four` | string | Last four digits of the card number | +| ↳ `card_name` | string | Card name | +| ↳ `card_type` | string | Card type \(VIRTUAL or PHYSICAL\) | +| ↳ `limit_type` | string | Limit type \(CARD or USER\) | +| ↳ `spend_controls` | json | Spend controls on the card | +| ↳ `billing_address` | json | Billing address of the card | +| ↳ `expiration_date` | json | Card expiration date \(month, year\) | +| ↳ `budget_id` | string | Associated budget ID | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_get_company` + +Get the Brex company associated with the API token + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Unique company ID | +| `legalName` | string | Legal name of the company | +| `mailingAddress` | json | Company mailing address \(line1, line2, city, state, country, postal_code\) | +| `accountType` | string | Brex account type \(BREX_CLASSIC or BREX_EMPOWER\) | + +### `brex_list_budgets` + +List budgets in the Brex account + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of budgets to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Budgets in the Brex account | +| ↳ `budget_id` | string | Unique budget ID | +| ↳ `account_id` | string | Account ID the budget belongs to | +| ↳ `name` | string | Budget name | +| ↳ `description` | string | Budget description | +| ↳ `parent_budget_id` | string | Parent budget ID | +| ↳ `owner_user_ids` | array | User IDs of the budget owners | +| ↳ `period_recurrence_type` | string | Budget period recurrence \(WEEKLY, MONTHLY, QUARTERLY, YEARLY, ONE_TIME\) | +| ↳ `start_date` | string | Budget start date | +| ↳ `end_date` | string | Budget end date | +| ↳ `amount` | json | Budget amount | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `spend_budget_status` | string | Budget status | +| ↳ `limit_type` | string | Budget limit type | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_get_budget` + +Get a Brex budget by its ID + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `budgetId` | string | Yes | ID of the budget to fetch | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `budgetId` | string | Unique budget ID | +| `accountId` | string | Account ID the budget belongs to | +| `name` | string | Budget name | +| `description` | string | Budget description | +| `parentBudgetId` | string | Parent budget ID | +| `ownerUserIds` | array | User IDs of the budget owners | +| `periodRecurrenceType` | string | Budget period recurrence \(WEEKLY, MONTHLY, QUARTERLY, YEARLY, ONE_TIME\) | +| `startDate` | string | Budget start date | +| `endDate` | string | Budget end date | +| `amount` | json | Budget amount | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| `spendBudgetStatus` | string | Budget status \(ACTIVE, ARCHIVED, DELETED, EXPIRED\) | +| `limitType` | string | Budget limit type \(HARD or SOFT\) | + +### `brex_list_spend_limits` + +List spend limits in the Brex account, optionally filtered by member user + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `memberUserIds` | string | No | Comma-separated user IDs to filter spend limits by member | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of spend limits to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Spend limits in the Brex account | +| ↳ `id` | string | Unique spend limit ID | +| ↳ `account_id` | string | Account ID the spend limit belongs to | +| ↳ `name` | string | Spend limit name | +| ↳ `description` | string | Spend limit description | +| ↳ `parent_budget_id` | string | Parent budget ID | +| ↳ `status` | string | Spend limit status | +| ↳ `period_recurrence_type` | string | Period recurrence \(PER_WEEK, PER_MONTH, PER_QUARTER, PER_YEAR, ONE_TIME\) | +| ↳ `spend_type` | string | Spend type of the limit | +| ↳ `owner_user_ids` | array | User IDs of the spend limit owners | +| ↳ `member_user_ids` | array | User IDs of the spend limit members | +| ↳ `current_period_balance` | json | Spend and rollover amounts for the current period | +| ↳ `start_date` | string | Start date of the current period | +| ↳ `end_date` | string | End date of the current period | +| ↳ `start_time` | string | Start time of the current period \(ISO 8601\) | +| ↳ `end_time` | string | End time of the current period \(ISO 8601\) | +| ↳ `amount_spent` | json | Amount spent in the current period | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `rollover_amount` | json | Amount rolled over from previous periods | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_get_spend_limit` + +Get a Brex spend limit by its ID + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `spendLimitId` | string | Yes | ID of the spend limit to fetch | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Unique spend limit ID | +| `accountId` | string | Account ID the spend limit belongs to | +| `name` | string | Spend limit name | +| `description` | string | Spend limit description | +| `parentBudgetId` | string | Parent budget ID | +| `status` | string | Spend limit status \(ACTIVE, EXPIRED, ARCHIVED, DELETED\) | +| `periodRecurrenceType` | string | Period recurrence \(PER_WEEK, PER_MONTH, PER_QUARTER, PER_YEAR, ONE_TIME\) | +| `spendType` | string | Spend type of the limit | +| `startDate` | string | Spend limit start date | +| `endDate` | string | Spend limit end date | +| `ownerUserIds` | array | User IDs of the spend limit owners | +| `memberUserIds` | array | User IDs of the spend limit members | +| `currentPeriodBalance` | json | Spend and rollover amounts for the current period | +| ↳ `start_date` | string | Start date of the current period | +| ↳ `end_date` | string | End date of the current period | +| ↳ `start_time` | string | Start time of the current period \(ISO 8601\) | +| ↳ `end_time` | string | End time of the current period \(ISO 8601\) | +| ↳ `amount_spent` | json | Amount spent in the current period | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `rollover_amount` | json | Amount rolled over from previous periods | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| `authorizationSettings` | json | Authorization settings \(base limit, authorization type, rollover refresh\) | + +### `brex_list_vendors` + +List vendors in the Brex account, optionally filtered by name + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `name` | string | No | Filter vendors by name | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of vendors to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Vendors in the Brex account | +| ↳ `id` | string | Unique vendor ID | +| ↳ `company_name` | string | Vendor company name | +| ↳ `email` | string | Vendor email address | +| ↳ `phone` | string | Vendor phone number | +| ↳ `payment_accounts` | array | Payment accounts associated with the vendor | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_get_vendor` + +Get a Brex vendor by its ID + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `vendorId` | string | Yes | ID of the vendor to fetch | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Unique vendor ID | +| `companyName` | string | Vendor company name | +| `email` | string | Vendor email address | +| `phone` | string | Vendor phone number | +| `paymentAccounts` | array | Payment accounts associated with the vendor | + +### `brex_list_transfers` + +List money transfers in the Brex account + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `cursor` | string | No | Pagination cursor from a previous response | +| `limit` | string | No | Number of transfers to return \(default 100, max 1000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Transfers in the Brex account | +| ↳ `id` | string | Unique transfer ID | +| ↳ `counterparty` | json | Transfer counterparty details | +| ↳ `description` | string | Transfer description | +| ↳ `payment_type` | string | Payment type \(ACH, DOMESTIC_WIRE, CHEQUE, INTERNATIONAL_WIRE, BOOK_TRANSFER, STABLECOIN\) | +| ↳ `amount` | json | Transfer amount | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| ↳ `process_date` | string | Date the transfer processes | +| ↳ `originating_account` | json | Account the transfer originates from | +| ↳ `status` | string | Transfer status \(PROCESSING, SCHEDULED, PENDING_APPROVAL, FAILED, PROCESSED\) | +| ↳ `cancellation_reason` | string | Reason the transfer was canceled | +| ↳ `estimated_delivery_date` | string | Estimated delivery date | +| ↳ `creator_user_id` | string | ID of the user who created the transfer | +| ↳ `created_at` | string | Creation timestamp | +| ↳ `display_name` | string | Transfer display name | +| ↳ `external_memo` | string | External memo | +| `nextCursor` | string | Cursor for fetching the next page of results | + +### `brex_get_transfer` + +Get a Brex money transfer by its ID + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Brex user token \(generated from Developer Settings in the Brex dashboard\) | +| `transferId` | string | Yes | ID of the transfer to fetch | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Unique transfer ID | +| `counterparty` | json | Transfer counterparty details | +| `description` | string | Transfer description | +| `paymentType` | string | Payment type \(ACH, DOMESTIC_WIRE, CHEQUE, INTERNATIONAL_WIRE, BOOK_TRANSFER, STABLECOIN\) | +| `amount` | json | Transfer amount | +| ↳ `amount` | number | Amount in the smallest unit of the currency \(e.g., cents for USD\) | +| ↳ `currency` | string | ISO 4217 currency code \(e.g., USD\) | +| `processDate` | string | Date the transfer processes | +| `originatingAccount` | json | Account the transfer originates from | +| `status` | string | Transfer status \(PROCESSING, SCHEDULED, PENDING_APPROVAL, FAILED, PROCESSED\) | +| `cancellationReason` | string | Reason the transfer was canceled | +| `estimatedDeliveryDate` | string | Estimated delivery date | +| `creatorUserId` | string | ID of the user who created the transfer | +| `createdAt` | string | Creation timestamp | +| `displayName` | string | Transfer display name | +| `externalMemo` | string | External memo | + + diff --git a/apps/docs/content/docs/en/integrations/calcom.mdx b/apps/docs/content/docs/en/integrations/calcom.mdx index 0e844252c35..1c62f4bd0e2 100644 --- a/apps/docs/content/docs/en/integrations/calcom.mdx +++ b/apps/docs/content/docs/en/integrations/calcom.mdx @@ -1,5 +1,5 @@ --- -title: Cal Com +title: Cal.com description: Manage Cal.com bookings, event types, schedules, and availability --- diff --git a/apps/docs/content/docs/en/integrations/convex.mdx b/apps/docs/content/docs/en/integrations/convex.mdx new file mode 100644 index 00000000000..91e7ad4bbf8 --- /dev/null +++ b/apps/docs/content/docs/en/integrations/convex.mdx @@ -0,0 +1,187 @@ +--- +title: Convex +description: Use Convex database +--- + +import { BlockInfoCard } from "@/components/ui/block-info-card" + + + +{/* MANUAL-CONTENT-START:intro */} +[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. + +**Why Convex?** + +- **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. +- **Reactive by default:** Query results update live as data changes, with no cache invalidation or polling logic to maintain. +- **Transactional writes:** Mutations run as ACID transactions with serializable isolation, so your data stays consistent without manual locking. +- **Built-in schema awareness:** Convex tracks the shape of every table, so tooling can introspect your data model without a separate migration system. + +**Using Convex in Sim** + +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: + +- **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. +- **Inspect your data model:** List Tables returns every table in the deployment with the JSON schema of its documents. +- **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. + +The Run Query, Run Mutation, Run Action, and Run Function operations work on every Convex plan. List Tables, List Documents, and Document Deltas use Convex's streaming export API, which is available on Convex paid plans. + +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. +{/* MANUAL-CONTENT-END */} + + +## Usage Instructions + +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. + + + +## Actions + +### `convex_query` + +Run a Convex query function and return its result + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., 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 + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `value` | json | Result returned by the query function | +| `logLines` | array | Log lines printed during the function execution | + +### `convex_mutation` + +Run a Convex mutation function to write data and return its result + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., 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 + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `value` | json | Result returned by the mutation function | +| `logLines` | array | Log lines printed during the function execution | + +### `convex_action` + +Run a Convex action function and return its result + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., 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 + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `value` | json | Result returned by the action function | +| `logLines` | array | Log lines printed during the function execution | + +### `convex_run_function` + +Run any Convex function (query, mutation, or action) by path without specifying its type + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., 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 + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `value` | json | Result returned by the function | +| `logLines` | array | Log 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. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., https://your-deployment.convex.cloud\) | +| `deployKey` | string | Yes | Convex deploy key from the dashboard Settings page | + +#### Output + +| 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 | + +### `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. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., 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 + +| 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 | + +### `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. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `deploymentUrl` | string | Yes | Convex deployment URL \(e.g., 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 + +| 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 | + + diff --git a/apps/docs/content/docs/en/integrations/daytona.mdx b/apps/docs/content/docs/en/integrations/daytona.mdx new file mode 100644 index 00000000000..eb9f3238716 --- /dev/null +++ b/apps/docs/content/docs/en/integrations/daytona.mdx @@ -0,0 +1,301 @@ +--- +title: Daytona +description: Run code and commands in secure cloud sandboxes +--- + +import { BlockInfoCard } from "@/components/ui/block-info-card" + + + +{/* MANUAL-CONTENT-START:intro */} +[Daytona](https://www.daytona.io/) is secure, elastic infrastructure for running AI-generated code. Daytona provides isolated sandboxes that spin up in milliseconds, giving your agents a safe place to execute shell commands, run code, work with files, and clone repositories — without ever touching your own machines. + +**Why Daytona?** +- **Built for AI-generated code:** Sandboxes are fully isolated runtimes, so untrusted or generated code can run safely with no risk to your infrastructure. +- **Fast, elastic sandboxes:** Create a sandbox in under a couple hundred milliseconds, use it for one task or keep it alive across a whole session, and let auto-stop and auto-delete intervals clean up after you. +- **Complete toolbox:** Execute shell commands, run Python, JavaScript, or TypeScript with a built-in code interpreter, transfer files in and out, and clone Git repositories — all through one API. +- **Programmatic lifecycle control:** Create, list, start, stop, and delete sandboxes on demand, with snapshots, regions, resource sizing, environment variables, and labels. + +**Using Daytona in Sim** + +Sim's Daytona integration connects your workflows to Daytona with an API key. Twelve operations cover the full sandbox lifecycle and toolbox: create, list, get, start, stop, and delete sandboxes; run code and execute commands inside them; upload, download, and list files; and clone Git repositories. + +**Key benefits of using Daytona in Sim:** +- **Safe code interpreter for agents:** Let an agent write Python, JavaScript, or TypeScript and execute it in an isolated sandbox, then use the output downstream in your workflow. +- **Real file handling:** Upload workflow files directly into a sandbox, process them with code or commands, and download the results as files other blocks can consume. +- **Repository automation:** Clone a repository into a sandbox, run installs, builds, or tests, and report the results — perfect for CI-style checks and repo health monitoring. +- **Cost-aware lifecycle:** Create sandboxes on demand, stop or delete them when work finishes, and use auto-stop intervals so idle sandboxes never run up your bill. + +Whether you're building an AI code interpreter, validating generated code before it ships, analyzing data files in a clean environment, or automating repository checks, Daytona in Sim gives your agents real compute with strong isolation. Configure your API key, pick an operation, and start running code. +{/* MANUAL-CONTENT-END */} + + +## Usage Instructions + +Integrate Daytona into your workflow to run AI-generated code in secure, isolated sandboxes. Create and manage sandboxes, execute shell commands, run Python, JavaScript, or TypeScript code, transfer files, and clone Git repositories. + + + +## Actions + +### `daytona_create_sandbox` + +Create a new Daytona sandbox for running AI-generated code in isolation + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Daytona API key | +| `snapshot` | string | No | ID or name of the snapshot to create the sandbox from \(uses default if empty\) | +| `name` | string | No | Name for the sandbox \(defaults to the sandbox ID\) | +| `target` | string | No | Region where the sandbox will be created \(e.g., us, eu\) | +| `user` | string | No | User associated with the sandbox | +| `env` | json | No | Environment variables to set in the sandbox as key-value pairs | +| `labels` | json | No | Labels to attach to the sandbox as key-value pairs | +| `cpu` | number | No | CPU cores to allocate to the sandbox | +| `memory` | number | No | Memory to allocate to the sandbox in GB | +| `disk` | number | No | Disk space to allocate to the sandbox in GB | +| `autoStopInterval` | number | No | Auto-stop interval in minutes \(0 disables auto-stop\) | +| `autoArchiveInterval` | number | No | Auto-archive interval in minutes \(0 uses the maximum interval\) | +| `autoDeleteInterval` | number | No | Auto-delete interval in minutes \(negative disables, 0 deletes immediately on stop\) | +| `public` | boolean | No | Whether the sandbox HTTP preview is publicly accessible | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `sandbox` | json | The created sandbox | + +### `daytona_list_sandboxes` + +List Daytona sandboxes in the organization + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Daytona API key | +| `limit` | number | No | Maximum number of sandboxes to return \(1-200\) | +| `name` | string | No | Filter sandboxes by name prefix \(case-insensitive\) | +| `labels` | json | No | Filter sandboxes by labels as key-value pairs | +| `cursor` | string | No | Pagination cursor from a previous response | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `sandboxes` | array | Sandboxes in the organization | +| `nextCursor` | string | Cursor for the next page of results | + +### `daytona_get_sandbox` + +Get details of a Daytona sandbox + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Daytona API key | +| `sandboxId` | string | Yes | ID or name of the sandbox | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `sandbox` | json | The sandbox details | + +### `daytona_start_sandbox` + +Start a stopped Daytona sandbox + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Daytona API key | +| `sandboxId` | string | Yes | ID or name of the sandbox | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `sandbox` | json | The started sandbox | + +### `daytona_stop_sandbox` + +Stop a running Daytona sandbox + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Daytona API key | +| `sandboxId` | string | Yes | ID or name of the sandbox | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `sandbox` | json | The stopped sandbox | + +### `daytona_delete_sandbox` + +Delete a Daytona sandbox + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Daytona API key | +| `sandboxId` | string | Yes | ID or name of the sandbox | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `sandbox` | json | The deleted sandbox | + +### `daytona_execute_command` + +Execute a shell command inside a Daytona sandbox + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Daytona API key | +| `sandboxId` | string | Yes | ID of the sandbox to execute the command in | +| `command` | string | Yes | Shell command to execute | +| `cwd` | string | No | Working directory for the command \(defaults to the sandbox working directory\) | +| `env` | json | No | Environment variables to set for the command as key-value pairs | +| `timeout` | number | No | Timeout in seconds \(defaults to 10 seconds\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `exitCode` | number | Exit code of the command \(-1 if missing from the response\) | +| `result` | string | Combined stdout/stderr output of the command | + +### `daytona_run_code` + +Run Python, JavaScript, or TypeScript code inside a Daytona sandbox + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Daytona API key | +| `sandboxId` | string | Yes | ID of the sandbox to run the code in | +| `code` | string | Yes | Code to run | +| `language` | string | Yes | Language of the code: python, javascript, or typescript | +| `env` | json | No | Environment variables to set for the run as key-value pairs | +| `timeout` | number | No | Timeout in seconds \(defaults to 10 seconds\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `exitCode` | number | Exit code of the code run \(-1 if missing from the response\) | +| `result` | string | Combined stdout/stderr output of the code run | +| `artifacts` | json | Artifacts produced by the run \(e.g., matplotlib charts\) | + +### `daytona_upload_file` + +Upload a file to a Daytona sandbox + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Daytona API key | +| `sandboxId` | string | Yes | ID of the sandbox to upload the file to | +| `destinationPath` | string | Yes | Destination path in the sandbox \(a trailing slash uploads into that directory using the file name\) | +| `file` | file | No | The file to upload | +| `fileContent` | string | No | Legacy: base64 encoded file content | +| `fileName` | string | No | Optional file name override | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `uploadedPath` | string | Path of the uploaded file in the sandbox | +| `name` | string | Name of the uploaded file | +| `size` | number | Size of the uploaded file in bytes | + +### `daytona_download_file` + +Download a file from a Daytona sandbox + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Daytona API key | +| `sandboxId` | string | Yes | ID of the sandbox to download the file from | +| `filePath` | string | Yes | Path of the file in the sandbox | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `file` | file | Downloaded file stored in execution files | +| `name` | string | Name of the downloaded file | +| `mimeType` | string | MIME type of the downloaded file | +| `size` | number | Size of the downloaded file in bytes | + +### `daytona_list_files` + +List files in a directory of a Daytona sandbox + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Daytona API key | +| `sandboxId` | string | Yes | ID of the sandbox to list files in | +| `path` | string | No | Directory path to list \(defaults to the sandbox working directory\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `files` | array | Files and directories at the given path | +| ↳ `name` | string | File or directory name | +| ↳ `isDir` | boolean | Whether the entry is a directory | +| ↳ `size` | number | Size in bytes | +| ↳ `mode` | string | File mode string | +| ↳ `permissions` | string | Permission string | +| ↳ `owner` | string | Owning user | +| ↳ `group` | string | Owning group | +| ↳ `modifiedAt` | string | Last modification timestamp | + +### `daytona_git_clone` + +Clone a Git repository into a Daytona sandbox + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Daytona API key | +| `sandboxId` | string | Yes | ID of the sandbox to clone the repository into | +| `url` | string | Yes | URL of the Git repository to clone | +| `path` | string | Yes | Path in the sandbox to clone the repository into | +| `branch` | string | No | Branch to clone \(defaults to the default branch\) | +| `commitId` | string | No | Specific commit to check out after cloning | +| `username` | string | No | Username for authenticating to private repositories | +| `password` | string | No | Password or personal access token for private repositories | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `repoUrl` | string | URL of the cloned repository | +| `clonePath` | string | Path the repository was cloned into | + + diff --git a/apps/docs/content/docs/en/integrations/latex.mdx b/apps/docs/content/docs/en/integrations/latex.mdx new file mode 100644 index 00000000000..e594a584413 --- /dev/null +++ b/apps/docs/content/docs/en/integrations/latex.mdx @@ -0,0 +1,129 @@ +--- +title: LaTeX +description: Compile LaTeX documents into PDFs +--- + +import { BlockInfoCard } from "@/components/ui/block-info-card" + + + +{/* MANUAL-CONTENT-START:intro */} +[LaTeX](https://www.latex-project.org/) is a typesetting system that is the de facto standard for producing high-quality scientific and technical documents. Unlike word processors, LaTeX uses plain-text markup to describe a document's structure and lets the compiler handle layout, which makes it ideal for documents with mathematical notation, citations, cross-references, and consistent professional formatting. + +With LaTeX, you can: + +- **Compile documents to PDF**: Turn LaTeX source into a polished, print-ready PDF +- **Typeset mathematics**: Render equations, theorems, and scientific notation with precision +- **Choose your compiler**: Build with pdfLaTeX, XeLaTeX, LuaLaTeX, pLaTeX, upLaTeX, or ConTeXt +- **Include supporting files**: Add images, included `.tex` files, bibliographies, and custom classes or styles to the build +- **Automate document production**: Generate reports, invoices, certificates, and papers from templates + +In Sim, the LaTeX integration enables your agents to compile LaTeX source into PDF files as part of any workflow — no OAuth or API key required. Agents can draft documents in LaTeX, attach supporting resources such as images or BibTeX bibliographies, and produce a finished PDF that downstream blocks can email, upload, or store. Agents can also search the available TeX Live packages and system fonts to pick the right tools for a document. This makes it easy to build agents that generate reports, typeset research digests, or produce templated documents like invoices and certificates. + +Note: compilation runs on the public [LaTeX-on-HTTP](https://github.com/YtoTech/latex-on-http) service at latex.ytotech.com, so the document source and any attached resources are sent to that third-party service. Avoid compiling documents whose contents must not leave your environment. +{/* MANUAL-CONTENT-END */} + + +## Usage Instructions + +Integrates LaTeX into the workflow. Compiles LaTeX source into a PDF file with pdflatex, xelatex, lualatex, platex, uplatex, or context, and supports additional resources such as images, included .tex files, and bibliographies. Can also look up the TeX Live packages and system fonts available to the compiler. Does not require OAuth or an API key. Compilation runs on the public LaTeX-on-HTTP service (latex.ytotech.com), so document source and resources are sent to that third-party service. + + + +## Actions + +### `latex_compile` + +Compile a LaTeX document into a PDF via the public LaTeX-on-HTTP service (latex.ytotech.com). Supports pdflatex, xelatex, lualatex, platex, uplatex, and context, plus supporting resources such as images, included .tex files, and bibliographies. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `content` | string | Yes | LaTeX source of the main document, from \\documentclass to \\end\{document\} | +| `compiler` | string | No | LaTeX compiler: pdflatex \(default\), xelatex, lualatex, platex, uplatex, or context | +| `fileName` | string | No | Name for the generated PDF file \(default: document.pdf\) | +| `resources` | array | No | Supporting files for the compilation. Each entry has a "path" plus exactly one of "content" \(plain text\), "file" \(base64\), or "url" \(remote file\), e.g. \[\{"path": "refs.bib", "content": "..."\}, \{"path": "logo.png", "url": "https://..."\}\] | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `pdf` | file | Compiled PDF file | +| `pdfUrl` | string | URL of the compiled PDF | +| `fileName` | string | Name of the compiled PDF file | +| `compiler` | string | LaTeX compiler used for the build | + +### `latex_search_packages` + +Search the TeX Live packages available to the LaTeX compiler by name or description, e.g. to check which packages can be used in a document. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `query` | string | Yes | Search terms matched against package names and descriptions | +| `maxResults` | number | No | Maximum number of packages to return \(default: 25, max: 100\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `packages` | array | TeX Live packages matching the query | +| ↳ `name` | string | Package name | +| ↳ `shortDescription` | string | One-line package description | +| ↳ `installed` | boolean | Whether the package is installed | +| ↳ `ctanUrl` | string | CTAN page for the package | +| `totalMatches` | number | Total number of packages matching the query, before truncation | + +### `latex_get_package` + +Get details about a specific TeX Live package available to the LaTeX compiler, including whether it is installed, its description, license, and related packages. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `name` | string | Yes | Exact package name, e.g. amsmath, tikz, or biblatex | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `package` | json | TeX Live package details | +| ↳ `name` | string | Package name | +| ↳ `installed` | boolean | Whether the package is installed | +| ↳ `shortDescription` | string | One-line package description | +| ↳ `longDescription` | string | Full package description | +| ↳ `category` | string | Package category | +| ↳ `license` | string | Package license identifier | +| ↳ `topics` | array | CTAN topic tags | +| ↳ `relatedPackages` | array | Names of related packages | +| ↳ `homepage` | string | Package homepage URL | +| ↳ `ctanUrl` | string | CTAN page for the package | + +### `latex_list_fonts` + +List the system fonts available to the LaTeX compiler, optionally filtered by name, e.g. to pick a font for xelatex or lualatex documents using fontspec. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `query` | string | No | Filter matched against font family and full font name, e.g. "Noto Serif" | +| `maxResults` | number | No | Maximum number of fonts to return \(default: 50, max: 200\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `fonts` | array | Fonts available to the LaTeX compiler | +| ↳ `family` | string | Font family name | +| ↳ `name` | string | Full font name | +| ↳ `styles` | array | Available styles, e.g. Bold or Italic | +| `totalMatches` | number | Total number of fonts matching the filter, before truncation | + + diff --git a/apps/docs/content/docs/en/integrations/meta.json b/apps/docs/content/docs/en/integrations/meta.json index 8b89b0bd92f..0ee13b9b63a 100644 --- a/apps/docs/content/docs/en/integrations/meta.json +++ b/apps/docs/content/docs/en/integrations/meta.json @@ -21,6 +21,7 @@ "azure_devops", "box", "brandfetch", + "brex", "brightdata", "browser_use", "calcom", @@ -34,11 +35,13 @@ "cloudwatch", "codepipeline", "confluence", + "convex", "crowdstrike", "cursor", "dagster", "databricks", "datadog", + "daytona", "devin", "discord", "docusign", @@ -108,6 +111,7 @@ "ketch", "knowledge", "langsmith", + "latex", "launchdarkly", "lemlist", "linear", @@ -145,6 +149,7 @@ "parallel_ai", "peopledatalabs", "perplexity", + "persona", "pinecone", "pipedrive", "polymarket", @@ -154,6 +159,7 @@ "prospeo", "pulse", "qdrant", + "quartr", "quiver", "railway", "rb2b", @@ -193,9 +199,11 @@ "tailscale", "tavily", "telegram", + "temporal", "textract", "tinybird", "trello", + "trigger_dev", "twilio_sms", "twilio_voice", "typeform", diff --git a/apps/docs/content/docs/en/integrations/notion.mdx b/apps/docs/content/docs/en/integrations/notion.mdx index 4f0edfa5bd5..4ddf64db96c 100644 --- a/apps/docs/content/docs/en/integrations/notion.mdx +++ b/apps/docs/content/docs/en/integrations/notion.mdx @@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card" {/* MANUAL-CONTENT-START:intro */} diff --git a/apps/docs/content/docs/en/integrations/persona.mdx b/apps/docs/content/docs/en/integrations/persona.mdx new file mode 100644 index 00000000000..4cf1dc83790 --- /dev/null +++ b/apps/docs/content/docs/en/integrations/persona.mdx @@ -0,0 +1,527 @@ +--- +title: Persona +description: Verify identities with Persona +--- + +import { BlockInfoCard } from "@/components/ui/block-info-card" + + + +{/* MANUAL-CONTENT-START:intro */} +[Persona](https://withpersona.com/) is an identity verification platform that helps businesses verify who their users are. Persona handles the full identity lifecycle — collecting government IDs, selfies, and documents through hosted verification flows, screening individuals against global watchlists and sanctions lists, and routing edge cases to human review. + +With Persona, you can: + +- **Verify identities end to end**: Create inquiries from your verification templates, send customers one-time verification links, and read back collected fields and decision results +- **Automate KYC and compliance decisions**: Approve or decline inquiries programmatically, run watchlist, adverse media, and politically-exposed-person screening reports, and monitor cases that need manual review +- **Manage your verified user base**: Create and look up accounts, bulk-import existing users from CSV, and keep your user model in sync with Persona via reference IDs +- **Keep an audit trail**: Download inquiry summary PDFs and retrieve the underlying verifications and documents behind every decision + +In Sim, the Persona block lets your agents drive identity verification as part of real workflows. Trigger verification when a customer signs up, route on approval status, screen names against watchlists before activating accounts, post pending reviews to Slack, or archive verification PDFs to cloud storage — all using your Persona API key and templates. +{/* MANUAL-CONTENT-END */} + + +## Usage Instructions + +Integrate Persona identity verification into the workflow. Manage the full inquiry lifecycle (create, update, approve, decline, review, resume, expire, redact), generate one-time verification links and PDF summaries, manage accounts including CSV bulk import, run watchlist and adverse media reports, review cases, retrieve verifications and documents, and discover inquiry templates. + + + +## Actions + +### `persona_create_inquiry` + +Create a new identity verification inquiry from an inquiry template. Returns the created inquiry, which can then be completed by the individual via a one-time link. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `inquiryTemplateId` | string | Yes | Inquiry template ID \(starts with itmpl_\), inquiry template version ID \(starts with itmplv_\), or legacy template ID \(starts with tmpl_\) | +| `accountId` | string | No | Account ID \(starts with act_\) to associate with this inquiry | +| `referenceId` | string | No | Reference ID that refers to an entity in your user model. An account is auto-created for it if one does not exist. | +| `fields` | json | No | JSON object of field name to field value pairs to pre-fill, as defined by the inquiry template \(e.g. \{"name-first": "Jane"\}\) | +| `note` | string | No | Free-form note to attach to the inquiry | +| `redirectUri` | string | No | URI to redirect the individual to after completing the inquiry flow | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `inquiry` | object | The created inquiry | + +### `persona_get_inquiry` + +Retrieve a single identity verification inquiry by ID, including its status, collected fields, and decision timestamps. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `inquiryId` | string | Yes | Inquiry ID to retrieve \(starts with inq_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `inquiry` | object | The retrieved inquiry | + +### `persona_list_inquiries` + +List identity verification inquiries, optionally filtered by status, account ID, reference ID, or creation date range. Results are cursor-paginated. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `status` | string | No | Filter by inquiry status \(created, pending, completed, failed, expired, needs_review, approved, declined\) | +| `accountId` | string | No | Filter by account ID \(starts with act_\); comma-separate multiple IDs | +| `referenceId` | string | No | Filter by reference ID | +| `createdAtStart` | string | No | Filter to inquiries created at or after this ISO 8601 timestamp | +| `createdAtEnd` | string | No | Filter to inquiries created at or before this ISO 8601 timestamp | +| `pageSize` | number | No | Number of inquiries to return per page \(1-100, default 10\) | +| `pageAfter` | string | No | Pagination cursor: return inquiries after this inquiry ID | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `inquiries` | array | Inquiries matching the filters | +| `nextCursor` | string | Cursor for the next page \(pass as pageAfter\), or null on the last page | + +### `persona_update_inquiry` + +Update an inquiry’s note, fields, tags, or redirect URI. Only the provided values are changed. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `inquiryId` | string | Yes | Inquiry ID to update \(starts with inq_\) | +| `note` | string | No | Free-form note to set on the inquiry | +| `fields` | json | No | JSON object of field name to field value pairs to set, as defined by the inquiry template \(e.g. \{"name-first": "Jane"\}\) | +| `tags` | array | No | JSON array of tag names to set on the inquiry \(e.g. \["vip"\]\) | +| `redirectUri` | string | No | URI to redirect the individual to after completing the inquiry flow | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `inquiry` | object | The updated inquiry | + +### `persona_approve_inquiry` + +Approve an identity verification inquiry. Approving prevents further progress on the inquiry and triggers any associated workflows and webhooks. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `inquiryId` | string | Yes | Inquiry ID to approve \(starts with inq_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `inquiry` | object | The approved inquiry | + +### `persona_decline_inquiry` + +Decline an identity verification inquiry. Declining prevents further progress on the inquiry and triggers any associated workflows and webhooks. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `inquiryId` | string | Yes | Inquiry ID to decline \(starts with inq_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `inquiry` | object | The declined inquiry | + +### `persona_mark_inquiry_for_review` + +Mark an identity verification inquiry for manual review, moving it to the needs_review status. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `inquiryId` | string | Yes | Inquiry ID to mark for review \(starts with inq_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `inquiry` | object | The inquiry marked for review | + +### `persona_resume_inquiry` + +Resume a pending or expired inquiry, creating a new session so the individual can continue verification. Returns a session token. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `inquiryId` | string | Yes | Inquiry ID to resume \(starts with inq_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `inquiry` | object | The resumed inquiry | +| `sessionToken` | string | Session token for the new inquiry session, used to continue the flow in embedded SDKs | + +### `persona_expire_inquiry` + +Expire an in-progress inquiry, invalidating its sessions and one-time links so the individual can no longer continue it. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `inquiryId` | string | Yes | Inquiry ID to expire \(starts with inq_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `inquiry` | object | The expired inquiry | + +### `persona_generate_inquiry_link` + +Generate a one-time link for an inquiry that the individual can open to complete their identity verification. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `inquiryId` | string | Yes | Inquiry ID to generate a one-time link for \(starts with inq_\) | +| `expiresInSeconds` | number | No | Number of seconds from now until the link expires \(must be greater than 0; defaults to the inquiry template setting, typically 24 hours\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `inquiry` | object | The inquiry the link was generated for | +| `oneTimeLink` | string | One-time link the individual can open to complete the inquiry | +| `oneTimeLinkShort` | string | Shortened version of the one-time link | + +### `persona_print_inquiry_pdf` + +Download a PDF summary of an inquiry, including its collected information and verification results. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `inquiryId` | string | Yes | Inquiry ID to print \(starts with inq_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `file` | file | PDF summary of the inquiry, stored in execution files | + +### `persona_redact_inquiry` + +Permanently delete all personally identifiable information collected by an inquiry, for example to honor a data deletion request. This cannot be undone. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `inquiryId` | string | Yes | Inquiry ID to redact \(starts with inq_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `inquiry` | object | The redacted inquiry \(PII fields are removed\) | + +### `persona_create_account` + +Create an account that represents an individual in Persona. Accounts consolidate inquiries, verifications, and reports for the same person. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `accountTypeId` | string | No | Account type ID to create the account for \(starts with acttp_\); defaults to your organization default | +| `referenceId` | string | No | Reference ID that refers to an entity in your user model | +| `countryCode` | string | No | ISO 3166-1 alpha-2 country code \(e.g. US\) | +| `fields` | json | No | JSON object of field name to field value pairs, as defined by the account type \(e.g. \{"name-first": "Jane"\}\) | +| `tags` | array | No | JSON array of tag names to associate with the account \(e.g. \["vip"\]\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `account` | object | The created account | + +### `persona_get_account` + +Retrieve a single account by ID, including its reference ID, fields, tags, and status. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `accountId` | string | Yes | Account ID to retrieve \(starts with act_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `account` | object | The retrieved account | + +### `persona_list_accounts` + +List accounts in your Persona organization, optionally filtered by reference ID. Results are cursor-paginated. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `referenceId` | string | No | Filter by reference ID | +| `pageSize` | number | No | Number of accounts to return per page \(1-100, default 10\) | +| `pageAfter` | string | No | Pagination cursor: return accounts after this account ID | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `accounts` | array | Accounts matching the filters | +| `nextCursor` | string | Cursor for the next page \(pass as pageAfter\), or null on the last page | + +### `persona_update_account` + +Update an account’s reference ID, country code, fields, or tags. Only the provided values are changed. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `accountId` | string | Yes | Account ID to update \(starts with act_\) | +| `referenceId` | string | No | Reference ID that refers to an entity in your user model | +| `countryCode` | string | No | ISO 3166-1 alpha-2 country code \(e.g. US\) | +| `fields` | json | No | JSON object of field name to field value pairs to set, as defined by the account type \(e.g. \{"name-first": "Jane"\}\) | +| `tags` | array | No | JSON array of tag names to set on the account \(e.g. \["vip"\]\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `account` | object | The updated account | + +### `persona_import_accounts` + +Bulk-import accounts into Persona from a CSV file. Returns an importer whose status can be polled until processing completes. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `file` | file | Yes | CSV file of accounts to import | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `importer` | object | The created account importer | + +### `persona_redact_account` + +Permanently delete all personally identifiable information stored on an account, for example to honor a data deletion request. This cannot be undone. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `accountId` | string | Yes | Account ID to redact \(starts with act_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `account` | object | The redacted account \(PII fields are removed\) | + +### `persona_list_cases` + +List manual review cases, optionally filtered by status, account ID, or reference ID. Results are cursor-paginated. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `status` | string | No | Filter by case status \(e.g. Open, Resolved\) | +| `accountId` | string | No | Filter by account ID \(starts with act_\) | +| `referenceId` | string | No | Filter by reference ID | +| `pageSize` | number | No | Number of cases to return per page \(1-100, default 10\) | +| `pageAfter` | string | No | Pagination cursor: return cases after this case ID | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `cases` | array | Cases matching the filters | +| `nextCursor` | string | Cursor for the next page \(pass as pageAfter\), or null on the last page | + +### `persona_get_case` + +Retrieve a single manual review case by ID, including its status, resolution, and assignee. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `caseId` | string | Yes | Case ID to retrieve \(starts with case_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `case` | object | The retrieved case | + +### `persona_create_report` + +Run a screening report (watchlist, adverse media, or politically exposed person) against an individual by name or search term. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `reportType` | string | Yes | Type of report to run: watchlist, adverse-media, or politically-exposed-person | +| `reportTemplateId` | string | Yes | Report template ID to run \(starts with rptp_\) | +| `term` | string | No | Full-name search term \(e.g. "Jane Q Doe"\). Provide this or the separate name parts. | +| `nameFirst` | string | No | First name of the individual to search | +| `nameMiddle` | string | No | Middle name of the individual to search | +| `nameLast` | string | No | Last name of the individual to search | +| `birthdate` | string | No | Birthdate of the individual, formatted as YYYY-MM-DD | +| `countryCode` | string | No | ISO 3166-1 alpha-2 country code \(e.g. US\) | +| `accountId` | string | No | Account ID \(starts with act_\) to associate with this report | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `report` | object | The created report. Reports run asynchronously; poll until status is ready. | + +### `persona_get_report` + +Retrieve a single screening report by ID, including its status, match results, and full type-specific attributes. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `reportId` | string | Yes | Report ID to retrieve \(starts with rep_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `report` | object | The retrieved report | + +### `persona_list_reports` + +List screening reports, optionally filtered by account ID or reference ID. Results are cursor-paginated. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `accountId` | string | No | Filter by account ID \(starts with act_\) | +| `referenceId` | string | No | Filter by reference ID | +| `pageSize` | number | No | Number of reports to return per page \(1-100, default 10\) | +| `pageAfter` | string | No | Pagination cursor: return reports after this report ID | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `reports` | array | Reports matching the filters | +| `nextCursor` | string | Cursor for the next page \(pass as pageAfter\), or null on the last page | + +### `persona_get_verification` + +Retrieve a single verification by ID (government ID, selfie, document, database, and more), including its status and the checks that ran. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `verificationId` | string | Yes | Verification ID to retrieve \(starts with ver_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `verification` | object | The retrieved verification | + +### `persona_get_document` + +Retrieve a single document by ID (government ID, generic document, and more), including its processing status and uploaded files. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `documentId` | string | Yes | Document ID to retrieve \(starts with doc_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `document` | object | The retrieved document | + +### `persona_list_inquiry_templates` + +List the inquiry templates in your Persona organization, to discover template IDs for creating inquiries. Results are cursor-paginated. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Persona API key | +| `pageSize` | number | No | Number of templates to return per page \(1-100, default 10\) | +| `pageAfter` | string | No | Pagination cursor: return templates after this template ID | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `inquiryTemplates` | array | Inquiry templates in the organization | +| `nextCursor` | string | Cursor for the next page \(pass as pageAfter\), or null on the last page | + + diff --git a/apps/docs/content/docs/en/integrations/quartr.mdx b/apps/docs/content/docs/en/integrations/quartr.mdx new file mode 100644 index 00000000000..a536bfedc54 --- /dev/null +++ b/apps/docs/content/docs/en/integrations/quartr.mdx @@ -0,0 +1,687 @@ +--- +title: Quartr +description: Access earnings calls, transcripts, filings, and slides +--- + +import { BlockInfoCard } from "@/components/ui/block-info-card" + + + +{/* MANUAL-CONTENT-START:intro */} +[Quartr](https://quartr.com/) is an investor relations data platform that provides structured, AI-ready access to live and historical earnings data from more than 15,000 public companies across 65+ markets. It covers earnings calls, transcripts, filings, reports, slide presentations, and AI-generated event summaries. + +With the Quartr integration in Sim, you can: + +- **Look up companies**: Find any covered public company by ticker, ISIN, CIK, OpenFIGI, country, or exchange, and resolve it to a Quartr company ID. +- **Track corporate events**: List earnings calls and other corporate events by company, event type, and date range, or retrieve a single event with its fiscal period details. +- **Summarize earnings calls**: Fetch AI-generated event summaries in one-line, short, or long form — with source references back to the underlying documents. +- **Download filings and reports**: List 10-Ks, 10-Qs, earnings releases, and other filings, and download report PDFs directly into your workflow as files. +- **Work with slide decks and transcripts**: Retrieve investor presentation PDFs and structured transcript JSON files (with timestamps and speaker identification) for downstream analysis. +- **Access event audio**: Get download and streaming URLs for archived earnings call audio, including where the Q&A section starts. +- **Monitor live events**: List live and upcoming events with their live audio and transcript stream URLs to react the moment a company goes live. + +Downloaded reports, slide decks, and transcripts are stored as execution files, so they can be passed straight into agents, knowledge bases, or other blocks in your workflow. + +To use the integration, generate an API key from the Quartr API portal and paste it into the block. Your key inherits the datasets enabled on your Quartr subscription. +{/* MANUAL-CONTENT-END */} + + +## Usage Instructions + +Integrate Quartr into the workflow. Look up public companies, corporate events, and event types; fetch AI-generated event summaries; list and download filings, reports, slide decks, and transcripts; and access archived audio and live event streams. Requires API Key. + + + +## Actions + +### `quartr_list_companies` + +List companies covered by Quartr, filterable by ticker, ISIN, CIK, OpenFIGI, country, and exchange. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `tickers` | string | No | Comma-separated list of company tickers \(e.g., "AAPL,MSFT"\) | +| `isins` | string | No | Comma-separated list of ISINs \(e.g., "US0378331005"\) | +| `ciks` | string | No | Comma-separated list of SEC CIKs \(e.g., "0000320193"\) | +| `countries` | string | No | Comma-separated list of ISO 3166-1 alpha-2 country codes \(e.g., "US,SE"\) | +| `exchanges` | string | No | Comma-separated list of exchange symbols, without whitespace \(e.g., "NasdaqGS"\) | +| `companyIds` | string | No | Comma-separated list of Quartr company IDs \(e.g., "4742,128"\) | +| `openfigis` | string | No | Comma-separated list of OpenFIGI codes \(figi, compositeFigi, or shareClassFigi\) | +| `updatedAfter` | string | No | Only return data updated after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `updatedBefore` | string | No | Only return data updated before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `limit` | number | No | Maximum number of items to return in a single request \(default: 10, max: 500\) | +| `cursor` | number | No | Pagination cursor from the previous response \(nextCursor\) for the next page | +| `direction` | string | No | Sort direction by id: "asc" or "desc" \(default: asc\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `companies` | array | Companies matching the filters | +| ↳ `id` | number | Quartr company ID | +| ↳ `name` | string | Legal company name | +| ↳ `displayName` | string | Display name | +| ↳ `country` | string | ISO 3166-1 alpha-2 country code | +| ↳ `tickers` | array | Ticker listings for the company | +| ↳ `ticker` | string | Ticker symbol | +| ↳ `exchange` | string | Exchange symbol | +| ↳ `isins` | array | ISINs for the company | +| ↳ `cik` | string | SEC Central Index Key | +| ↳ `openfigi` | array | OpenFIGI share class identifiers | +| ↳ `backlinkUrl` | string | Quartr backlink URL for the company | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| `nextCursor` | number | Cursor for fetching the next page of results \(null when no more pages\) | + +### `quartr_get_company` + +Retrieve a single company from Quartr by its company ID. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `companyId` | number | Yes | Quartr company ID \(e.g., 4742\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `company` | object | The requested company | +| ↳ `id` | number | Quartr company ID | +| ↳ `name` | string | Legal company name | +| ↳ `displayName` | string | Display name | +| ↳ `country` | string | ISO 3166-1 alpha-2 country code | +| ↳ `tickers` | array | Ticker listings for the company | +| ↳ `ticker` | string | Ticker symbol | +| ↳ `exchange` | string | Exchange symbol | +| ↳ `isins` | array | ISINs for the company | +| ↳ `cik` | string | SEC Central Index Key | +| ↳ `openfigi` | array | OpenFIGI share class identifiers | +| ↳ `backlinkUrl` | string | Quartr backlink URL for the company | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | + +### `quartr_list_events` + +List corporate events (earnings calls, capital markets days, etc.) from Quartr, filterable by company, event type, and date range. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `companyIds` | string | No | Comma-separated list of Quartr company IDs \(e.g., "4742,128"\) | +| `tickers` | string | No | Comma-separated list of company tickers \(e.g., "AAPL,MSFT"\) | +| `isins` | string | No | Comma-separated list of ISINs \(e.g., "US0378331005"\) | +| `ciks` | string | No | Comma-separated list of SEC CIKs \(e.g., "0000320193"\) | +| `countries` | string | No | Comma-separated list of ISO 3166-1 alpha-2 country codes \(e.g., "US,SE"\) | +| `exchanges` | string | No | Comma-separated list of exchange symbols, without whitespace \(e.g., "NasdaqGS"\) | +| `eventTypeIds` | string | No | Comma-separated list of event type IDs \(e.g., "26,27"\) | +| `startDate` | string | No | Only return events on or after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `endDate` | string | No | Only return events on or before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `sortBy` | string | No | Field to sort by: "id" or "date" \(default: id\) | +| `updatedAfter` | string | No | Only return data updated after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `updatedBefore` | string | No | Only return data updated before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `limit` | number | No | Maximum number of items to return in a single request \(default: 10, max: 500\) | +| `cursor` | number | No | Pagination cursor from the previous response \(nextCursor\) for the next page | +| `direction` | string | No | Sort direction applied to the sortBy field: "asc" or "desc" \(default: asc\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `events` | array | Events matching the filters | +| ↳ `id` | number | Quartr event ID | +| ↳ `companyId` | number | Quartr company ID | +| ↳ `title` | string | Event title \(e.g., "Q1 2024"\) | +| ↳ `date` | string | Event date \(ISO 8601\) | +| ↳ `typeId` | number | Event type ID | +| ↳ `fiscalYear` | number | Fiscal year | +| ↳ `fiscalPeriod` | string | Fiscal period \(e.g., "Q1"\) | +| ↳ `language` | string | Event language code | +| ↳ `backlinkUrl` | string | Quartr backlink URL for the event | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| `nextCursor` | number | Cursor for fetching the next page of results \(null when no more pages\) | + +### `quartr_get_event` + +Retrieve a single corporate event from Quartr by its event ID. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `eventId` | number | Yes | Quartr event ID \(e.g., 128301\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `event` | object | The requested event | +| ↳ `id` | number | Quartr event ID | +| ↳ `companyId` | number | Quartr company ID | +| ↳ `title` | string | Event title \(e.g., "Q1 2024"\) | +| ↳ `date` | string | Event date \(ISO 8601\) | +| ↳ `typeId` | number | Event type ID | +| ↳ `fiscalYear` | number | Fiscal year | +| ↳ `fiscalPeriod` | string | Fiscal period \(e.g., "Q1"\) | +| ↳ `language` | string | Event language code | +| ↳ `backlinkUrl` | string | Quartr backlink URL for the event | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | + +### `quartr_get_event_summary` + +Retrieve the AI-generated summary of a corporate event from Quartr, with selectable length and optional plain-text formatting. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `eventId` | number | Yes | Quartr event ID \(e.g., 128301\) | +| `summaryLength` | string | No | Length preset for the summary: "line", "short", or "long" \(default: short\) | +| `plainSummary` | boolean | No | Return a plain-text summary without embedded document source tags | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `summary` | string | AI-generated event summary in Markdown \(includes embedded document source tags unless a plain-text summary is requested\) | +| `sources` | array | Source documents referenced by the summary | +| ↳ `sourceId` | string | ID linking the source document to tags embedded in the summary | +| ↳ `documentId` | number | Quartr document ID of the source | +| ↳ `page` | number | Page number or timestamp in seconds depending on the document type | +| ↳ `timestamp` | number | Timestamp in seconds | +| ↳ `typeId` | number | Document type ID of the source | +| `summaryId` | number | Quartr summary ID | +| `summaryCreatedAt` | string | Summary creation timestamp \(ISO 8601\) | +| `summaryUpdatedAt` | string | Summary last update timestamp \(ISO 8601\) | + +### `quartr_list_event_types` + +List the event types available in Quartr (e.g., earnings calls), useful for filtering events by type ID. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `limit` | number | No | Maximum number of items to return in a single request \(default: 10, max: 500\) | +| `cursor` | number | No | Pagination cursor from the previous response \(nextCursor\) for the next page | +| `direction` | string | No | Sort direction by id: "asc" or "desc" \(default: asc\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `eventTypes` | array | Available event types | +| ↳ `id` | number | Event type ID | +| ↳ `name` | string | Event type name \(e.g., "Q1"\) | +| ↳ `parent` | string | Parent event type name \(e.g., "Earnings call"\) | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| `nextCursor` | number | Cursor for fetching the next page of results \(null when no more pages\) | + +### `quartr_list_documents` + +List documents of all kinds (reports, slide decks, and transcripts) from Quartr, filterable by company, event, document type, document group, and date range. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `companyIds` | string | No | Comma-separated list of Quartr company IDs \(e.g., "4742,128"\) | +| `eventIds` | string | No | Comma-separated list of Quartr event IDs \(e.g., "128301"\) | +| `tickers` | string | No | Comma-separated list of company tickers \(e.g., "AAPL,MSFT"\) | +| `isins` | string | No | Comma-separated list of ISINs \(e.g., "US0378331005"\) | +| `ciks` | string | No | Comma-separated list of SEC CIKs \(e.g., "0000320193"\) | +| `countries` | string | No | Comma-separated list of ISO 3166-1 alpha-2 country codes \(e.g., "US,SE"\) | +| `exchanges` | string | No | Comma-separated list of exchange symbols, without whitespace \(e.g., "NasdaqGS"\) | +| `documentTypeIds` | string | No | Comma-separated list of document type IDs \(e.g., "7,10"\) | +| `documentGroupIds` | string | No | Comma-separated list of document group IDs: 1 = Earnings Release, 2 = Press Release, 3 = Interim Report, 4 = Annual Report, 5 = Proxy Statement, 6 = Registration Statement | +| `startDate` | string | No | Only return documents dated on or after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `endDate` | string | No | Only return documents dated on or before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `expandEvent` | boolean | No | Include expanded event details on each document | +| `updatedAfter` | string | No | Only return data updated after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `updatedBefore` | string | No | Only return data updated before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `limit` | number | No | Maximum number of items to return in a single request \(default: 10, max: 500\) | +| `cursor` | number | No | Pagination cursor from the previous response \(nextCursor\) for the next page | +| `direction` | string | No | Sort direction by id: "asc" or "desc" \(default: asc\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `documents` | array | Documents matching the filters | +| ↳ `id` | number | Quartr document ID | +| ↳ `companyId` | number | Quartr company ID | +| ↳ `eventId` | number | Quartr event ID | +| ↳ `typeId` | number | Document type ID | +| ↳ `fileUrl` | string | URL of the document file | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| ↳ `event` | object | Expanded event details \(present when event expansion is requested\) | +| ↳ `title` | string | Event title | +| ↳ `typeId` | number | Event type ID | +| ↳ `fiscalYear` | number | Fiscal year | +| ↳ `fiscalPeriod` | string | Fiscal period \(e.g., "Q1"\) | +| ↳ `language` | string | Event language code | +| ↳ `date` | string | Event date \(ISO 8601\) | +| `nextCursor` | number | Cursor for fetching the next page of results \(null when no more pages\) | + +### `quartr_list_document_types` + +List the document types available in Quartr (e.g., 10-Q quarterly reports), useful for filtering documents by type ID. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `limit` | number | No | Maximum number of items to return in a single request \(default: 10, max: 500\) | +| `cursor` | number | No | Pagination cursor from the previous response \(nextCursor\) for the next page | +| `direction` | string | No | Sort direction by id: "asc" or "desc" \(default: asc\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `documentTypes` | array | Available document types | +| ↳ `id` | number | Document type ID | +| ↳ `name` | string | Document type name \(e.g., "Quarterly Report"\) | +| ↳ `description` | string | Document type description | +| ↳ `form` | string | Filing form \(e.g., "10-Q"\) | +| ↳ `category` | string | Document category \(e.g., "Report"\) | +| ↳ `documentGroupId` | number | Document group ID | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| `nextCursor` | number | Cursor for fetching the next page of results \(null when no more pages\) | + +### `quartr_list_reports` + +List filings and reports (10-K, 10-Q, earnings releases, etc.) from Quartr, filterable by company, event, document type, document group, and date range. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `companyIds` | string | No | Comma-separated list of Quartr company IDs \(e.g., "4742,128"\) | +| `eventIds` | string | No | Comma-separated list of Quartr event IDs \(e.g., "128301"\) | +| `tickers` | string | No | Comma-separated list of company tickers \(e.g., "AAPL,MSFT"\) | +| `isins` | string | No | Comma-separated list of ISINs \(e.g., "US0378331005"\) | +| `ciks` | string | No | Comma-separated list of SEC CIKs \(e.g., "0000320193"\) | +| `countries` | string | No | Comma-separated list of ISO 3166-1 alpha-2 country codes \(e.g., "US,SE"\) | +| `exchanges` | string | No | Comma-separated list of exchange symbols, without whitespace \(e.g., "NasdaqGS"\) | +| `documentTypeIds` | string | No | Comma-separated list of document type IDs \(e.g., "7,10"\) | +| `documentGroupIds` | string | No | Comma-separated list of document group IDs: 1 = Earnings Release, 2 = Press Release, 3 = Interim Report, 4 = Annual Report, 5 = Proxy Statement, 6 = Registration Statement | +| `startDate` | string | No | Only return documents dated on or after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `endDate` | string | No | Only return documents dated on or before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `expandEvent` | boolean | No | Include expanded event details on each document | +| `updatedAfter` | string | No | Only return data updated after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `updatedBefore` | string | No | Only return data updated before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `limit` | number | No | Maximum number of items to return in a single request \(default: 10, max: 500\) | +| `cursor` | number | No | Pagination cursor from the previous response \(nextCursor\) for the next page | +| `direction` | string | No | Sort direction by id: "asc" or "desc" \(default: asc\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `reports` | array | Reports matching the filters | +| ↳ `id` | number | Quartr document ID | +| ↳ `companyId` | number | Quartr company ID | +| ↳ `eventId` | number | Quartr event ID | +| ↳ `typeId` | number | Document type ID | +| ↳ `fileUrl` | string | URL of the document file | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| ↳ `event` | object | Expanded event details \(present when event expansion is requested\) | +| ↳ `title` | string | Event title | +| ↳ `typeId` | number | Event type ID | +| ↳ `fiscalYear` | number | Fiscal year | +| ↳ `fiscalPeriod` | string | Fiscal period \(e.g., "Q1"\) | +| ↳ `language` | string | Event language code | +| ↳ `date` | string | Event date \(ISO 8601\) | +| `nextCursor` | number | Cursor for fetching the next page of results \(null when no more pages\) | + +### `quartr_get_report` + +Retrieve a filing or report (10-K, 10-Q, earnings release, etc.) from Quartr by its document ID and download the PDF file. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `reportId` | number | Yes | Quartr document ID of the report \(e.g., 432907\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `document` | object | Report metadata | +| ↳ `id` | number | Quartr document ID | +| ↳ `companyId` | number | Quartr company ID | +| ↳ `eventId` | number | Quartr event ID | +| ↳ `typeId` | number | Document type ID | +| ↳ `fileUrl` | string | URL of the document file | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| ↳ `event` | object | Expanded event details \(present when event expansion is requested\) | +| ↳ `title` | string | Event title | +| ↳ `typeId` | number | Event type ID | +| ↳ `fiscalYear` | number | Fiscal year | +| ↳ `fiscalPeriod` | string | Fiscal period \(e.g., "Q1"\) | +| ↳ `language` | string | Event language code | +| ↳ `date` | string | Event date \(ISO 8601\) | +| `fileUrl` | string | URL of the report PDF | +| `file` | file | Downloaded report PDF stored in execution files | + +### `quartr_list_slide_decks` + +List slide presentations from Quartr, filterable by company, event, document type, document group, and date range. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `companyIds` | string | No | Comma-separated list of Quartr company IDs \(e.g., "4742,128"\) | +| `eventIds` | string | No | Comma-separated list of Quartr event IDs \(e.g., "128301"\) | +| `tickers` | string | No | Comma-separated list of company tickers \(e.g., "AAPL,MSFT"\) | +| `isins` | string | No | Comma-separated list of ISINs \(e.g., "US0378331005"\) | +| `ciks` | string | No | Comma-separated list of SEC CIKs \(e.g., "0000320193"\) | +| `countries` | string | No | Comma-separated list of ISO 3166-1 alpha-2 country codes \(e.g., "US,SE"\) | +| `exchanges` | string | No | Comma-separated list of exchange symbols, without whitespace \(e.g., "NasdaqGS"\) | +| `documentTypeIds` | string | No | Comma-separated list of document type IDs \(e.g., "7,10"\) | +| `documentGroupIds` | string | No | Comma-separated list of document group IDs: 1 = Earnings Release, 2 = Press Release, 3 = Interim Report, 4 = Annual Report, 5 = Proxy Statement, 6 = Registration Statement | +| `startDate` | string | No | Only return documents dated on or after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `endDate` | string | No | Only return documents dated on or before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `expandEvent` | boolean | No | Include expanded event details on each document | +| `updatedAfter` | string | No | Only return data updated after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `updatedBefore` | string | No | Only return data updated before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `limit` | number | No | Maximum number of items to return in a single request \(default: 10, max: 500\) | +| `cursor` | number | No | Pagination cursor from the previous response \(nextCursor\) for the next page | +| `direction` | string | No | Sort direction by id: "asc" or "desc" \(default: asc\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `slideDecks` | array | Slide decks matching the filters | +| ↳ `id` | number | Quartr document ID | +| ↳ `companyId` | number | Quartr company ID | +| ↳ `eventId` | number | Quartr event ID | +| ↳ `typeId` | number | Document type ID | +| ↳ `fileUrl` | string | URL of the document file | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| ↳ `event` | object | Expanded event details \(present when event expansion is requested\) | +| ↳ `title` | string | Event title | +| ↳ `typeId` | number | Event type ID | +| ↳ `fiscalYear` | number | Fiscal year | +| ↳ `fiscalPeriod` | string | Fiscal period \(e.g., "Q1"\) | +| ↳ `language` | string | Event language code | +| ↳ `date` | string | Event date \(ISO 8601\) | +| `nextCursor` | number | Cursor for fetching the next page of results \(null when no more pages\) | + +### `quartr_get_slide_deck` + +Retrieve a slide presentation from Quartr by its document ID and download the PDF file. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `slideDeckId` | number | Yes | Quartr document ID of the slide deck \(e.g., 432907\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `document` | object | Slide deck metadata | +| ↳ `id` | number | Quartr document ID | +| ↳ `companyId` | number | Quartr company ID | +| ↳ `eventId` | number | Quartr event ID | +| ↳ `typeId` | number | Document type ID | +| ↳ `fileUrl` | string | URL of the document file | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| ↳ `event` | object | Expanded event details \(present when event expansion is requested\) | +| ↳ `title` | string | Event title | +| ↳ `typeId` | number | Event type ID | +| ↳ `fiscalYear` | number | Fiscal year | +| ↳ `fiscalPeriod` | string | Fiscal period \(e.g., "Q1"\) | +| ↳ `language` | string | Event language code | +| ↳ `date` | string | Event date \(ISO 8601\) | +| `fileUrl` | string | URL of the slide deck PDF | +| `file` | file | Downloaded slide deck PDF stored in execution files | + +### `quartr_list_transcripts` + +List event transcripts from Quartr, filterable by company, event, document type, document group, and date range. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `companyIds` | string | No | Comma-separated list of Quartr company IDs \(e.g., "4742,128"\) | +| `eventIds` | string | No | Comma-separated list of Quartr event IDs \(e.g., "128301"\) | +| `tickers` | string | No | Comma-separated list of company tickers \(e.g., "AAPL,MSFT"\) | +| `isins` | string | No | Comma-separated list of ISINs \(e.g., "US0378331005"\) | +| `ciks` | string | No | Comma-separated list of SEC CIKs \(e.g., "0000320193"\) | +| `countries` | string | No | Comma-separated list of ISO 3166-1 alpha-2 country codes \(e.g., "US,SE"\) | +| `exchanges` | string | No | Comma-separated list of exchange symbols, without whitespace \(e.g., "NasdaqGS"\) | +| `documentTypeIds` | string | No | Comma-separated list of document type IDs \(e.g., "7,10"\) | +| `documentGroupIds` | string | No | Comma-separated list of document group IDs: 1 = Earnings Release, 2 = Press Release, 3 = Interim Report, 4 = Annual Report, 5 = Proxy Statement, 6 = Registration Statement | +| `startDate` | string | No | Only return documents dated on or after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `endDate` | string | No | Only return documents dated on or before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `expandEvent` | boolean | No | Include expanded event details on each document | +| `updatedAfter` | string | No | Only return data updated after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `updatedBefore` | string | No | Only return data updated before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `limit` | number | No | Maximum number of items to return in a single request \(default: 10, max: 500\) | +| `cursor` | number | No | Pagination cursor from the previous response \(nextCursor\) for the next page | +| `direction` | string | No | Sort direction by id: "asc" or "desc" \(default: asc\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `transcripts` | array | Transcripts matching the filters | +| ↳ `id` | number | Quartr document ID | +| ↳ `companyId` | number | Quartr company ID | +| ↳ `eventId` | number | Quartr event ID | +| ↳ `typeId` | number | Document type ID | +| ↳ `fileUrl` | string | URL of the document file | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| ↳ `event` | object | Expanded event details \(present when event expansion is requested\) | +| ↳ `title` | string | Event title | +| ↳ `typeId` | number | Event type ID | +| ↳ `fiscalYear` | number | Fiscal year | +| ↳ `fiscalPeriod` | string | Fiscal period \(e.g., "Q1"\) | +| ↳ `language` | string | Event language code | +| ↳ `date` | string | Event date \(ISO 8601\) | +| `nextCursor` | number | Cursor for fetching the next page of results \(null when no more pages\) | + +### `quartr_get_transcript` + +Retrieve an event transcript from Quartr by its document ID and download the transcript JSON file (paragraphs, sentences, timestamps, and speaker identification). + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `transcriptId` | number | Yes | Quartr document ID of the transcript \(e.g., 432907\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `document` | object | Transcript metadata | +| ↳ `id` | number | Quartr document ID | +| ↳ `companyId` | number | Quartr company ID | +| ↳ `eventId` | number | Quartr event ID | +| ↳ `typeId` | number | Document type ID | +| ↳ `fileUrl` | string | URL of the document file | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| ↳ `event` | object | Expanded event details \(present when event expansion is requested\) | +| ↳ `title` | string | Event title | +| ↳ `typeId` | number | Event type ID | +| ↳ `fiscalYear` | number | Fiscal year | +| ↳ `fiscalPeriod` | string | Fiscal period \(e.g., "Q1"\) | +| ↳ `language` | string | Event language code | +| ↳ `date` | string | Event date \(ISO 8601\) | +| `fileUrl` | string | URL of the transcript JSON file | +| `file` | file | Downloaded transcript JSON file stored in execution files | + +### `quartr_list_audio` + +List archived event audio recordings from Quartr, filterable by company, event, and date range. Returns download (MPEG) and streaming (M3U8) URLs. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `companyIds` | string | No | Comma-separated list of Quartr company IDs \(e.g., "4742,128"\) | +| `eventIds` | string | No | Comma-separated list of Quartr event IDs \(e.g., "128301"\) | +| `tickers` | string | No | Comma-separated list of company tickers \(e.g., "AAPL,MSFT"\) | +| `isins` | string | No | Comma-separated list of ISINs \(e.g., "US0378331005"\) | +| `ciks` | string | No | Comma-separated list of SEC CIKs \(e.g., "0000320193"\) | +| `countries` | string | No | Comma-separated list of ISO 3166-1 alpha-2 country codes \(e.g., "US,SE"\) | +| `exchanges` | string | No | Comma-separated list of exchange symbols, without whitespace \(e.g., "NasdaqGS"\) | +| `startDate` | string | No | Only return audio dated on or after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `endDate` | string | No | Only return audio dated on or before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `expandEvent` | boolean | No | Include expanded event details on each audio recording | +| `updatedAfter` | string | No | Only return data updated after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `updatedBefore` | string | No | Only return data updated before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `limit` | number | No | Maximum number of items to return in a single request \(default: 10, max: 500\) | +| `cursor` | number | No | Pagination cursor from the previous response \(nextCursor\) for the next page | +| `direction` | string | No | Sort direction by id: "asc" or "desc" \(default: asc\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `audioRecordings` | array | Audio recordings matching the filters | +| ↳ `id` | number | Quartr audio ID | +| ↳ `companyId` | number | Quartr company ID | +| ↳ `eventId` | number | Quartr event ID | +| ↳ `fileUrl` | string | Download URL of the audio file \(MPEG\) | +| ↳ `streamUrl` | string | Streaming URL of the audio \(M3U8\) | +| ↳ `qna` | number | Timestamp in seconds where the Q&A section starts | +| ↳ `audioMetadata` | object | Audio file metadata | +| ↳ `size` | string | File size \(e.g., "200.00 MB"\) | +| ↳ `duration` | number | Duration in seconds | +| ↳ `encoding` | string | Audio encoding | +| ↳ `mimetype` | string | Audio MIME type | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| ↳ `event` | object | Expanded event details \(present when event expansion is requested\) | +| ↳ `title` | string | Event title | +| ↳ `typeId` | number | Event type ID | +| ↳ `fiscalYear` | number | Fiscal year | +| ↳ `fiscalPeriod` | string | Fiscal period \(e.g., "Q1"\) | +| ↳ `language` | string | Event language code | +| ↳ `date` | string | Event date \(ISO 8601\) | +| `nextCursor` | number | Cursor for fetching the next page of results \(null when no more pages\) | + +### `quartr_get_audio` + +Retrieve an archived event audio recording from Quartr by its audio ID. Returns download (MPEG) and streaming (M3U8) URLs. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `audioId` | number | Yes | Quartr audio ID \(e.g., 123964\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `audio` | object | The requested audio recording | +| ↳ `id` | number | Quartr audio ID | +| ↳ `companyId` | number | Quartr company ID | +| ↳ `eventId` | number | Quartr event ID | +| ↳ `fileUrl` | string | Download URL of the audio file \(MPEG\) | +| ↳ `streamUrl` | string | Streaming URL of the audio \(M3U8\) | +| ↳ `qna` | number | Timestamp in seconds where the Q&A section starts | +| ↳ `audioMetadata` | object | Audio file metadata | +| ↳ `size` | string | File size \(e.g., "200.00 MB"\) | +| ↳ `duration` | number | Duration in seconds | +| ↳ `encoding` | string | Audio encoding | +| ↳ `mimetype` | string | Audio MIME type | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| ↳ `event` | object | Expanded event details \(present when event expansion is requested\) | +| ↳ `title` | string | Event title | +| ↳ `typeId` | number | Event type ID | +| ↳ `fiscalYear` | number | Fiscal year | +| ↳ `fiscalPeriod` | string | Fiscal period \(e.g., "Q1"\) | +| ↳ `language` | string | Event language code | +| ↳ `date` | string | Event date \(ISO 8601\) | + +### `quartr_list_live_events` + +List live and upcoming events from Quartr with live audio and transcript stream URLs, filterable by company, live state, and date range. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Quartr API key | +| `companyIds` | string | No | Comma-separated list of Quartr company IDs \(e.g., "4742,128"\) | +| `eventIds` | string | No | Comma-separated list of Quartr event IDs \(e.g., "128301"\) | +| `tickers` | string | No | Comma-separated list of company tickers \(e.g., "AAPL,MSFT"\) | +| `isins` | string | No | Comma-separated list of ISINs \(e.g., "US0378331005"\) | +| `ciks` | string | No | Comma-separated list of SEC CIKs \(e.g., "0000320193"\) | +| `countries` | string | No | Comma-separated list of ISO 3166-1 alpha-2 country codes \(e.g., "US,SE"\) | +| `exchanges` | string | No | Comma-separated list of exchange symbols, without whitespace \(e.g., "NasdaqGS"\) | +| `states` | string | No | Comma-separated list of live states to filter by: notLive, willBeLive, live, liveFailedInterrupted, liveFailedNoAccess, liveFailedNotStarted, processingRecording, processingRecordingFailed, recordingAvailable | +| `startDate` | string | No | Only return events on or after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `endDate` | string | No | Only return events on or before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `transcriptVersion` | string | No | Version of the live transcript stream: "1.6" or "1.7" \(default: 1.6\) | +| `updatedAfter` | string | No | Only return data updated after this ISO 8601 date \(e.g., "2024-01-01"\) | +| `updatedBefore` | string | No | Only return data updated before this ISO 8601 date \(e.g., "2024-12-31"\) | +| `limit` | number | No | Maximum number of items to return in a single request \(default: 10, max: 500\) | +| `cursor` | number | No | Pagination cursor from the previous response \(nextCursor\) for the next page | +| `direction` | string | No | Sort direction by id: "asc" or "desc" \(default: asc\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `liveEvents` | array | Live events matching the filters | +| ↳ `id` | number | Quartr live event ID | +| ↳ `eventId` | number | Quartr event ID | +| ↳ `companyId` | number | Quartr company ID | +| ↳ `date` | string | Scheduled event date \(ISO 8601\) | +| ↳ `wentLiveAt` | string | Timestamp when the event went live \(ISO 8601\) | +| ↳ `state` | string | Live state \(notLive, willBeLive, live, liveFailedInterrupted, liveFailedNoAccess, liveFailedNotStarted, processingRecording, processingRecordingFailed, recordingAvailable\) | +| ↳ `audio` | string | URL of the live audio stream or recording | +| ↳ `transcript` | string | URL of the live transcript stream \(JSON Lines\) | +| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) | +| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) | +| `nextCursor` | number | Cursor for fetching the next page of results \(null when no more pages\) | + + diff --git a/apps/docs/content/docs/en/integrations/temporal.mdx b/apps/docs/content/docs/en/integrations/temporal.mdx new file mode 100644 index 00000000000..f6c1d649175 --- /dev/null +++ b/apps/docs/content/docs/en/integrations/temporal.mdx @@ -0,0 +1,542 @@ +--- +title: Temporal +description: Start, signal, query, and manage Temporal workflow executions +--- + +import { BlockInfoCard } from "@/components/ui/block-info-card" + + + +{/* MANUAL-CONTENT-START:intro */} +[Temporal](https://temporal.io/) is an open-source durable execution platform that lets teams write workflows as code that survive crashes, retries, and outages. A Temporal cluster tracks every workflow execution's state and event history, so long-running business processes — order fulfillment, payment pipelines, infrastructure provisioning, human-in-the-loop approvals — run reliably for minutes or months at a time. + +With the Temporal integration in Sim, your agents can drive those durable workflows directly. Connect to any Temporal cluster that exposes the server's HTTP API (enabled by default on the frontend's HTTP port, 7243, in modern Temporal servers) and: + +- **Run workflows**: start executions with JSON input, use signal-with-start for exactly-once delivery, and set ID reuse policies, cron schedules, timeouts, memo fields, and search attributes. +- **Communicate with running workflows**: send signals, invoke update handlers and wait for their results, and run queries against live workflow state. +- **Observe executions**: describe a single execution (status, timing, pending activities), list and count executions with Temporal's visibility query language, and fetch full event histories — including just the close event to read a workflow's outcome. +- **Operate the fleet**: cancel or terminate runaway executions, reset a workflow to a previous point in its history, and manage schedules — list, describe, pause, unpause, trigger, and delete them. + +Workflow inputs and results are encoded with Temporal's standard `json/plain` payload converter, so the integration interoperates with workers written in any Temporal SDK. If your server has authentication enabled, provide an API key and Sim sends it as a Bearer token on every request. +{/* MANUAL-CONTENT-END */} + + +## Usage Instructions + +Connect to a Temporal cluster over the server's HTTP API to start workflow executions, send signals, run queries against workflow state, describe and list executions, fetch event histories, and cancel or terminate running workflows. API key only required for servers with authentication enabled. + + + +## Actions + +### `temporal_start_workflow` + +Start a new workflow execution on a Temporal cluster. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `workflowId` | string | Yes | Unique workflow ID for the new execution \(e.g., order-1234\) | +| `workflowType` | string | Yes | Registered workflow type name to run \(e.g., OrderWorkflow\) | +| `taskQueue` | string | Yes | Task queue the workflow worker polls \(e.g., orders\) | +| `input` | string | No | Workflow input as JSON. A top-level array is passed as the argument list \(one argument per element\); any other value is passed as a single argument | +| `workflowIdReusePolicy` | string | No | Policy for reusing a closed workflow ID: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE, WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY, WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE, or WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING | +| `workflowIdConflictPolicy` | string | No | Policy when a workflow with the same ID is already running: WORKFLOW_ID_CONFLICT_POLICY_FAIL, WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING, or WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING | +| `cronSchedule` | string | No | Cron schedule for recurring executions \(e.g., "0 12 * * *"\) | +| `executionTimeoutSeconds` | number | No | Total workflow execution timeout in seconds, including retries and continue-as-new | +| `runTimeoutSeconds` | number | No | Timeout for a single workflow run in seconds | +| `memo` | string | No | JSON object of memo fields to attach to the execution | +| `searchAttributes` | string | No | JSON object of search attribute values to index the execution with | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `workflowId` | string | Workflow ID of the execution | +| `runId` | string | Run ID of the started workflow execution | +| `started` | boolean | Whether a new execution was started \(false when an existing execution was reused\) | + +### `temporal_signal_workflow` + +Send a signal to a running Temporal workflow execution. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `workflowId` | string | Yes | Workflow ID of the execution to signal | +| `runId` | string | No | Run ID of a specific run to signal \(defaults to the latest run\) | +| `signalName` | string | Yes | Name of the signal handler to invoke \(e.g., approve-order\) | +| `signalInput` | string | No | Signal input as JSON. A top-level array is passed as the argument list \(one argument per element\); any other value is passed as a single argument | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `workflowId` | string | Workflow ID of the signaled execution | +| `signalName` | string | Name of the signal that was sent | + +### `temporal_signal_with_start` + +Atomically signal a Temporal workflow, starting it first if it is not already running, so the signal is never lost. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `workflowId` | string | Yes | Workflow ID to signal, or to start and signal \(e.g., order-1234\) | +| `workflowType` | string | Yes | Registered workflow type name to start if the workflow is not running | +| `taskQueue` | string | Yes | Task queue the workflow worker polls \(e.g., orders\) | +| `signalName` | string | Yes | Name of the signal handler to invoke \(e.g., approve-order\) | +| `input` | string | No | Workflow start input as JSON, used only when a new execution is started. A top-level array is passed as the argument list; any other value is passed as a single argument | +| `signalInput` | string | No | Signal input as JSON. A top-level array is passed as the argument list \(one argument per element\); any other value is passed as a single argument | +| `workflowIdReusePolicy` | string | No | Policy for reusing a closed workflow ID: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE, WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY, WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE, or WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING | +| `workflowIdConflictPolicy` | string | No | Policy when a workflow with the same ID is already running \(defaults to using the existing run\): WORKFLOW_ID_CONFLICT_POLICY_FAIL, WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING, or WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING | +| `cronSchedule` | string | No | Cron schedule for recurring executions \(e.g., "0 12 * * *"\) | +| `executionTimeoutSeconds` | number | No | Total workflow execution timeout in seconds, including retries and continue-as-new | +| `runTimeoutSeconds` | number | No | Timeout for a single workflow run in seconds | +| `memo` | string | No | JSON object of memo fields to attach to the execution | +| `searchAttributes` | string | No | JSON object of search attribute values to index the execution with | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `workflowId` | string | Workflow ID of the signaled execution | +| `runId` | string | Run ID of the signaled \(or newly started\) execution | +| `started` | boolean | Whether this call started a new execution \(false when only signaled\) | + +### `temporal_query_workflow` + +Run a synchronous query against the state of a Temporal workflow execution and return the result. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `workflowId` | string | Yes | Workflow ID of the execution to query | +| `runId` | string | No | Run ID of a specific run to query \(defaults to the latest run\) | +| `queryType` | string | Yes | Name of the query handler to invoke \(e.g., getStatus\) | +| `queryArgs` | string | No | Query arguments as JSON. A top-level array is passed as the argument list \(one argument per element\); any other value is passed as a single argument | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `workflowId` | string | Workflow ID of the queried execution | +| `queryType` | string | Name of the query that was run | +| `result` | json | Decoded query result. A single payload is returned as its JSON value; multiple payloads are returned as an array | + +### `temporal_update_workflow` + +Invoke an update handler on a running Temporal workflow and wait for its result. Unlike a signal, an update is validated by the workflow and returns a response. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `workflowId` | string | Yes | Workflow ID of the execution to update | +| `runId` | string | No | Run ID of a specific run to update \(defaults to the latest run\) | +| `updateName` | string | Yes | Name of the update handler to invoke \(e.g., addItem\) | +| `updateArgs` | string | No | Update arguments as JSON. A top-level array is passed as the argument list \(one argument per element\); any other value is passed as a single argument | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `workflowId` | string | Workflow ID of the updated execution | +| `updateName` | string | Name of the update that was invoked | +| `result` | json | Decoded update result. A single payload is returned as its JSON value; multiple payloads are returned as an array | + +### `temporal_describe_workflow` + +Get the current state of a Temporal workflow execution, including status, timing, memo, search attributes, and pending activities. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `workflowId` | string | Yes | Workflow ID of the execution to describe | +| `runId` | string | No | Run ID of a specific run to describe \(defaults to the latest run\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `workflowId` | string | Workflow ID of the execution | +| `runId` | string | Run ID of the execution | +| `workflowType` | string | Workflow type name | +| `status` | string | Execution status \(RUNNING, COMPLETED, FAILED, CANCELED, TERMINATED, CONTINUED_AS_NEW, or TIMED_OUT\) | +| `startTime` | string | Start time of the execution \(RFC 3339\) | +| `closeTime` | string | Close time of the execution \(RFC 3339\), null while running | +| `executionTime` | string | Effective execution start time \(RFC 3339\), e.g. the first cron run time | +| `historyLength` | number | Number of events in the workflow history | +| `taskQueue` | string | Task queue of the execution | +| `memo` | json | Decoded memo fields attached to the execution | +| `searchAttributes` | json | Decoded search attribute values | +| `pendingActivities` | array | Activities currently pending on the execution | +| ↳ `activityId` | string | Activity ID | +| ↳ `activityType` | string | Activity type name | +| ↳ `state` | string | Pending state \(SCHEDULED, STARTED, CANCEL_REQUESTED, PAUSED, or PAUSE_REQUESTED\) | +| ↳ `attempt` | number | Current attempt number | +| ↳ `lastFailureMessage` | string | Message of the most recent failure, if the activity is retrying | + +### `temporal_list_workflows` + +List workflow executions in a Temporal namespace, optionally filtered with a visibility query. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `query` | string | No | Visibility list filter, e.g. WorkflowType = "OrderWorkflow" AND ExecutionStatus = "Running" \(empty lists all executions\) | +| `pageSize` | number | No | Maximum number of executions to return per page | +| `nextPageToken` | string | No | Page token from a previous response, for pagination | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `executions` | array | Workflow executions matching the query | +| ↳ `workflowId` | string | Workflow ID of the execution | +| ↳ `runId` | string | Run ID of the execution | +| ↳ `workflowType` | string | Workflow type name | +| ↳ `status` | string | Execution status \(RUNNING, COMPLETED, FAILED, CANCELED, TERMINATED, CONTINUED_AS_NEW, or TIMED_OUT\) | +| ↳ `startTime` | string | Start time of the execution \(RFC 3339\) | +| ↳ `closeTime` | string | Close time of the execution \(RFC 3339\), null while running | +| ↳ `executionTime` | string | Effective execution start time \(RFC 3339\) | +| ↳ `historyLength` | number | Number of events in the workflow history | +| ↳ `taskQueue` | string | Task queue of the execution | +| `nextPageToken` | string | Token for the next page of results, null when no more pages exist | + +### `temporal_count_workflows` + +Count workflow executions in a Temporal namespace matching a visibility query, with optional GROUP BY aggregation. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `query` | string | No | Visibility count filter, e.g. ExecutionStatus = "Running" or ... GROUP BY ExecutionStatus \(empty counts all executions\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `count` | number | Number of workflow executions matching the query | +| `groups` | array | Per-group counts when the query uses GROUP BY \(empty otherwise\) | +| ↳ `values` | json | Decoded values of the GROUP BY fields | +| ↳ `count` | number | Number of executions in the group | + +### `temporal_get_workflow_history` + +Fetch the event history of a Temporal workflow execution, optionally filtered to just the close event. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `workflowId` | string | Yes | Workflow ID of the execution | +| `runId` | string | No | Run ID of a specific run \(defaults to the latest run\) | +| `maximumPageSize` | number | No | Maximum number of history events to return per page | +| `nextPageToken` | string | No | Page token from a previous response, for pagination | +| `historyEventFilterType` | string | No | Event filter: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT \(default\) or HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT to return only the final close event | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `events` | array | History events of the workflow execution, in order | +| ↳ `eventId` | number | Sequential ID of the event | +| ↳ `eventTime` | string | Time the event was recorded \(RFC 3339\) | +| ↳ `eventType` | string | Event type \(e.g., WORKFLOW_EXECUTION_STARTED, ACTIVITY_TASK_COMPLETED\) | +| ↳ `attributes` | json | The event's type-specific attributes \(payload data is base64-encoded\) | +| `nextPageToken` | string | Token for the next page of events, null when no more pages exist | + +### `temporal_cancel_workflow` + +Request cooperative cancellation of a running Temporal workflow execution. The workflow decides how to respond to the request. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `workflowId` | string | Yes | Workflow ID of the execution to cancel | +| `runId` | string | No | Run ID of a specific run to cancel \(defaults to the latest run\) | +| `reason` | string | No | Reason for the cancellation, recorded in the workflow history | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `workflowId` | string | Workflow ID of the execution whose cancellation was requested | + +### `temporal_terminate_workflow` + +Forcefully terminate a Temporal workflow execution immediately, without giving the workflow a chance to react. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `workflowId` | string | Yes | Workflow ID of the execution to terminate | +| `runId` | string | No | Run ID of a specific run to terminate \(defaults to the latest run\) | +| `reason` | string | No | Reason for the termination, recorded in the workflow history | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `workflowId` | string | Workflow ID of the terminated execution | + +### `temporal_reset_workflow` + +Reset a Temporal workflow execution to a past workflow task, terminating the current run and replaying from the reset point in a new run. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `workflowId` | string | Yes | Workflow ID of the execution to reset | +| `runId` | string | No | Run ID of a specific run to reset \(defaults to the latest run\) | +| `workflowTaskFinishEventId` | number | Yes | Event ID of the workflow task finish event to reset to — a WORKFLOW_TASK_COMPLETED, WORKFLOW_TASK_TIMED_OUT, WORKFLOW_TASK_FAILED, or WORKFLOW_TASK_STARTED event \(find it with Get Workflow History\) | +| `reason` | string | No | Reason for the reset, recorded in the workflow history | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `workflowId` | string | Workflow ID of the reset execution | +| `runId` | string | Run ID of the new run created by the reset | + +### `temporal_describe_task_queue` + +List the workers currently polling a Temporal task queue, to check whether a workflow or activity has live workers. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `taskQueue` | string | Yes | Name of the task queue to describe \(e.g., orders\) | +| `taskQueueType` | string | No | Type of pollers to list: TASK_QUEUE_TYPE_WORKFLOW \(default\) or TASK_QUEUE_TYPE_ACTIVITY | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `taskQueue` | string | Name of the described task queue | +| `pollers` | array | Workers currently polling the task queue \(empty when no workers are running\) | +| ↳ `identity` | string | Identity of the polling worker | +| ↳ `lastAccessTime` | string | Last time the worker polled the queue \(RFC 3339\) | +| ↳ `ratePerSecond` | number | Poller rate per second | + +### `temporal_create_schedule` + +Create a Temporal schedule that starts a workflow on a cron or interval cadence. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `scheduleId` | string | Yes | Unique ID for the new schedule \(e.g., nightly-report\) | +| `workflowId` | string | Yes | Workflow ID for started workflows \(the schedule appends the run time to keep IDs unique\) | +| `workflowType` | string | Yes | Registered workflow type name the schedule starts \(e.g., ReportWorkflow\) | +| `taskQueue` | string | Yes | Task queue the workflow worker polls \(e.g., reports\) | +| `input` | string | No | Workflow input as JSON. A top-level array is passed as the argument list \(one argument per element\); any other value is passed as a single argument | +| `cronExpressions` | string | No | Cron expressions defining when the schedule fires, comma- or newline-separated for multiple \(e.g., "0 12 * * *"\). At least one of cronExpressions or intervalSeconds is required | +| `intervalSeconds` | number | No | Fixed interval between actions in seconds. At least one of cronExpressions or intervalSeconds is required | +| `timezone` | string | No | IANA time zone for cron evaluation \(e.g., America/New_York; defaults to UTC\) | +| `overlapPolicy` | string | No | Policy when an action would overlap a still-running one \(defaults to skip\): SCHEDULE_OVERLAP_POLICY_SKIP, SCHEDULE_OVERLAP_POLICY_BUFFER_ONE, SCHEDULE_OVERLAP_POLICY_BUFFER_ALL, SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER, SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER, or SCHEDULE_OVERLAP_POLICY_ALLOW_ALL | +| `notes` | string | No | Human-readable notes stored on the schedule | +| `paused` | boolean | No | Create the schedule in a paused state \(defaults to active\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `scheduleId` | string | ID of the created schedule | + +### `temporal_list_schedules` + +List schedules in a Temporal namespace. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `query` | string | No | Visibility filter over schedules, e.g. TemporalSchedulePaused = false \(empty lists all schedules\) | +| `maximumPageSize` | number | No | Maximum number of schedules to return per page | +| `nextPageToken` | string | No | Page token from a previous response, for pagination | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `schedules` | array | Schedules in the namespace | +| ↳ `scheduleId` | string | Schedule ID | +| ↳ `workflowType` | string | Workflow type the schedule starts | +| ↳ `paused` | boolean | Whether the schedule is paused | +| ↳ `notes` | string | Human-readable notes on the schedule | +| ↳ `futureActionTimes` | json | Upcoming action times \(RFC 3339\) | +| `nextPageToken` | string | Token for the next page of results, null when no more pages exist | + +### `temporal_describe_schedule` + +Get the configuration and current state of a Temporal schedule, including its spec, recent actions, and upcoming run times. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `scheduleId` | string | Yes | ID of the schedule to describe | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `scheduleId` | string | Schedule ID | +| `paused` | boolean | Whether the schedule is paused | +| `notes` | string | Human-readable notes on the schedule | +| `workflowType` | string | Workflow type the schedule starts | +| `taskQueue` | string | Task queue used for started workflows | +| `workflowId` | string | Workflow ID template for started workflows | +| `spec` | json | Schedule spec \(calendars, intervals, cron strings, jitter, time zone\) | +| `recentActions` | array | Most recent actions taken by the schedule | +| ↳ `scheduleTime` | string | Nominal scheduled time \(RFC 3339\) | +| ↳ `actualTime` | string | Actual time the action ran \(RFC 3339\) | +| ↳ `workflowId` | string | Workflow ID of the started execution | +| ↳ `runId` | string | Run ID of the started execution | +| `futureActionTimes` | json | Upcoming action times \(RFC 3339\) | + +### `temporal_pause_schedule` + +Pause a Temporal schedule so it stops taking actions until unpaused. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `scheduleId` | string | Yes | ID of the schedule to pause | +| `reason` | string | No | Reason recorded in the schedule's notes | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `scheduleId` | string | ID of the paused schedule | + +### `temporal_unpause_schedule` + +Unpause a Temporal schedule so it resumes taking actions. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `scheduleId` | string | Yes | ID of the schedule to unpause | +| `reason` | string | No | Reason recorded in the schedule's notes | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `scheduleId` | string | ID of the unpaused schedule | + +### `temporal_trigger_schedule` + +Trigger an immediate action of a Temporal schedule, outside its normal spec. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `scheduleId` | string | Yes | ID of the schedule to trigger | +| `overlapPolicy` | string | No | Overlap policy for the triggered action \(defaults to the schedule's policy\): SCHEDULE_OVERLAP_POLICY_SKIP, SCHEDULE_OVERLAP_POLICY_BUFFER_ONE, SCHEDULE_OVERLAP_POLICY_BUFFER_ALL, SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER, SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER, or SCHEDULE_OVERLAP_POLICY_ALLOW_ALL | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `scheduleId` | string | ID of the triggered schedule | + +### `temporal_delete_schedule` + +Delete a Temporal schedule. Workflows already started by the schedule keep running. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `serverUrl` | string | Yes | Base URL of the Temporal server's HTTP API \(e.g., http://localhost:7243\) | +| `namespace` | string | Yes | Temporal namespace \(e.g., default\) | +| `apiKey` | string | No | API key sent as a Bearer token \(leave blank for servers without auth\) | +| `scheduleId` | string | Yes | ID of the schedule to delete | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `scheduleId` | string | ID of the deleted schedule | + + diff --git a/apps/docs/content/docs/en/integrations/trigger_dev.mdx b/apps/docs/content/docs/en/integrations/trigger_dev.mdx new file mode 100644 index 00000000000..d15eedf5965 --- /dev/null +++ b/apps/docs/content/docs/en/integrations/trigger_dev.mdx @@ -0,0 +1,1917 @@ +--- +title: Trigger.dev +description: Trigger tasks and manage runs and schedules +--- + +import { BlockInfoCard } from "@/components/ui/block-info-card" + + + +{/* MANUAL-CONTENT-START:intro */} +[Trigger.dev](https://trigger.dev/) is an open-source platform for running background jobs and AI workloads. You write tasks in plain TypeScript, deploy them to Trigger.dev, and get durable runs with automatic retries, queues, cron schedules, and full observability — no servers or infrastructure to manage. + +With Trigger.dev, you can: + +- **Trigger tasks on demand**: Start a background task with any JSON payload and get back a run ID to track it +- **Batch trigger at scale**: Kick off up to 1,000 runs of a task in a single request +- **Track and control runs**: Retrieve a run's status, payload, output, and attempts; list and filter runs; cancel, replay, or reschedule them +- **Run tasks on a schedule**: Create, update, activate, and deactivate cron schedules with timezone support +- **Manage environment variables**: List, create, read, update, and delete env vars across dev, staging, and prod +- **Control queues**: Inspect queue depth and concurrency, and pause or resume queues during incidents + +In Sim, the Trigger.dev integration lets your agents drive this entire lifecycle. An agent can trigger a deployed task with a payload, poll the run until it completes and use its output downstream, monitor for failed runs and replay the transient ones, manage per-customer cron schedules, and pause a queue when something goes wrong. Connect it with a project-scoped secret API key (starts with `tr_`) — the key determines which environment the runs, schedules, and queues belong to. This makes Sim a natural control plane for the background jobs that power your product. + +Note: the environment variable operations (List Env Vars, Get Env Var) return variable values in plaintext, and those values appear in workflow outputs and run history. Scope workflows that read environment variables carefully. +{/* MANUAL-CONTENT-END */} + + +## Usage Instructions + +Integrate Trigger.dev into the workflow. Trigger and batch trigger background tasks, retrieve and control runs (cancel, replay, reschedule, tags, metadata, events, traces), manage cron schedules, environment variables, queues, deployments, and waitpoint tokens, and query run data with TRQL. + + + +## Actions + +### `trigger_dev_trigger_task` + +Trigger a Trigger.dev task by its identifier with an optional JSON payload. Returns the ID of the created run. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `taskIdentifier` | string | Yes | Identifier of the task to trigger \(e.g., "send-welcome-email"\) | +| `payload` | json | No | JSON payload passed to the task run. Example: \{"userId": "user_123"\} | +| `idempotencyKey` | string | No | Idempotency key that ensures the task is only triggered once per key | +| `queue` | string | No | Name of the queue to run the task on | +| `concurrencyKey` | string | No | Key that scopes the queue concurrency limit \(e.g., a user ID\) | +| `delay` | string | No | Delay before the run executes, as a duration \("30m", "1h", "2d"\) or an ISO 8601 date | +| `ttl` | string | No | Time-to-live before an unstarted run expires, as a duration \("1h42m"\) or seconds | +| `machine` | string | No | Machine preset for the run: micro, small-1x, small-2x, medium-1x, medium-2x, large-1x, or large-2x | +| `tags` | string | No | Comma-separated tags to attach to the run \(max 10, each under 128 characters\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | ID of the run that was triggered \(starts with run_\) | + +### `trigger_dev_batch_trigger_task` + +Batch trigger a Trigger.dev task with up to 1,000 payloads. All items in the batch run the same task. Returns the batch ID and the created run IDs. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `taskIdentifier` | string | Yes | Identifier of the task to batch trigger \(e.g., "send-welcome-email"\) | +| `items` | json | Yes | JSON array of batch items \(max 1,000\). Each item is an object with a "payload" and optional "options" \(queue, concurrencyKey, idempotencyKey, ttl, delay, tags, machine\). Example: \[\{"payload": \{"userId": "user_1"\}\}, \{"payload": \{"userId": "user_2"\}, "options": \{"delay": "1h"\}\}\] | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `batchId` | string | ID of the batch that was triggered | +| `runIds` | array | IDs of the runs created by the batch | + +### `trigger_dev_get_batch` + +Retrieve a Trigger.dev batch by its ID, including its status, run IDs, and success and failure counts. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `batchId` | string | Yes | ID of the batch to retrieve \(starts with batch_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | ID of the batch \(starts with batch_\) | +| `status` | string | Batch status \(PENDING, PROCESSING, COMPLETED, PARTIAL_FAILED, or ABORTED\) | +| `idempotencyKey` | string | Idempotency key provided when triggering the batch | +| `createdAt` | string | ISO timestamp when the batch was created | +| `updatedAt` | string | ISO timestamp when the batch was last updated | +| `runCount` | number | Total number of runs in the batch | +| `runIds` | array | IDs of the runs in the batch | +| `successfulRunCount` | number | Number of successful runs, populated after completion | +| `failedRunCount` | number | Number of failed runs, populated after completion | +| `errors` | array | Error details for failed items, present for PARTIAL_FAILED batches | +| ↳ `index` | number | Index of the failed item | +| ↳ `taskIdentifier` | string | Task identifier of the failed item | +| ↳ `error` | json | Error details | +| ↳ `errorCode` | string | Optional error code | + +### `trigger_dev_get_batch_results` + +Retrieve the execution results of every run in a Trigger.dev batch, including outputs and error details. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `batchId` | string | Yes | ID of the batch to retrieve results for \(starts with batch_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | ID of the batch \(starts with batch_\) | +| `items` | array | Execution results for each run in the batch | + +### `trigger_dev_get_run` + +Retrieve a Trigger.dev run by its ID, including status, payload, output, attempts, and timing details. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `runId` | string | Yes | ID of the run to retrieve \(starts with run_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_get_run_result` + +Retrieve the result of a Trigger.dev run: whether it succeeded, its output, and error details. Lighter than Get Run when only the outcome is needed. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `runId` | string | Yes | ID of the run to retrieve the result for \(starts with run_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_get_run_events` + +Retrieve the log and span events of a Trigger.dev run, including messages, levels, durations, and error events. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `runId` | string | Yes | ID of the run to retrieve events for \(starts with run_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `events` | array | Log and span events recorded during the run | +| ↳ `spanId` | string | Span ID of the event | +| ↳ `parentId` | string | Parent span ID | +| ↳ `runId` | string | Run ID associated with the event | +| ↳ `message` | string | Event message | +| ↳ `startTime` | string | Start time as a bigint string \(nanoseconds since epoch\) | +| ↳ `duration` | number | Duration of the event in nanoseconds | +| ↳ `isError` | boolean | Whether the event represents an error | +| ↳ `isPartial` | boolean | Whether the event is still in progress | +| ↳ `isCancelled` | boolean | Whether the event was cancelled | +| ↳ `level` | string | Log level \(TRACE, DEBUG, LOG, INFO, WARN, or ERROR\) | +| ↳ `kind` | string | Kind of span event | +| ↳ `attemptNumber` | number | Attempt number the event belongs to | +| ↳ `taskSlug` | string | Task identifier | +| ↳ `events` | array | Span events \(e.g., exceptions\) that occurred during this event | +| ↳ `name` | string | Event name | +| ↳ `time` | string | When the event occurred | + +### `trigger_dev_get_run_trace` + +Retrieve the OpenTelemetry trace of a Trigger.dev run as a tree of spans with timing, errors, and nested children. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `runId` | string | Yes | ID of the run to retrieve the trace for \(starts with run_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `traceId` | string | OpenTelemetry trace ID of the run | +| `rootSpan` | json | Root span of the trace; each span has id, parentId, runId, data \(message, taskSlug, startTime, duration, isError, level, events\), and recursively nested children spans | + +### `trigger_dev_list_runs` + +List Trigger.dev runs in the environment of the API key, with optional filters for status, task, version, tags, schedule, and creation time. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `status` | string | No | Comma-separated run statuses to filter by: PENDING_VERSION, DELAYED, QUEUED, EXECUTING, REATTEMPTING, FROZEN, COMPLETED, CANCELED, FAILED, CRASHED, INTERRUPTED, SYSTEM_FAILURE | +| `taskIdentifier` | string | No | Comma-separated task identifiers to filter by | +| `version` | string | No | Comma-separated worker versions to filter by \(e.g., "20240101.1"\) | +| `tag` | string | No | Comma-separated tags to filter by | +| `schedule` | string | No | Schedule ID to filter by \(starts with sched_\) | +| `isTest` | string | No | Filter by test runs: "true" for only test runs, "false" to exclude them | +| `period` | string | No | Only return runs created in the given period \(e.g., "1h", "7d"\) | +| `from` | string | No | Only return runs created on or after this ISO 8601 timestamp | +| `to` | string | No | Only return runs created on or before this ISO 8601 timestamp | +| `pageSize` | number | No | Number of runs per page \(max 100, default 25\) | +| `pageAfter` | string | No | Run ID to start the page after, for forward pagination | +| `pageBefore` | string | No | Run ID to start the page before, for backward pagination | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `runs` | array | Runs matching the filters | +| `pagination` | object | Cursor pagination details | +| ↳ `next` | string | Run ID to start the next page after | +| ↳ `previous` | string | Run ID to start the previous page before | + +### `trigger_dev_cancel_run` + +Cancel an in-progress Trigger.dev run. Has no effect if the run is already completed. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `runId` | string | Yes | ID of the run to cancel \(starts with run_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | ID of the run that was canceled | + +### `trigger_dev_replay_run` + +Replay a Trigger.dev run, creating a new run with the same payload and options as the original. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `runId` | string | Yes | ID of the run to replay \(starts with run_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | ID of the new run created by the replay | + +### `trigger_dev_reschedule_run` + +Reschedule a delayed Trigger.dev run with a new delay. Only valid while the run is in the DELAYED state. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `runId` | string | Yes | ID of the delayed run to reschedule \(starts with run_\) | +| `delay` | string | Yes | New delay for the run, as a duration \("30m", "1h", "2d"\) or an ISO 8601 date to delay until | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_add_run_tags` + +Add tags to an existing Trigger.dev run. Runs can have up to 10 tags. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `runId` | string | Yes | ID of the run to tag \(starts with run_\) | +| `tags` | string | Yes | Comma-separated tags to add to the run \(max 10 total, each under 128 characters\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `message` | string | Confirmation message for the added tags | + +### `trigger_dev_update_run_metadata` + +Replace the metadata of a Trigger.dev run with a new JSON object. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `runId` | string | Yes | ID of the run to update \(starts with run_\) | +| `metadata` | json | Yes | JSON object to set as the run metadata. Example: \{"stage": "approved"\} | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `metadata` | json | The updated metadata of the run | + +### `trigger_dev_create_schedule` + +Create an imperative cron schedule that triggers a Trigger.dev task on a recurring basis. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `task` | string | Yes | Identifier of the task to schedule \(e.g., "daily-report"\) | +| `cron` | string | Yes | Cron expression defining when the task runs \(e.g., "0 0 * * *"\) | +| `timezone` | string | No | IANA timezone the cron expression is evaluated in \(e.g., "America/New_York"\). Defaults to UTC | +| `externalId` | string | No | External identifier to associate with the schedule \(e.g., a user ID\) | +| `deduplicationKey` | string | Yes | Key that prevents duplicate schedules; creating again with the same key updates the existing schedule | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_get_schedule` + +Retrieve a Trigger.dev schedule by its ID. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `scheduleId` | string | Yes | ID of the schedule to retrieve \(starts with sched_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_list_schedules` + +List Trigger.dev schedules in the project, with page-based pagination. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `page` | number | No | Page number to return \(default 1\) | +| `perPage` | number | No | Number of schedules per page | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `schedules` | array | Schedules in the project | +| ↳ `id` | string | Unique ID of the schedule \(starts with sched_\) | +| ↳ `task` | string | Identifier of the task the schedule triggers | +| ↳ `type` | string | Schedule type \(DECLARATIVE or IMPERATIVE\) | +| ↳ `active` | boolean | Whether the schedule is active | +| ↳ `deduplicationKey` | string | Deduplication key of the schedule | +| ↳ `externalId` | string | External ID associated with the schedule | +| ↳ `cron` | string | Cron expression of the schedule | +| ↳ `cronDescription` | string | Human-readable description of the cron expression | +| ↳ `timezone` | string | IANA timezone of the schedule | +| ↳ `nextRun` | string | ISO timestamp of the next scheduled run | +| ↳ `environments` | array | Environments the schedule runs in | +| ↳ `id` | string | Environment ID | +| ↳ `type` | string | Environment type | +| ↳ `userName` | string | Username for dev environments | +| `pagination` | object | Page-based pagination details | +| ↳ `currentPage` | number | Current page number | +| ↳ `totalPages` | number | Total number of pages | +| ↳ `count` | number | Total number of schedules | + +### `trigger_dev_update_schedule` + +Update an imperative Trigger.dev schedule by its ID, replacing its task, cron expression, timezone, and external ID. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `scheduleId` | string | Yes | ID of the schedule to update \(starts with sched_\) | +| `task` | string | Yes | Identifier of the task the schedule triggers \(e.g., "daily-report"\) | +| `cron` | string | Yes | Cron expression defining when the task runs \(e.g., "0 0 * * *"\) | +| `timezone` | string | No | IANA timezone the cron expression is evaluated in \(e.g., "America/New_York"\). Defaults to UTC | +| `externalId` | string | No | External identifier to associate with the schedule \(e.g., a user ID\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_delete_schedule` + +Delete an imperative Trigger.dev schedule by its ID. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `scheduleId` | string | Yes | ID of the schedule to delete \(starts with sched_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `deleted` | boolean | Whether the schedule was deleted | +| `scheduleId` | string | ID of the schedule that was deleted | + +### `trigger_dev_activate_schedule` + +Activate an imperative Trigger.dev schedule so it resumes triggering its task. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `scheduleId` | string | Yes | ID of the schedule to activate \(starts with sched_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_deactivate_schedule` + +Deactivate an imperative Trigger.dev schedule so it stops triggering its task. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `scheduleId` | string | Yes | ID of the schedule to deactivate \(starts with sched_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_list_env_vars` + +List the environment variables of a Trigger.dev project environment. Values are returned in plaintext and will appear in workflow outputs and run history — scope this operation carefully. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `projectRef` | string | Yes | External ref of the project, from the project settings \(starts with proj_\) | +| `environment` | string | Yes | Environment to list variables for: dev, staging, or prod | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `variables` | array | Environment variables in the project environment | +| ↳ `name` | string | Name of the environment variable | +| ↳ `value` | string | Plaintext value of the environment variable; appears in workflow outputs and run history | + +### `trigger_dev_create_env_var` + +Create an environment variable in a Trigger.dev project environment. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `projectRef` | string | Yes | External ref of the project, from the project settings \(starts with proj_\) | +| `environment` | string | Yes | Environment to create the variable in: dev, staging, or prod | +| `name` | string | Yes | Name of the environment variable \(e.g., "SLACK_API_KEY"\) | +| `value` | string | Yes | Value of the environment variable | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `success` | boolean | Whether the environment variable was created | +| `name` | string | Name of the environment variable that was created | + +### `trigger_dev_get_env_var` + +Retrieve an environment variable from a Trigger.dev project environment. The value is returned in plaintext and will appear in workflow outputs and run history. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `projectRef` | string | Yes | External ref of the project, from the project settings \(starts with proj_\) | +| `environment` | string | Yes | Environment to read the variable from: dev, staging, or prod | +| `name` | string | Yes | Name of the environment variable \(e.g., "SLACK_API_KEY"\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `name` | string | Name of the environment variable | +| `value` | string | Plaintext value of the environment variable; appears in workflow outputs and run history | + +### `trigger_dev_update_env_var` + +Update the value of an environment variable in a Trigger.dev project environment. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `projectRef` | string | Yes | External ref of the project, from the project settings \(starts with proj_\) | +| `environment` | string | Yes | Environment the variable belongs to: dev, staging, or prod | +| `name` | string | Yes | Name of the environment variable to update \(e.g., "SLACK_API_KEY"\) | +| `value` | string | Yes | New value of the environment variable | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `success` | boolean | Whether the environment variable was updated | +| `name` | string | Name of the environment variable that was updated | + +### `trigger_dev_delete_env_var` + +Delete an environment variable from a Trigger.dev project environment. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `projectRef` | string | Yes | External ref of the project, from the project settings \(starts with proj_\) | +| `environment` | string | Yes | Environment the variable belongs to: dev, staging, or prod | +| `name` | string | Yes | Name of the environment variable to delete \(e.g., "SLACK_API_KEY"\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `success` | boolean | Whether the environment variable was deleted | +| `name` | string | Name of the environment variable that was deleted | + +### `trigger_dev_import_env_vars` + +Upload multiple environment variables to a Trigger.dev project environment in one request. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `projectRef` | string | Yes | External ref of the project, from the project settings \(starts with proj_\) | +| `environment` | string | Yes | Environment to upload the variables to: dev, staging, or prod | +| `variables` | json | Yes | JSON array of environment variables to upload. Example: \[\{"name": "SLACK_API_KEY", "value": "slack_123"\}\] | +| `override` | string | No | Whether to override existing variables: "true" or "false" \(default false\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `success` | boolean | Whether the environment variables were uploaded | +| `count` | number | Number of environment variables submitted | + +### `trigger_dev_get_queue` + +Retrieve a Trigger.dev queue by ID, task identifier, or custom queue name, including its running and queued counts. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `queueName` | string | Yes | Queue ID \(starts with queue_\), task identifier, or custom queue name, depending on the queue type | +| `queueType` | string | No | How to interpret the queue name: "id" \(default\) for a queue ID, "task" for a task identifier, or "custom" for a custom queue name | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_list_queues` + +List the queues in the environment of the API key, including running and queued counts, with page-based pagination. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `page` | number | No | Page number to return \(default 1\) | +| `perPage` | number | No | Number of queues per page | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `queues` | array | Queues in the environment | +| ↳ `id` | string | Unique ID of the queue \(starts with queue_\) | +| ↳ `name` | string | Name of the queue | +| ↳ `type` | string | Queue type \(task for task-default queues, custom for named queues\) | +| ↳ `running` | number | Number of runs currently executing | +| ↳ `queued` | number | Number of runs waiting in the queue | +| ↳ `paused` | boolean | Whether the queue is paused | +| ↳ `concurrencyLimit` | number | Maximum number of runs that can execute concurrently | +| ↳ `concurrency` | object | Concurrency details for the queue | +| ↳ `current` | number | Current concurrency limit | +| ↳ `base` | number | Base concurrency limit | +| ↳ `override` | number | Overridden concurrency limit | +| ↳ `overriddenAt` | string | ISO timestamp when the concurrency limit was overridden | +| `pagination` | object | Page-based pagination details | +| ↳ `currentPage` | number | Current page number | +| ↳ `totalPages` | number | Total number of pages | +| ↳ `count` | number | Total number of queues | + +### `trigger_dev_pause_queue` + +Pause a Trigger.dev queue so no new runs start. Runs that are currently executing continue to completion. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `queueName` | string | Yes | Queue ID \(starts with queue_\), task identifier, or custom queue name, depending on the queue type | +| `queueType` | string | No | How to interpret the queue name: "id" \(default\) for a queue ID, "task" for a task identifier, or "custom" for a custom queue name | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_resume_queue` + +Resume a paused Trigger.dev queue so new runs can start again. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `queueName` | string | Yes | Queue ID \(starts with queue_\), task identifier, or custom queue name, depending on the queue type | +| `queueType` | string | No | How to interpret the queue name: "id" \(default\) for a queue ID, "task" for a task identifier, or "custom" for a custom queue name | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_override_queue_concurrency` + +Override the concurrency limit of a Trigger.dev queue with a new value. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `queueName` | string | Yes | Queue ID \(starts with queue_\), task identifier, or custom queue name, depending on the queue type | +| `queueType` | string | No | How to interpret the queue name: "id" \(default\) for a queue ID, "task" for a task identifier, or "custom" for a custom queue name | +| `concurrencyLimit` | number | Yes | New concurrency limit for the queue \(0 to 100000\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_reset_queue_concurrency` + +Reset the concurrency limit of a Trigger.dev queue back to its base value, removing any override. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `queueName` | string | Yes | Queue ID \(starts with queue_\), task identifier, or custom queue name, depending on the queue type | +| `queueType` | string | No | How to interpret the queue name: "id" \(default\) for a queue ID, "task" for a task identifier, or "custom" for a custom queue name | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_list_deployments` + +List Trigger.dev deployments in the environment of the API key, with optional status and creation-time filters. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `status` | string | No | Deployment status to filter by: PENDING, BUILDING, DEPLOYING, DEPLOYED, FAILED, CANCELED, or TIMED_OUT | +| `period` | string | No | Only return deployments created in the given period \(e.g., "1h", "7d"\) | +| `from` | string | No | Only return deployments created on or after this ISO 8601 timestamp | +| `to` | string | No | Only return deployments created on or before this ISO 8601 timestamp | +| `pageSize` | number | No | Number of deployments per page \(5 to 100, default 20\) | +| `pageAfter` | string | No | Cursor to start the page after, from the previous response pagination | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `deployments` | array | Deployments matching the filters | +| `pagination` | object | Cursor pagination details | +| ↳ `next` | string | Cursor to pass as the page-after parameter for the next page | + +### `trigger_dev_get_deployment` + +Retrieve a Trigger.dev deployment by its ID, including its status, version, and registered tasks. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `deploymentId` | string | Yes | ID of the deployment to retrieve | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_get_latest_deployment` + +Retrieve the latest Trigger.dev deployment in the environment of the API key. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_promote_deployment` + +Promote a Trigger.dev deployment version so new runs execute on it (e.g., to roll back to a previous version). + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `version` | string | Yes | Deployment version to promote \(e.g., "20250228.1"\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | ID of the promoted deployment | +| `version` | string | Version of the promoted deployment | +| `shortCode` | string | Short code of the promoted deployment | + +### `trigger_dev_execute_query` + +Execute a TRQL (SQL-like) query against Trigger.dev run data for reporting and analytics. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `query` | string | Yes | TRQL query to execute \(e.g., "SELECT run_id, status, triggered_at FROM runs WHERE status = \'Failed\' LIMIT 10"\) | +| `scope` | string | No | Scope of data to query: environment \(default\), project, or organization | +| `period` | string | No | Time period shorthand \(e.g., "1h", "7d", "30d"\). Cannot be combined with from/to | +| `from` | string | No | Start of the time range as an ISO 8601 timestamp. Must be used with "to" | +| `to` | string | No | End of the time range as an ISO 8601 timestamp. Must be used with "from" | +| `format` | string | No | Response format: "json" \(default\) for structured rows or "csv" for a CSV string | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `format` | string | Format of the results \(json or csv\) | +| `results` | json | Query results: an array of row objects for json format, a CSV string for csv | + +### `trigger_dev_get_query_schema` + +Retrieve the TRQL query schema: the tables and columns available for Execute Query, with types and allowed values. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `tables` | array | Tables that can be queried with TRQL | +| ↳ `name` | string | Table name used in TRQL queries | +| ↳ `description` | string | Description of the table | +| ↳ `timeColumn` | string | Primary time column for the table | +| ↳ `columns` | array | Columns of the table | +| ↳ `name` | string | Column name | +| ↳ `type` | string | ClickHouse data type | +| ↳ `description` | string | Column description | +| ↳ `example` | string | Example value | +| ↳ `allowedValues` | array | Allowed values for enum-like columns | +| ↳ `coreColumn` | boolean | Whether the column is included in default queries | + +### `trigger_dev_create_waitpoint_token` + +Create a Trigger.dev waitpoint token that a task can wait on until it is completed from outside (e.g., a human approval). + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `timeout` | string | No | How long before the token times out, as a duration \("30s", "1m", "2h", "3d"\) or an ISO 8601 date | +| `idempotencyKey` | string | No | Idempotency key; passing the same key before it expires returns the original token | +| `idempotencyKeyTTL` | string | No | How long the idempotency key is valid, as a duration \("30s", "1m", "2h", "3d"\) | +| `tags` | string | No | Comma-separated tags to attach to the waitpoint \(max 10, each under 128 characters\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Unique ID of the waitpoint token \(starts with waitpoint_\) | +| `isCached` | boolean | Whether an existing token was returned because the same idempotency key was reused | +| `url` | string | HTTP callback URL; a POST request to this URL completes the waitpoint without an API key | + +### `trigger_dev_complete_waitpoint_token` + +Complete a Trigger.dev waitpoint token, resuming any task waiting on it and passing it optional JSON data. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `waitpointId` | string | Yes | ID of the waitpoint token to complete \(starts with waitpoint_\) | +| `data` | json | No | JSON data passed back to the waiting run as the token result. Example: \{"status": "approved"\} | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `success` | boolean | Whether the waitpoint token was completed | + +### `trigger_dev_get_waitpoint_token` + +Retrieve a Trigger.dev waitpoint token by its ID, including its status, timeout, and completion data. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `waitpointId` | string | Yes | ID of the waitpoint token to retrieve \(starts with waitpoint_\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Run, schedule, or queue ID | +| `batchId` | string | Batch ID \(Batch Trigger Task\) | +| `runIds` | json | Run IDs in the batch \(batch operations\) | +| `runCount` | number | Total number of runs in the batch \(Get Batch\) | +| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) | +| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) | +| `errors` | json | Error details for failed batch items \(Get Batch\) | +| `items` | json | Execution results for each run in the batch \(Get Batch Results\) | +| `status` | string | Run status \(Get Run\) | +| `taskIdentifier` | string | Task identifier of the run \(Get Run\) | +| `createdAt` | string | When the run was created \(Get Run\) | +| `startedAt` | string | When the run started \(Get Run\) | +| `finishedAt` | string | When the run finished \(Get Run\) | +| `durationMs` | number | Compute duration in milliseconds \(Get Run\) | +| `costInCents` | number | Compute cost in cents \(Get Run\) | +| `isTest` | boolean | Whether the run is a test run \(Get Run\) | +| `tags` | json | Tags attached to the run \(Get Run\) | +| `payload` | json | Payload the run was triggered with \(Get Run\) | +| `output` | json | Output returned by the run \(Get Run\) | +| `attempts` | json | Attempts made for the run \(Get Run\) | +| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) | +| `ok` | boolean | Whether the run succeeded \(Get Run Result\) | +| `outputType` | string | Content type of the run output \(Get Run Result\) | +| `error` | json | Error details for a failed run \(Get Run Result\) | +| `message` | string | Confirmation message \(Add Run Tags\) | +| `events` | json | Log and span events of the run \(Get Run Events\) | +| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) | +| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) | +| `runs` | json | Runs matching the filters \(List Runs\) | +| `schedules` | json | Schedules in the project \(List Schedules\) | +| `pagination` | json | Pagination details \(list operations\) | +| `task` | string | Task the schedule triggers \(schedule operations\) | +| `active` | boolean | Whether the schedule is active \(schedule operations\) | +| `cron` | string | Cron expression \(schedule operations\) | +| `cronDescription` | string | Human-readable cron description \(schedule operations\) | +| `timezone` | string | Timezone of the schedule \(schedule operations\) | +| `nextRun` | string | Next scheduled run time \(schedule operations\) | +| `environments` | json | Environments the schedule runs in \(schedule operations\) | +| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) | +| `variables` | json | Environment variables in the project environment \(List Env Vars\) | +| `name` | string | Environment variable or queue name \(env var and queue operations\) | +| `value` | string | Value of the environment variable \(Get Env Var\) | +| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) | +| `count` | number | Number of environment variables submitted \(Import Env Vars\) | +| `queues` | json | Queues in the environment \(List Queues\) | +| `running` | number | Runs currently executing \(queue operations\) | +| `queued` | number | Runs waiting in the queue \(queue operations\) | +| `paused` | boolean | Whether the queue is paused \(queue operations\) | +| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) | +| `concurrency` | json | Concurrency details of the queue \(queue operations\) | +| `deployments` | json | Deployments matching the filters \(List Deployments\) | +| `version` | string | Deployment version \(deployment operations\) | +| `shortCode` | string | Deployment short code \(deployment operations\) | +| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) | +| `format` | string | Format of the query results \(Execute Query\) | +| `results` | json | Query results \(Execute Query\) | +| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) | +| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) | +| `url` | string | Waitpoint callback URL \(waitpoint operations\) | +| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) | +| `timezones` | json | Supported IANA timezones \(List Timezones\) | + +### `trigger_dev_list_waitpoint_tokens` + +List Trigger.dev waitpoint tokens in the environment of the API key, with optional status, tag, and creation-time filters. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `status` | string | No | Waitpoint status to filter by: WAITING, COMPLETED, or TIMED_OUT | +| `idempotencyKey` | string | No | Idempotency key to filter by | +| `tags` | string | No | Comma-separated tags to filter by | +| `period` | string | No | Only return tokens created in the given period \(e.g., "1h", "7d"\) | +| `from` | string | No | Only return tokens created on or after this ISO 8601 timestamp | +| `to` | string | No | Only return tokens created on or before this ISO 8601 timestamp | +| `pageSize` | number | No | Number of tokens per page \(max 100\) | +| `pageAfter` | string | No | Waitpoint ID to start the page after, for forward pagination | +| `pageBefore` | string | No | Waitpoint ID to start the page before, for backward pagination | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `tokens` | array | Waitpoint tokens matching the filters | +| `pagination` | object | Cursor pagination details | +| ↳ `next` | string | Waitpoint ID to start the next page after | +| ↳ `previous` | string | Waitpoint ID to start the previous page before | + +### `trigger_dev_list_timezones` + +List the IANA timezones supported by Trigger.dev schedules, for use as the timezone of a cron schedule. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) | +| `excludeUtc` | string | No | Set to "true" to exclude UTC from the returned timezones | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `timezones` | array | IANA timezones supported by schedules | + + diff --git a/apps/docs/content/docs/en/platform/costs.mdx b/apps/docs/content/docs/en/platform/costs.mdx index 8a360e5a2e1..934cc91fd8f 100644 --- a/apps/docs/content/docs/en/platform/costs.mdx +++ b/apps/docs/content/docs/en/platform/costs.mdx @@ -317,9 +317,9 @@ By default, your usage is capped at the credits included in your plan. To allow | **Free** | 1 | — | | **Pro** | Up to 3 | — | | **Max** | Up to 10 | — | -| **Team / Enterprise** | Unlimited | Unlimited | +| **Team / Enterprise** | — | Unlimited (Owners and Admins) | -Team and Enterprise plans unlock shared workspaces that belong to your organization. Internal members invited to a shared workspace join the organization and count toward your seat total. Existing Sim users who already belong to another organization can be added as external workspace members; they get workspace access without joining your organization or using one of your seats. When a Team or Enterprise subscription is cancelled or downgraded, existing shared workspaces remain accessible to current members but new invites are disabled until the organization is upgraded again. +Team and Enterprise plans unlock shared workspaces that belong to your organization. Every workspace created under a Team or Enterprise plan is organization-owned: Owners and Admins can create unlimited shared workspaces, while organization Members cannot create workspaces (personal workspaces created before joining the organization remain accessible). Internal members invited to a shared workspace join the organization and count toward your seat total — Enterprise invites require an available seat at invite time, while Team plans add a seat automatically when the invitee accepts. Existing Sim users who already belong to another organization can be added as external workspace members; they get workspace access without joining your organization or using one of your seats. When a Team or Enterprise subscription is cancelled or downgraded, existing shared workspaces remain accessible to current members but new invites are disabled until the organization is upgraded again. ### Rate Limits diff --git a/apps/docs/content/docs/en/platform/permissions.mdx b/apps/docs/content/docs/en/platform/permissions.mdx index 22024e2eb73..df92c38bef4 100644 --- a/apps/docs/content/docs/en/platform/permissions.mdx +++ b/apps/docs/content/docs/en/platform/permissions.mdx @@ -23,7 +23,9 @@ Sim has two kinds of workspaces: | **Free** | 1 | — | | **Pro** | Up to 3 | — | | **Max** | Up to 10 | — | -| **Team / Enterprise** | Unlimited | Unlimited (seat-gated invites) | +| **Team / Enterprise** | — | Unlimited (Owners and Admins) | + +On Team and Enterprise plans, every workspace you create belongs to the organization. Organization Owners and Admins can create unlimited shared workspaces; organization Members cannot create workspaces. Personal workspaces created before joining the organization remain accessible. Enterprise invites require an available seat at invite time; on Team plans, a seat is added automatically when the invitee accepts. When a Team or Enterprise subscription is cancelled or downgraded, existing shared workspaces stay accessible to current members. New invitations are blocked until the organization is upgraded again. diff --git a/apps/realtime/src/database/operations.ts b/apps/realtime/src/database/operations.ts index 8e301acf9bc..c5474a5f6f8 100644 --- a/apps/realtime/src/database/operations.ts +++ b/apps/realtime/src/database/operations.ts @@ -1,6 +1,12 @@ import { AuditAction, AuditResourceType, recordAudit } from '@sim/audit' import * as schema from '@sim/db' -import { workflow, workflowBlocks, workflowEdges, workflowSubflows } from '@sim/db' +import { + instrumentPoolClient, + workflow, + workflowBlocks, + workflowEdges, + workflowSubflows, +} from '@sim/db' import { createLogger } from '@sim/logger' import { BLOCK_OPERATIONS, @@ -27,13 +33,16 @@ const logger = createLogger('SocketDatabase') const connectionString = env.DATABASE_URL const socketDb = drizzle( - postgres(connectionString, { - prepare: false, - idle_timeout: 10, - connect_timeout: 20, - max: 15, - onnotice: () => {}, - }), + instrumentPoolClient( + postgres(connectionString, { + prepare: false, + idle_timeout: 10, + connect_timeout: 20, + max: 15, + onnotice: () => {}, + }), + 'socketDb' + ), { schema } ) diff --git a/apps/realtime/src/handlers/subblocks.ts b/apps/realtime/src/handlers/subblocks.ts index a54e3eb99e2..1ee35d3e722 100644 --- a/apps/realtime/src/handlers/subblocks.ts +++ b/apps/realtime/src/handlers/subblocks.ts @@ -130,7 +130,7 @@ export function setupSubblocksHandlers(socket: AuthenticatedSocket, roomManager: socket.emit('operation-failed', { operationId, error: 'User session not found', - retryable: false, + retryable: true, }) } return @@ -250,7 +250,7 @@ async function flushSubblockUpdate( io.to(socketId).emit('operation-failed', { operationId: opId, error: 'Workflow not found', - retryable: false, + retryable: true, }) }) return @@ -352,7 +352,7 @@ async function flushSubblockUpdate( io.to(socketId).emit('operation-failed', { operationId: opId, error: 'Block no longer exists', - retryable: false, + retryable: true, }) }) } diff --git a/apps/realtime/src/handlers/variables.ts b/apps/realtime/src/handlers/variables.ts index b7c7a529c80..41aeed3f83f 100644 --- a/apps/realtime/src/handlers/variables.ts +++ b/apps/realtime/src/handlers/variables.ts @@ -118,7 +118,7 @@ export function setupVariablesHandlers(socket: AuthenticatedSocket, roomManager: socket.emit('operation-failed', { operationId, error: 'User session not found', - retryable: false, + retryable: true, }) } return @@ -236,7 +236,7 @@ async function flushVariableUpdate( io.to(socketId).emit('operation-failed', { operationId: opId, error: 'Workflow not found', - retryable: false, + retryable: true, }) }) return @@ -318,7 +318,7 @@ async function flushVariableUpdate( io.to(socketId).emit('operation-failed', { operationId: opId, error: 'Variable no longer exists', - retryable: false, + retryable: true, }) }) } diff --git a/apps/realtime/src/middleware/permissions.ts b/apps/realtime/src/middleware/permissions.ts index 661f4d52d44..26a4d8c8542 100644 --- a/apps/realtime/src/middleware/permissions.ts +++ b/apps/realtime/src/middleware/permissions.ts @@ -83,6 +83,13 @@ export function checkRolePermission( return { allowed: true } } +/** + * Verifies a user's access to a workflow via workspace permissions. + * + * Returns `hasAccess: false` only for genuine denials (workflow missing/archived + * or no workspace permission). Transient failures (DB errors) are rethrown so the + * caller can report them as retryable instead of a permanent access denial. + */ export async function verifyWorkflowAccess( userId: string, workflowId: string @@ -129,6 +136,6 @@ export async function verifyWorkflowAccess( `Error verifying workflow access for user ${userId}, workflow ${workflowId}:`, error ) - return { hasAccess: false } + throw error } } diff --git a/apps/sim/app/(landing)/components/landing-faq.tsx b/apps/sim/app/(landing)/components/landing-faq.tsx index 9873003901f..3cebc334081 100644 --- a/apps/sim/app/(landing)/components/landing-faq.tsx +++ b/apps/sim/app/(landing)/components/landing-faq.tsx @@ -1,7 +1,7 @@ 'use client' -import { useState } from 'react' -import { AnimatePresence, domAnimation, LazyMotion, m } from 'framer-motion' +import { useId, useState } from 'react' +import { domAnimation, LazyMotion, m } from 'framer-motion' import { ChevronDown } from '@/components/emcn' import { cn } from '@/lib/core/utils/cn' @@ -14,7 +14,13 @@ interface LandingFAQProps { faqs: LandingFAQItem[] } +/** + * Accordion FAQ for landing pages. Answers stay mounted (collapsed via + * animated height) so non-JS crawlers see the full Q&A text and FAQPage + * JSON-LD always matches visible content. + */ export function LandingFAQ({ faqs }: LandingFAQProps) { + const baseId = useId() const [openIndex, setOpenIndex] = useState(0) const [hoveredIndex, setHoveredIndex] = useState(null) @@ -23,8 +29,8 @@ export function LandingFAQ({ faqs }: LandingFAQProps) {
{faqs.map(({ question, answer }, index) => { const isOpen = openIndex === index - const isHovered = hoveredIndex === index const showDivider = index > 0 && hoveredIndex !== index && hoveredIndex !== index - 1 + const panelId = `${baseId}-faq-panel-${index}` return (
@@ -34,50 +40,50 @@ export function LandingFAQ({ faqs }: LandingFAQProps) { index === 0 || !showDivider ? 'invisible' : 'visible' )} /> - - - - {isOpen && ( - -
-

- {answer} -

-
-
- )} -
+ {question} + +
) })} diff --git a/apps/sim/app/(landing)/integrations/(shell)/[slug]/opengraph-image.tsx b/apps/sim/app/(landing)/integrations/(shell)/[slug]/opengraph-image.tsx new file mode 100644 index 00000000000..d709cd9d4d3 --- /dev/null +++ b/apps/sim/app/(landing)/integrations/(shell)/[slug]/opengraph-image.tsx @@ -0,0 +1,48 @@ +import { notFound } from 'next/navigation' +import integrationsJson from '@/lib/integrations/integrations.json' +import type { AuthType, Integration } from '@/lib/integrations/types' +import { createLandingOgImage } from '@/app/(landing)/og-utils' + +export const contentType = 'image/png' +export const size = { + width: 1200, + height: 630, +} + +/** Raw catalog JSON, not the barrel — keeps `@/blocks/registry` out of the OG bundle. */ +const integrations = integrationsJson.integrations as readonly Integration[] +const bySlug = new Map(integrations.map((i) => [i.slug, i])) + +const AUTH_LABEL: Record = { + oauth: 'One-click OAuth', + 'api-key': 'API key auth', + none: 'No auth required', +} + +export default async function Image({ params }: { params: Promise<{ slug: string }> }) { + const { slug } = await params + const integration = bySlug.get(slug) + + if (!integration) { + notFound() + } + + const pills = [ + integration.operationCount > 0 + ? `${integration.operationCount} tool${integration.operationCount === 1 ? '' : 's'}` + : null, + integration.triggerCount > 0 + ? `${integration.triggerCount} real-time trigger${integration.triggerCount === 1 ? '' : 's'}` + : null, + AUTH_LABEL[integration.authType], + 'Free to start', + ].filter((pill): pill is string => pill !== null) + + return createLandingOgImage({ + eyebrow: 'Sim integration', + title: `${integration.name} Integration`, + subtitle: integration.description, + pills, + domainLabel: `sim.ai/integrations/${slug}`, + }) +} diff --git a/apps/sim/app/(landing)/integrations/(shell)/[slug]/page.tsx b/apps/sim/app/(landing)/integrations/(shell)/[slug]/page.tsx index a0dd247c59c..0b7c616dd80 100644 --- a/apps/sim/app/(landing)/integrations/(shell)/[slug]/page.tsx +++ b/apps/sim/app/(landing)/integrations/(shell)/[slug]/page.tsx @@ -1,3 +1,4 @@ +import { truncate } from '@sim/utils/string' import type { Metadata } from 'next' import Image from 'next/image' import Link from 'next/link' @@ -7,7 +8,9 @@ import { type AuthType, blockTypeToIconMap, type FAQItem, + formatIntegrationType, INTEGRATIONS, + INTEGRATIONS_UPDATED_AT, type Integration, } from '@/lib/integrations' import { IntegrationCtaButton } from '@/app/(landing)/integrations/(shell)/[slug]/components/integration-cta-button' @@ -32,6 +35,7 @@ export const dynamicParams = false * Scoring (additive): * +3 per shared operation name — strongest signal (same capability) * +2 per shared operation word — weaker signal (e.g. both have "create" ops) + * +2 same integration category — topical relevance (both CRMs, both devops) * +1 same auth type — comparable setup experience * * Every integration gets a score, so the sidebar always has suggestions. @@ -41,6 +45,7 @@ function getRelatedSlugs( slug: string, operations: Integration['operations'], authType: AuthType, + integrationType: Integration['integrationType'], limit = 6 ): string[] { const currentOpNames = new Set(operations.map((o) => o.name.toLowerCase())) @@ -65,20 +70,28 @@ function getRelatedSlugs( .split(/\s+/) .some((w) => w.length > 3 && currentOpWords.has(w)) ).length + const sameCategory = i.integrationType === integrationType ? 2 : 0 const sameAuth = i.authType === authType ? 1 : 0 - return { slug: i.slug, score: sharedNames * 3 + sharedWords * 2 + sameAuth } + return { slug: i.slug, score: sharedNames * 3 + sharedWords * 2 + sameCategory + sameAuth } }) .sort((a, b) => b.score - a.score || a.slug.localeCompare(b.slug)) .slice(0, limit) .map(({ slug: s }) => s) } -const AUTH_STEP: Record = { - oauth: 'Authenticate with one-click OAuth — no credentials to copy-paste.', - 'api-key': 'Add your API key to authenticate — find it in your account settings.', - none: 'Authenticate your account to connect.', +const AUTH_STEP: Record string> = { + oauth: (name) => `Connect your ${name} account with one-click OAuth — no credentials to copy.`, + 'api-key': (name) => + `Paste your ${name} API key to authenticate — you can find it in your ${name} account settings.`, + none: () => 'No authentication is needed — the block works as soon as you drop it in.', } +/** Human-readable catalog refresh date for the visible last-updated line. */ +const UPDATED_AT_DISPLAY = new Date(`${INTEGRATIONS_UPDATED_AT}T00:00:00Z`).toLocaleDateString( + 'en-US', + { year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC' } +) + /** * Ensures autogenerated prose can be safely composed with a following sentence. */ @@ -118,68 +131,110 @@ function mentionifyPromptForNames(prompt: string, names: readonly string[]): str return prompt.replace(regex, (match) => `@${match}`) } +/** Lowercases only the first character so acronyms in tool names survive. */ +function lowercaseFirst(value: string): string { + return value.charAt(0).toLowerCase() + value.slice(1) +} + +/** Joins items into readable prose: "a", "a and b", or "a, b, and c". */ +function toProseList(items: string[]): string { + if (items.length <= 1) return items[0] ?? '' + if (items.length === 2) return `${items[0]} and ${items[1]}` + return `${items.slice(0, -1).join(', ')}, and ${items[items.length - 1]}` +} + +/** "a" vs "an" for a service name; U-names read as "you", so they take "a". */ +function articleFor(name: string): string { + return /^[aeio]/i.test(name) ? 'an' : 'a' +} + /** - * Generates targeted FAQs from integration metadata. - * Questions mirror real search queries to drive FAQPage rich snippets. + * Generates the per-integration FAQ. Answers lead with a direct answer and + * carry integration-specific facts; catalog-generic questions live once on + * the /integrations index FAQ instead of repeating across every page. */ -function buildFAQs(integration: Integration): FAQItem[] { +function buildFAQs(integration: Integration, relatedNames: string[]): FAQItem[] { const { name, description, operations, triggers, authType } = integration const faqDescription = sentenceWithTerminalPunctuation(description) - const topOps = operations.slice(0, 5) - const topOpNames = topOps.map((o) => o.name) - const authStep = AUTH_STEP[authType] + const opCount = operations.length + const triggerCount = triggers.length + const topOpNames = operations.slice(0, 5).map((o) => o.name) + const firstOp = operations[0] + const firstTrigger = triggers[0] + const pairings = relatedNames.slice(0, 2) + const toolsPhrase = `${opCount} ${name} tool${opCount === 1 ? '' : 's'}` + const triggersPhrase = `${triggerCount} real-time trigger${triggerCount === 1 ? '' : 's'}` + const capabilityPhrase = [ + opCount > 0 ? toolsPhrase : null, + triggerCount > 0 ? triggersPhrase : null, + ] + .filter((part): part is string => part !== null) + .join(' and ') + const triggerNames = triggers.map((t) => t.name) + const triggerListPhrase = + triggerCount > 6 + ? `${triggerNames.slice(0, 6).join(', ')}, and ${triggerCount - 6} more` + : toProseList(triggerNames) + const firstTriggerWhen = firstTrigger?.description.match(/^trigger workflow (when .+)$/i)?.[1] + const connectFinalStep = firstOp + ? `Pick a tool such as "${firstOp.name}", wire up its inputs, and click Run — your agent is live.` + : triggerCount > 0 + ? `Choose the ${name} event you want to listen for, and your agent runs automatically from then on.` + : `Configure the block's inputs and click Run — your agent is live.` const faqs: FAQItem[] = [ { question: `What is Sim's ${name} integration?`, - answer: `Sim's ${name} integration lets you build AI agents that automate tasks in ${name} without writing code. ${faqDescription} You can connect ${name} to hundreds of other services in the same agent — from CRMs and spreadsheets to messaging tools and databases.`, - }, - { - question: `What can I automate with ${name} in Sim?`, - answer: - topOpNames.length > 0 - ? `With Sim you can: ${topOpNames.join('; ')}${operations.length > 5 ? `; and ${operations.length - 5} more tools` : ''}. Each action runs inside an AI agent block, so you can combine ${name} with LLM reasoning, conditional logic, and data from any other connected service.` - : `Sim lets you automate ${name} by connecting it to an AI agent that can read from it, write to it, and chain it together with other services — all driven by natural-language instructions instead of rigid rules.`, + answer: `Sim's ${name} integration ${capabilityPhrase ? `adds ${capabilityPhrase} to` : `connects ${name} to`} the AI agents you build in Sim's visual workflow builder — no code required. ${faqDescription}${ + pairings.length === 2 + ? ` Teams often pair ${name} with ${pairings[0]} and ${pairings[1]} in the same agent.` + : '' + }`, }, + ...(opCount > 0 + ? [ + { + question: `What can I automate with ${name} in Sim?`, + answer: `You can ${toProseList(topOpNames.map(lowercaseFirst))} with ${name} in Sim${ + opCount > 5 ? `, plus ${opCount - 5} more ${name} tools listed on this page` : '' + }. ${opCount === 1 ? 'It runs' : 'Each runs'} as a tool inside an AI agent block, so an agent can chain ${name} with ${ + pairings.length === 2 + ? `services like ${pairings[0]} and ${pairings[1]}` + : 'any other connected service' + } and apply LLM reasoning between steps.`, + }, + ] + : []), { question: `How do I connect ${name} to Sim?`, - answer: `Getting started takes under five minutes: (1) Create a free account at sim.ai. (2) Open your workspace and create an agent. (3) Drag a ${name} block onto the workflow builder. (4) ${authStep} (5) Choose the tool you want to use, wire it to the inputs you need, and click Run. Your agent is live.`, + answer: `Connecting ${name} takes about five minutes: (1) Create a free account at sim.ai. (2) Create an agent in your workspace. (3) Drag ${articleFor(name)} ${name} block onto the workflow builder. (4) ${AUTH_STEP[authType](name)} (5) ${connectFinalStep}`, }, - { - question: `Can I use ${name} as a tool inside an AI agent in Sim?`, - answer: `Yes — this is one of Sim's core capabilities. Instead of hard-coding when and how ${name} is used, you give an AI agent access to ${name} tools and describe the goal in plain language. The agent decides which tools to call, in what order, and how to handle the results. This means your automation adapts to context rather than breaking when inputs change.`, - }, - ...(topOpNames.length >= 2 + ...(firstOp && opCount >= 2 ? [ { - question: `How do I ${topOpNames[0].toLowerCase()} with ${name} in Sim?`, - answer: `Add a ${name} block to your agent and select "${topOpNames[0]}" as the tool. Fill in the required fields — you can reference outputs from earlier steps, such as text generated by an AI agent or data fetched from another integration. No code is required.`, + question: `How do I ${lowercaseFirst(firstOp.name)} with ${name} in Sim?`, + answer: `Add ${articleFor(name)} ${name} block to your agent and select "${firstOp.name}" as the tool.${ + firstOp.description ? ` ${sentenceWithTerminalPunctuation(firstOp.description)}` : '' + } Fill in the required fields — inputs can reference outputs from earlier steps, such as text generated by an AI block or data fetched from another integration. No code is required.`, }, ] : []), - ...(triggers.length > 0 + ...(triggerCount > 0 ? [ { question: `How do I trigger a Sim agent from ${name} automatically?`, - answer: `Add a ${name} trigger block to your agent and copy the generated webhook URL. Paste that URL into ${name}'s webhook settings and select the events you want to listen for (${triggers.map((t) => t.name).join(', ')}). From that point on, every matching event in ${name} instantly runs your agent — no polling, no delay.`, + answer: `Add ${articleFor(name)} ${name} trigger block to your agent and copy its generated webhook URL into ${name}'s webhook settings. Sim supports ${triggersPhrase} for ${name}: ${triggerListPhrase}. Once configured, every matching ${name} event starts your agent instantly — no polling, no delay.`, }, { question: `What data does Sim receive when a ${name} event triggers an agent?`, - answer: `When ${name} fires a webhook, Sim receives the full event payload that ${name} sends — typically the record or object that changed, along with metadata like the event type and timestamp. Inside your agent, every field from that payload is available as a variable you can pass to AI blocks, conditions, or other integrations.`, + answer: `Sim receives the full event payload ${name} sends — typically the record or object that changed, plus metadata like the event type and timestamp.${ + firstTriggerWhen + ? ` For example, the "${firstTrigger.name}" trigger fires ${sentenceWithTerminalPunctuation(firstTriggerWhen)}` + : '' + } Every field in the payload is available as a variable you can pass to AI blocks, conditions, or other integrations.`, }, ] : []), - { - question: `What ${name} tools does Sim support?`, - answer: - operations.length > 0 - ? `Sim supports ${operations.length} ${name} tool${operations.length === 1 ? '' : 's'}: ${operations.map((o) => o.name).join(', ')}.` - : `Sim supports core ${name} tools for reading and writing data, triggering actions, and integrating with your other services. See the full list in the Sim documentation.`, - }, - { - question: `Is the ${name} integration free to use?`, - answer: `Yes — Sim's free plan includes access to the ${name} integration and every other integration in the library. No credit card is needed to get started. Visit sim.ai to create your account.`, - }, ] return faqs @@ -203,7 +258,8 @@ export async function generateMetadata({ .slice(0, 3) .map((o) => o.name) .join(', ') - const metaDesc = `Automate ${name} with AI agents in Sim. ${description.slice(0, 100).trimEnd()}. Free to start.` + const categoryLabel = formatIntegrationType(integration.integrationType) + const metaDesc = `Automate ${name} with AI agents in Sim. ${sentenceWithTerminalPunctuation(truncate(description, 100))} Free to start.` return { title: `${name} Integration`, @@ -216,29 +272,25 @@ export async function generateMetadata({ `${name} AI agent`, `${name} AI automation`, ...(opSample ? [`${name} ${opSample}`] : []), + `${categoryLabel} integration`, + ...(integration.tags ?? []).map((tag) => `${name} ${tag.replace(/-/g, ' ')}`), + ...(integration.triggerCount > 0 ? [`${name} webhook`, `${name} trigger`] : []), 'AI workspace integrations', 'AI agent integrations', 'AI agent builder', ], + // og:image/twitter:image come from the sibling opengraph-image.tsx — + // Next serves it at a hash-suffixed URL, so hardcoding it here 404s. openGraph: { title: `${name} Integration | Sim AI Workspace`, - description: `Connect ${name} to ${INTEGRATION_COUNT - 1}+ tools using AI agents. ${description.slice(0, 100).trimEnd()}.`, + description: `Connect ${name} to ${INTEGRATION_COUNT - 1}+ tools using AI agents. ${sentenceWithTerminalPunctuation(truncate(description, 100))}`, url: `${baseUrl}/integrations/${slug}`, type: 'website', - images: [ - { - url: `${baseUrl}/opengraph-image.png`, - width: 1200, - height: 630, - alt: `${name} Integration — Sim`, - }, - ], }, twitter: { card: 'summary_large_image', title: `${name} Integration | Sim`, description: `Automate ${name} with AI agents in Sim. Connect to ${INTEGRATION_COUNT - 1}+ tools. Free to start.`, - images: [{ url: `${baseUrl}/opengraph-image.png`, alt: `${name} Integration — Sim` }], }, alternates: { canonical: `${baseUrl}/integrations/${slug}` }, } @@ -255,11 +307,15 @@ export default async function IntegrationPage({ params }: { params: Promise<{ sl const landingContent = integration.landingContent const IconComponent = blockTypeToIconMap[integration.type] - const faqs = buildFAQs(integration) - const relatedSlugs = getRelatedSlugs(slug, operations, authType) + const categoryLabel = formatIntegrationType(integration.integrationType) + const relatedSlugs = getRelatedSlugs(slug, operations, authType, integration.integrationType) const relatedIntegrations = relatedSlugs .map((s) => bySlug.get(s)) .filter((i): i is Integration => i !== undefined) + const faqs = buildFAQs( + integration, + relatedIntegrations.map((i) => i.name) + ) const matchingTemplates = getTemplatesForBlock(integration.type) const breadcrumbJsonLd = { @@ -284,38 +340,16 @@ export default async function IntegrationPage({ params }: { params: Promise<{ sl description, url: `${baseUrl}/integrations/${slug}`, applicationCategory: 'BusinessApplication', + applicationSubCategory: categoryLabel, operatingSystem: 'Web', featureList: operations.map((o) => o.name), + ...(integration.tags?.length + ? { keywords: integration.tags.map((tag) => tag.replace(/-/g, ' ')).join(', ') } + : {}), + dateModified: INTEGRATIONS_UPDATED_AT, offers: { '@type': 'Offer', price: '0', priceCurrency: 'USD' }, } - const howToJsonLd = { - '@context': 'https://schema.org', - '@type': 'HowTo', - name: `How to automate ${name} with Sim`, - description: `Step-by-step guide to connecting ${name} to AI agents in Sim.`, - step: [ - { - '@type': 'HowToStep', - position: 1, - name: 'Create a free Sim account', - text: 'Sign up at sim.ai — no credit card required.', - }, - { - '@type': 'HowToStep', - position: 2, - name: `Add a ${name} block`, - text: `Open your workspace, drag a ${name} block onto the workflow builder, and authenticate with your ${name} credentials.`, - }, - { - '@type': 'HowToStep', - position: 3, - name: 'Configure and run', - text: `Choose the operation you want, connect it to an AI agent, and deploy. Automate anything in ${name} without code.`, - }, - ], - } - const faqJsonLd = { '@context': 'https://schema.org', '@type': 'FAQPage', @@ -336,10 +370,6 @@ export default async function IntegrationPage({ params }: { params: Promise<{ sl type='application/ld+json' dangerouslySetInnerHTML={{ __html: JSON.stringify(softwareAppJsonLd) }} /> -