text
stringlengths
0
59.1k
calendarId: "primary",
summary,
description,
start: { dateTime: start, timeZone: timeZone ?? "UTC" },
end: { dateTime: end, timeZone: timeZone ?? "UTC" },
attendees: attendees?.map((email) => ({ email })),
});
},
});
const calendarAgent = new Agent({
name: "Calendar Assistant",
model: openai("gpt-4o-mini"),
instructions: "Use Google Calendar tools to schedule and manage events.",
tools: [scheduleMeetingTool],
});
```
Agents can now schedule meetings, modify them, or read back details inside reasoning chains.
## Testing payloads in the console
- Open **Volt Console → Actions → Add Action → Google Calendar** and attach your credential.
- Choose an action, enter the payload (`calendarId`, `summary`, `start`, `end`, etc.), and run a test.
- Inspect the request/response plus the SDK snippet shown in **How to use**.
## Troubleshooting
- Auth failures usually mean a missing/expired refresh token or mismatched OAuth client redirect URI;
re-authorize with offline access.
- Include `timeZone` on `start`/`end` to avoid defaulting to the calendar’s zone.
- Use `calendarId: "primary"` when unsure which calendar the credential owns.
- `listEvents` accepts `timeMin`, `timeMax`, `q`, `singleEvents`, `orderBy`, and pagination via
`pageToken`.
- Check **Volt → Actions → Runs** for the Google API response if an action fails.
<|endoftext|>
# source: VoltAgent__voltagent/website/actions-triggers-docs/actions/airtable.md type: docs
# Airtable Actions
Airtable is one of the most common destinations for agent output—customer records, research notes,
summaries, etc. VoltOps ships managed Airtable actions so you can create, update, delete, list, and
fetch records without touching the Airtable REST API directly.
## Prerequisites
1. An Airtable base + table you want to write to.
2. A Volt project (free or paid) with API keys (`pk_…`, `sk_…`).
3. An Airtable credential inside Volt:
- Go to **Settings → Integrations → Add Credential → Airtable**.
- Paste your Airtable access token and save. Volt generates a `cred_xxx` identifier.
4. (Recommended) Base and table IDs stored as environment variables:
```bash
AIRTABLE_CREDENTIAL_ID=cred_xxx
AIRTABLE_BASE_ID=appxxxxxxxxxxxxxx
AIRTABLE_TABLE_ID=tblxxxxxxxxxxxxxx
```
## Running Airtable actions from code
```ts
import { VoltOpsClient } from "@voltagent/core";
const voltops = new VoltOpsClient({
publicKey: process.env.VOLTAGENT_PUBLIC_KEY!,
secretKey: process.env.VOLTAGENT_SECRET_KEY!,
});
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: "Ada Lovelace",
Role: "Researcher",
Status: "Ready",
},
});
// No stored credential? Pass your access token inline instead
await voltops.actions.airtable.createRecord({
credential: { apiKey: process.env.AIRTABLE_API_KEY! },
baseId: process.env.AIRTABLE_BASE_ID!,
tableId: process.env.AIRTABLE_TABLE_ID!,
fields: {
Name: "Grace Hopper",
},
});
```
Every call appears in Volt → **Actions** with request/response payloads, so you can monitor failures
or re-run a specific payload without redeploying code.
## Treat Airtable actions as tools
The [`with-voltagent-actions`](https://github.com/voltagent/voltagent/tree/main/examples/with-voltagent-actions)
example demonstrates how to expose each Airtable action as a VoltAgent tool. Below is a simplified
version of the **Create Record** tool; the example repo includes create/update/delete/get/list
variants plus a UI drawer inside the Volt console to test payloads.