text stringlengths 0 59.1k |
|---|
- **Gain observability** – each action run is logged in VoltOps with payload, metadata, and retry |
history so you can debug failures quickly. |
## How actions work |
1. **Create a credential** in the Volt console (Settings → Integrations). Volt stores the provider |
token securely. |
2. **Select the action** (e.g. Airtable Create Record) and configure defaults such as base/table IDs. |
3. **Call the action** using the VoltOps SDK (`VoltOpsClient`) or expose it as a VoltAgent tool. |
4. **Inspect runs** in the console. Every invocation shows request + response payloads, retries, and |
error messages. |
## Quick start with the SDK |
```ts |
import { VoltOpsClient } from "@voltagent/core"; |
const voltops = new VoltOpsClient({ |
publicKey: process.env.VOLTAGENT_PUBLIC_KEY!, |
secretKey: process.env.VOLTAGENT_SECRET_KEY!, |
}); |
const record = await voltops.actions.airtable.createRecord({ |
credential: { credentialId: "cred_123" }, |
baseId: "appAbCdEf123", |
tableId: "tblXyZ987", |
fields: { |
Name: "Ada Lovelace", |
Email: "ada@example.com", |
Status: "Ready", |
}, |
}); |
console.log(record.responsePayload); |
await voltops.actions.discord.sendMessage({ |
credential: { botToken: process.env.DISCORD_BOT_TOKEN! }, |
content: "Inline credentials for the win!", |
}); |
``` |
You can also [test actions directly from the console](https://console.voltagent.dev/actions) by |
editing the JSON payload and hitting **Run Test**. The console uses the same `/actions/test` API |
behind the scenes, so once your payload works there you can copy/paste the generated SDK snippet. |
## Agent and workflow usage |
The VoltAgent runtime treats each action as a tool. Add it to an agent like so: |
```ts |
import { createTool } from "@voltagent/core"; |
import { VoltOpsClient } from "@voltagent/core"; |
const voltops = new VoltOpsClient({ publicKey: "pk_xxx", secretKey: "sk_xxx" }); |
export const createCustomerRecord = createTool({ |
name: "createCustomerRecord", |
description: "Create a CRM row in Airtable", |
parameters: z.object({ |
name: z.string(), |
email: z.string().email(), |
}), |
execute: async ({ name, email }) => { |
return await voltops.actions.airtable.createRecord({ |
credential: { credentialId: process.env.AIRTABLE_CREDENTIAL_ID! }, |
baseId: process.env.AIRTABLE_BASE_ID!, |
tableId: process.env.AIRTABLE_TABLE_ID!, |
fields: { Name: name, Email: email }, |
}); |
}, |
}); |
``` |
Agents can now call `createCustomerRecord` during planning and VoltOps keeps an immutable log of each |
invocation (request/response/metadata). |
## Next steps |
- Follow the [Actions + Airtable guide](./airtable.md) for a concrete provider walkthrough. |
- Publish your own actions by wiring other integrations through VoltOps and sharing the tool with |
agents or workflows. |
- Monitor action runs in Volt → **Actions** to debug payloads, rerun failures, and correlate with |
agent traces. |
<|endoftext|> |
# source: VoltAgent__voltagent/website/actions-triggers-docs/triggers/usage.md type: docs |
# Usage |
This guide walks through creating a **trigger using Airtable** that executes your agent when new records are added to your Airtable base. The same workflow applies to other providers (Slack, Gmail, GitHub, Schedule). |
:::tip To try this yourself |
You'll need [VoltOps Console](https://console.voltagent.dev/) access, a VoltAgent [example](https://voltagent.dev/examples/) or your own agent, and an [Airtable](https://airtable.com/) account with a base and Personal Access Token (we'll show you how to create one). |
::: |
## Step 1: Trigger Connection |
To set up a trigger, you first need to select a provider and configure its credentials. |
<video controls loop muted playsInline style={{width: '100%', height: 'auto'}}> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.