text stringlengths 0 59.1k |
|---|
logger, |
triggers: createTriggers((on) => { |
on.airtable.recordCreated(async ({ payload, agents }) => { |
const { record, baseId, tableId } = |
(payload as AirtableRecordCreatedPayload | undefined) ?? {}; |
if (!record?.id) { |
logger.warn("Missing recordId in Airtable payload"); |
return; |
} |
await agents.airtableAgent.generateText(`Airtable record created. |
Base: ${baseId ?? "unknown-base"} |
Table: ${tableId ?? "unknown-table"} |
Record ID: ${record.id} |
Existing fields (JSON): ${safeStringify(record.fields ?? {})} |
Update the same record with: |
- Summary (1-2 sentences) -> field name: Summary |
- Priority (High | Medium | Low) -> field name: Priority |
- Status (New | In Progress | Blocked | Done) -> field name: Status |
- Next steps (short bullet list as a single string) -> field name: Next steps |
Call updateAirtableRecord with recordId and the new fields using those exact names.`); |
}); |
}), |
}); |
``` |
</ExpandableCode> |
</StepSection> |
<StepSection stepNumber={7} title="Test End-to-End"> |
<video controls loop muted playsInline style={{width: '100%', height: 'auto'}}> |
<source src="https://cdn.voltagent.dev/voltagent-recipes-guides/airtable-5.mp4" type="video/mp4" /> |
Your browser does not support the video tag. |
</video> |
<br/> |
<br/> |
Now test the complete flow from Airtable to your agent and back. |
Add these environment variables to your `.env` file: |
```bash |
VOLTAGENT_PUBLIC_KEY=pk_... |
VOLTAGENT_SECRET_KEY=sk_... |
AIRTABLE_CREDENTIAL_ID=cred_... |
``` |
With the tunnel and server running: |
1. Insert a new row in your Airtable table (fill in `Title`, `Description`, etc.) |
2. The trigger sends the event to your agent |
3. The agent generates summary/priority/status/next steps |
4. VoltOps writes the fields back to the record |
View request/response logs in **Actions → Runs** in Console. |
</StepSection> |
## Related Documentation |
- [Triggers Usage](/actions-triggers-docs/triggers/usage) - Trigger configuration reference |
- [Airtable Actions](/actions-triggers-docs/actions/airtable) - Airtable action types |
- [Tools](/docs/agents/tools) - Creating agent tools |
<|endoftext|> |
# source: VoltAgent__voltagent/website/recipes/slack-agent-chat-sdk.md type: docs |
--- |
id: slack-agent-chat-sdk |
title: Slack Agent with Chat SDK |
description: Build a Slack bot with Chat SDK transport and VoltAgent-powered responses. |
hide_table_of_contents: true |
--- |
# Slack Agent with Chat SDK |
This guide shows how to run a Slack bot using: |
- [Chat SDK](https://www.npmjs.com/package/chat) for Slack webhooks, thread subscriptions, and interactive actions |
- VoltAgent for AI reasoning and tool calling |
- Next.js route handlers for webhook hosting |
- Redis for Chat SDK state persistence |
:::info |
Use the ready-made example: [examples/with-chat-sdk](https://github.com/voltagent/voltagent/tree/main/examples/with-chat-sdk). |
::: |
## 1. Create the project from example |
```bash |
npm create voltagent-app@latest -- --example with-chat-sdk |
cd with-chat-sdk |
pnpm install |
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.