docs: Update user docs - Tasks, Apps index, API Possibilities
- tasks.md: Simplified for end users (no code, no HTMX) - README.md (apps): Clean user-friendly app guide - api-possibilities.md: New chapter for bot builders with API integration examples - SUMMARY.md: Added API Possibilities link
This commit is contained in:
parent
b6563ba39e
commit
3fdeeedf73
6 changed files with 417 additions and 359 deletions
43
PROMPT.md
43
PROMPT.md
|
|
@ -154,26 +154,31 @@ botbook/
|
||||||
├── src/
|
├── src/
|
||||||
│ ├── SUMMARY.md # Table of contents
|
│ ├── SUMMARY.md # Table of contents
|
||||||
│ ├── README.md # Introduction
|
│ ├── README.md # Introduction
|
||||||
│ ├── chapter-01/ # Run and Talk (Quick Start)
|
│ ├── 01-introduction/ # Run and Talk (Quick Start)
|
||||||
│ ├── chapter-02/ # Package System
|
│ ├── 02-templates/ # Package System
|
||||||
│ ├── chapter-03/ # Knowledge Base
|
│ ├── 03-knowledge-base/ # Knowledge Base
|
||||||
│ ├── chapter-04-gbui/ # UI System
|
│ ├── 04-gbui/ # UI System
|
||||||
│ ├── chapter-05-gbtheme/ # Theming
|
│ ├── 05-gbtheme/ # Theming
|
||||||
│ ├── chapter-06-gbdialog/ # BASIC Dialogs
|
│ ├── 06-gbdialog/ # BASIC Dialogs
|
||||||
│ ├── chapter-07-gbapp/ # Applications
|
│ ├── 07-gbapp/ # Applications
|
||||||
│ ├── chapter-08-config/ # Configuration
|
│ ├── 08-config/ # Configuration
|
||||||
│ ├── chapter-09-api/ # REST API
|
│ ├── 09-tools/ # Tools
|
||||||
│ ├── chapter-10-api/ # WebSocket API
|
│ ├── 10-rest/ # REST API
|
||||||
│ ├── chapter-11-features/ # Feature Modules
|
│ ├── 11-features/ # Feature Modules
|
||||||
│ ├── chapter-12-auth/ # Authentication
|
│ ├── 12-auth/ # Authentication
|
||||||
│ ├── chapter-13-community/ # Contributing
|
│ ├── 13-community/ # Contributing
|
||||||
│ ├── chapter-14-migration/ # Migration Guide
|
│ ├── 14-migration/ # Migration Guide
|
||||||
│ ├── appendix-*/ # Reference materials
|
│ ├── 15-appendix/ # Reference materials
|
||||||
│ └── assets/ # Images, diagrams
|
│ ├── 16-appendix-docs-style/
|
||||||
|
│ ├── 17-testing/ # Testing guide
|
||||||
|
│ ├── 18-appendix-external-services/
|
||||||
|
│ ├── 19-maintenance/ # Maintenance
|
||||||
|
│ └── assets/ # Images, diagrams
|
||||||
├── i18n/ # Translations
|
├── i18n/ # Translations
|
||||||
│ ├── src-cn/ # Chinese
|
│ ├── cn/ # Chinese
|
||||||
│ ├── src-ja/ # Japanese
|
│ ├── en/ # English
|
||||||
│ └── src-pt/ # Portuguese
|
│ ├── ja/ # Japanese
|
||||||
|
│ └── pt/ # Portuguese
|
||||||
└── book/ # Generated output
|
└── book/ # Generated output
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,177 +1,77 @@
|
||||||
# Suite Applications
|
# Suite Apps
|
||||||
|
|
||||||
> **Individual app documentation for General Bots Suite**
|
> **Everything you need, all in one place**
|
||||||
|
|
||||||
Each application in the Suite has its own dedicated documentation with:
|
|
||||||
- Flow diagrams (SVG with light/dark theme support)
|
|
||||||
- Interface layouts
|
|
||||||
- HTMX integration patterns
|
|
||||||
- API endpoints
|
|
||||||
- CSS classes
|
|
||||||
- JavaScript handlers
|
|
||||||
- Keyboard shortcuts
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Core Applications
|
## Your Apps
|
||||||
|
|
||||||
| App | Description | Documentation |
|
Click any app icon in the top-right menu (⋮⋮⋮) to open it.
|
||||||
|-----|-------------|---------------|
|
|
||||||
| 🖥️ **Suite** | Full desktop interface | [suite.md](./suite.md) |
|
|
||||||
| 💬 **Chat** | AI-powered conversation assistant | [chat.md](./chat.md) |
|
|
||||||
| 📁 **Drive** | Cloud file storage and management | [drive.md](./drive.md) |
|
|
||||||
| ✓ **Tasks** | To-do lists with priorities | [tasks.md](./tasks.md) |
|
|
||||||
| ✉ **Mail** | Email client | [mail.md](./mail.md) |
|
|
||||||
| 📅 **Calendar** | Scheduling and events | [calendar.md](./calendar.md) |
|
|
||||||
| 🎥 **Meet** | Video conferencing | [meet.md](./meet.md) |
|
|
||||||
| 🎬 **Player** | Media viewer | [player.md](./player.md) |
|
|
||||||
|
|
||||||
## Productivity Applications
|
| App | What It Does |
|
||||||
|
|-----|--------------|
|
||||||
| App | Description | Documentation |
|
| 💬 **Chat** | Talk to your AI assistant |
|
||||||
|-----|-------------|---------------|
|
| 📁 **Drive** | Store and organize your files |
|
||||||
| 📝 **Paper** | AI-assisted document writing | [paper.md](./paper.md) |
|
| ✓ **Tasks** | Keep track of your to-do list |
|
||||||
| 🔍 **Research** | AI-powered search and discovery | [research.md](./research.md) |
|
| ✉ **Mail** | Send and receive emails |
|
||||||
| 📊 **Analytics** | Reports and dashboards | [analytics.md](./analytics.md) |
|
| 📅 **Calendar** | Schedule meetings and events |
|
||||||
|
| 🎥 **Meet** | Video calls with your team |
|
||||||
## Developer Tools
|
| 🎬 **Player** | Watch videos and listen to audio |
|
||||||
|
|
||||||
| App | Description | Documentation |
|
|
||||||
|-----|-------------|---------------|
|
|
||||||
| 🎨 **Designer** | Visual dialog builder | [designer.md](./designer.md) |
|
|
||||||
| 📚 **Sources** | Prompts, templates, and models | [sources.md](./sources.md) |
|
|
||||||
| 🛡️ **Compliance** | Security scanner | [compliance.md](./compliance.md) |
|
|
||||||
|
|
||||||
## System Components
|
|
||||||
|
|
||||||
| Component | Description | Location |
|
|
||||||
|-----------|-------------|----------|
|
|
||||||
| 🔐 **Auth** | Authentication views | `ui/suite/auth/` |
|
|
||||||
| 👤 **Attendant** | Attendant interface | `ui/suite/attendant/` |
|
|
||||||
| 🧩 **Partials** | Reusable HTML fragments | `ui/suite/partials/` |
|
|
||||||
| 🔧 **Tools** | Developer utilities | `ui/suite/tools/` |
|
|
||||||
| 📈 **Monitoring** | System monitoring dashboard | `ui/suite/monitoring/` |
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## App Launcher
|
## Productivity Apps
|
||||||
|
|
||||||
The Suite features a Google-style app launcher accessible from the header:
|
| App | What It Does |
|
||||||
|
|-----|--------------|
|
||||||
<img src="../../assets/suite/app-launcher.svg" alt="App Launcher" style="max-width: 100%; height: auto;">
|
| 📝 **Paper** | Write documents with AI help |
|
||||||
|
| 🔍 **Research** | Search and discover information |
|
||||||
### Accessing Apps
|
| 📊 **Analytics** | View reports and dashboards |
|
||||||
|
|
||||||
1. **Click the grid icon** (⋮⋮⋮) in the top-right corner
|
|
||||||
2. **Select an app** from the dropdown menu
|
|
||||||
3. App loads in the main content area
|
|
||||||
|
|
||||||
### Keyboard Shortcuts
|
|
||||||
|
|
||||||
| Shortcut | App |
|
|
||||||
|----------|-----|
|
|
||||||
| `Alt+1` | Chat |
|
|
||||||
| `Alt+2` | Drive |
|
|
||||||
| `Alt+3` | Tasks |
|
|
||||||
| `Alt+4` | Mail |
|
|
||||||
| `Alt+5` | Calendar |
|
|
||||||
| `Alt+6` | Meet |
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Architecture Overview
|
## Quick Access
|
||||||
|
|
||||||
All Suite apps follow the same patterns:
|
**Keyboard shortcuts** to open apps fast:
|
||||||
|
|
||||||
### HTMX Loading
|
| Press | Opens |
|
||||||
|
|-------|-------|
|
||||||
Apps are loaded lazily when selected:
|
| `Alt + 1` | Chat |
|
||||||
|
| `Alt + 2` | Drive |
|
||||||
```html
|
| `Alt + 3` | Tasks |
|
||||||
<a href="#chat"
|
| `Alt + 4` | Mail |
|
||||||
data-section="chat"
|
| `Alt + 5` | Calendar |
|
||||||
hx-get="/ui/suite/chat/chat.html"
|
| `Alt + 6` | Meet |
|
||||||
hx-target="#main-content"
|
|
||||||
hx-swap="innerHTML">
|
|
||||||
Chat
|
|
||||||
</a>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Component Structure
|
|
||||||
|
|
||||||
Each app is a self-contained HTML fragment:
|
|
||||||
|
|
||||||
```
|
|
||||||
app-name/
|
|
||||||
├── app-name.html # Main component
|
|
||||||
├── app-name.css # Styles (optional)
|
|
||||||
└── app-name.js # JavaScript (optional)
|
|
||||||
```
|
|
||||||
|
|
||||||
### API Integration
|
|
||||||
|
|
||||||
Apps communicate with the backend via REST APIs:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<div hx-get="/api/v1/app/data"
|
|
||||||
hx-trigger="load"
|
|
||||||
hx-swap="innerHTML">
|
|
||||||
Loading...
|
|
||||||
</div>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Real-Time Updates
|
|
||||||
|
|
||||||
WebSocket support for live data:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<div hx-ext="ws" ws-connect="/ws">
|
|
||||||
<!-- Real-time content -->
|
|
||||||
</div>
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Creating Custom Apps
|
## Tips
|
||||||
|
|
||||||
To add a new app to the Suite:
|
- **Switch apps quickly** - Use the app menu or keyboard shortcuts
|
||||||
|
- **Stay in one place** - All your work is saved automatically
|
||||||
1. **Create the component** in `ui/suite/your-app/`
|
- **Ask for help** - The Chat app can help you with any app
|
||||||
2. **Add navigation entry** in `index.html`
|
|
||||||
3. **Define API endpoints** in your Rust backend
|
|
||||||
4. **Document the app** in this folder
|
|
||||||
|
|
||||||
### Template
|
|
||||||
|
|
||||||
```html
|
|
||||||
<!-- ui/suite/your-app/your-app.html -->
|
|
||||||
<div class="your-app-container" id="your-app">
|
|
||||||
<header class="your-app-header">
|
|
||||||
<h2>Your App</h2>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main class="your-app-content"
|
|
||||||
hx-get="/api/v1/your-app/data"
|
|
||||||
hx-trigger="load"
|
|
||||||
hx-swap="innerHTML">
|
|
||||||
<div class="htmx-indicator">Loading...</div>
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.your-app-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## See Also
|
## App Guides
|
||||||
|
|
||||||
- [Suite Manual](../suite-manual.md) - Complete user guide
|
Learn more about each app:
|
||||||
- [HTMX Architecture](../htmx-architecture.md) - Technical details
|
|
||||||
- [UI Structure](../ui-structure.md) - File organization
|
- [Chat](./chat.md) - Talk to your AI assistant
|
||||||
- [Chapter 10: REST API](../../chapter-10-rest/README.md) - API reference
|
- [Drive](./drive.md) - Manage your files
|
||||||
|
- [Tasks](./tasks.md) - Track your to-dos
|
||||||
|
- [Mail](./mail.md) - Handle your email
|
||||||
|
- [Calendar](./calendar.md) - Manage your schedule
|
||||||
|
- [Meet](./meet.md) - Join video calls
|
||||||
|
- [Player](./player.md) - Play media files
|
||||||
|
- [Paper](./paper.md) - Write with AI
|
||||||
|
- [Research](./research.md) - Search smarter
|
||||||
|
- [Analytics](./analytics.md) - See your data
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Need Help?
|
||||||
|
|
||||||
|
Just ask in **Chat**: "How do I use [app name]?"
|
||||||
|
|
||||||
|
Your AI assistant knows all the apps and can guide you step by step.
|
||||||
|
|
@ -1,230 +1,126 @@
|
||||||
# Tasks - To-Do Management
|
# Tasks
|
||||||
|
|
||||||
> **Track what needs to be done**
|
> **Your personal to-do list**
|
||||||
|
|
||||||
<img src="../../assets/suite/tasks-screen.svg" alt="Tasks Interface Screen" style="max-width: 100%; height: auto;">
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Overview
|
## What is Tasks?
|
||||||
|
|
||||||
Tasks is your to-do list manager within General Bots Suite. Create tasks, set priorities, organize by category, and track your progress. Built with HTMX for instant updates without page reloads.
|
Tasks helps you keep track of what you need to do. Add tasks, check them off when done, and stay organized.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Features
|
## Adding a Task
|
||||||
|
|
||||||
### Adding Tasks
|
1. Type what you need to do in the text box
|
||||||
|
2. Click **+ Add Task** or press **Enter**
|
||||||
|
|
||||||
**Quick Add:**
|
That's it! Your task appears in the list.
|
||||||
1. Type task description in the input box
|
|
||||||
2. Press **Enter** or click **+ Add**
|
|
||||||
|
|
||||||
**With Details:**
|
### Optional: Add More Details
|
||||||
1. Type task description
|
|
||||||
2. Select a category (optional)
|
|
||||||
3. Pick a due date (optional)
|
|
||||||
4. Click **+ Add**
|
|
||||||
|
|
||||||
### Priority Levels
|
Before clicking Add, you can:
|
||||||
|
|
||||||
| Priority | Icon | When to Use |
|
- **Pick a category** - Work, Personal, Shopping, or Health
|
||||||
|----------|------|-------------|
|
- **Set a due date** - Click the calendar icon
|
||||||
| **High** | 🔴 | Must do today |
|
|
||||||
| **Medium** | 🟡 | Important but not urgent |
|
|
||||||
| **Low** | 🟢 | Can wait |
|
|
||||||
| **None** | ⚪ | No deadline |
|
|
||||||
|
|
||||||
### Categories
|
---
|
||||||
|
|
||||||
| Category | Icon |
|
## Completing Tasks
|
||||||
|----------|------|
|
|
||||||
| Work | 💼 |
|
|
||||||
| Personal | 🏠 |
|
|
||||||
| Shopping | 🛒 |
|
|
||||||
| Health | ❤️ |
|
|
||||||
| Custom | 🏷️ |
|
|
||||||
|
|
||||||
### Filter Tabs
|
Click the **checkbox** next to any task to mark it done.
|
||||||
|
|
||||||
| Tab | Shows |
|
Done tasks get a strikethrough and move to the Completed tab.
|
||||||
|-----|-------|
|
|
||||||
| **All** | All tasks |
|
**Changed your mind?** Click the checkbox again to un-complete it.
|
||||||
| **Active** | Uncompleted tasks |
|
|
||||||
| **Completed** | Done tasks |
|
---
|
||||||
| **Priority** | High priority only |
|
|
||||||
|
## Task Priority
|
||||||
|
|
||||||
|
Click the **star** ⭐ on any task to mark it as important.
|
||||||
|
|
||||||
|
Starred tasks appear in the **Priority** tab for quick access.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Filtering Your Tasks
|
||||||
|
|
||||||
|
Use the tabs at the top to see different views:
|
||||||
|
|
||||||
|
| Tab | What You See |
|
||||||
|
|-----|--------------|
|
||||||
|
| **All** | Everything |
|
||||||
|
| **Active** | Tasks not done yet |
|
||||||
|
| **Completed** | Tasks you finished |
|
||||||
|
| **Priority** | Starred tasks only |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Editing a Task
|
||||||
|
|
||||||
|
1. Click on the task text
|
||||||
|
2. Type your changes
|
||||||
|
3. Press **Enter** to save or **Escape** to cancel
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Deleting a Task
|
||||||
|
|
||||||
|
Click the **trash icon** 🗑️ on the right side of any task.
|
||||||
|
|
||||||
|
**Note:** This cannot be undone!
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Keyboard Shortcuts
|
## Keyboard Shortcuts
|
||||||
|
|
||||||
| Shortcut | Action |
|
| Press | What Happens |
|
||||||
|----------|--------|
|
|-------|--------------|
|
||||||
| `Enter` | Add task (when in input) |
|
| `Enter` | Add task (when typing) |
|
||||||
| `Space` | Toggle task completion |
|
|
||||||
| `Delete` | Remove selected task |
|
|
||||||
| `Tab` | Move to next field |
|
|
||||||
| `Escape` | Cancel editing |
|
| `Escape` | Cancel editing |
|
||||||
| `↑` / `↓` | Navigate tasks |
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Creating Tasks from Chat
|
## Creating Tasks from Chat
|
||||||
|
|
||||||
<div class="wa-chat">
|
You can also create tasks by talking to your bot:
|
||||||
<div class="wa-message user">
|
|
||||||
<div class="wa-bubble">
|
|
||||||
<p>Create a task to review the budget by Friday</p>
|
|
||||||
<div class="wa-time">10:30</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="wa-message bot">
|
|
||||||
<div class="wa-bubble">
|
|
||||||
<p>✅ Task created:</p>
|
|
||||||
<p>📋 Review the budget</p>
|
|
||||||
<p>📅 Due: Friday, March 22</p>
|
|
||||||
<p>🏷️ Category: Work</p>
|
|
||||||
<div class="wa-time">10:30</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
### Managing Tasks via Chat
|
**You:** "Remind me to call John tomorrow"
|
||||||
|
|
||||||
<div class="wa-chat">
|
**Bot:** "✅ Task created: Call John - Due: Tomorrow"
|
||||||
<div class="wa-message user">
|
|
||||||
<div class="wa-bubble">
|
|
||||||
<p>What tasks do I have today?</p>
|
|
||||||
<div class="wa-time">09:00</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="wa-message bot">
|
|
||||||
<div class="wa-bubble">
|
|
||||||
<p>📋 Today's Tasks (3 active):</p>
|
|
||||||
<p>🔴 Review quarterly report</p>
|
|
||||||
<p>🟡 Call client about proposal</p>
|
|
||||||
<p>🟢 Update project documentation</p>
|
|
||||||
<div class="wa-time">09:00</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="wa-message user">
|
|
||||||
<div class="wa-bubble">
|
|
||||||
<p>Mark the quarterly report as done</p>
|
|
||||||
<div class="wa-time">11:45</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="wa-message bot">
|
|
||||||
<div class="wa-bubble">
|
|
||||||
<p>✅ Task completed:</p>
|
|
||||||
<p>📋 Review quarterly report</p>
|
|
||||||
<p>You have 2 tasks remaining today.</p>
|
|
||||||
<div class="wa-time">11:45</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
### Setting Reminders
|
**You:** "What tasks do I have today?"
|
||||||
|
|
||||||
<div class="wa-chat">
|
**Bot:** "You have 3 tasks for today..."
|
||||||
<div class="wa-message user">
|
|
||||||
<div class="wa-bubble">
|
|
||||||
<p>Remind me to call John tomorrow at 3pm</p>
|
|
||||||
<div class="wa-time">14:20</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="wa-message bot">
|
|
||||||
<div class="wa-bubble">
|
|
||||||
<p>✅ Task created with reminder:</p>
|
|
||||||
<p>📋 Call John</p>
|
|
||||||
<p>📅 Tomorrow at 3:00 PM</p>
|
|
||||||
<p>🔔 Reminder set for 2:55 PM</p>
|
|
||||||
<div class="wa-time">14:20</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## API Endpoints
|
## Tips
|
||||||
|
|
||||||
| Endpoint | Method | Description |
|
- **Keep it simple** - Short task names are easier to scan
|
||||||
|----------|--------|-------------|
|
- **Use categories** - Helps you focus on one area at a time
|
||||||
| `/api/tasks` | GET | List all tasks |
|
- **Check daily** - Review your Active tasks each morning
|
||||||
| `/api/tasks` | POST | Create new task |
|
- **Celebrate wins** - Look at Completed to see your progress!
|
||||||
| `/api/tasks/:id` | GET | Get single task |
|
|
||||||
| `/api/tasks/:id` | PATCH | Update task |
|
|
||||||
| `/api/tasks/:id` | DELETE | Delete task |
|
|
||||||
| `/api/tasks/stats` | GET | Get task statistics |
|
|
||||||
|
|
||||||
### Query Parameters
|
|
||||||
|
|
||||||
| Parameter | Values | Default |
|
|
||||||
|-----------|--------|---------|
|
|
||||||
| `filter` | `all`, `active`, `completed`, `priority` | `all` |
|
|
||||||
| `category` | `work`, `personal`, `shopping`, `health` | none |
|
|
||||||
| `sort` | `created`, `dueDate`, `priority`, `text` | `created` |
|
|
||||||
| `order` | `asc`, `desc` | `desc` |
|
|
||||||
|
|
||||||
### Request Body (Create/Update)
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"text": "Review quarterly report",
|
|
||||||
"category": "work",
|
|
||||||
"dueDate": "2024-03-20",
|
|
||||||
"priority": "high",
|
|
||||||
"completed": false
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Response Format
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"id": 123,
|
|
||||||
"text": "Review quarterly report",
|
|
||||||
"category": "work",
|
|
||||||
"dueDate": "2024-03-20",
|
|
||||||
"priority": "high",
|
|
||||||
"completed": false,
|
|
||||||
"createdAt": "2024-03-18T10:30:00Z",
|
|
||||||
"updatedAt": "2024-03-18T10:30:00Z"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Integration with Calendar
|
|
||||||
|
|
||||||
Tasks with due dates automatically appear in your Calendar view, helping you visualize your workload across days and weeks.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### Tasks Not Saving
|
### My task didn't save
|
||||||
|
- Check your internet connection
|
||||||
|
- Refresh the page and try again
|
||||||
|
|
||||||
1. Check network connection
|
### I can't find my task
|
||||||
2. Verify API endpoint is accessible
|
- Check the **All** tab (not just Active)
|
||||||
3. Check browser console for errors
|
- Try scrolling down if you have many tasks
|
||||||
4. Try refreshing the page
|
|
||||||
|
|
||||||
### Filters Not Working
|
### Stats show wrong numbers
|
||||||
|
- Refresh the page
|
||||||
1. Click the filter tab again
|
|
||||||
2. Check if tasks exist for that filter
|
|
||||||
3. Clear browser cache
|
|
||||||
|
|
||||||
### Stats Not Updating
|
|
||||||
|
|
||||||
1. Reload the page
|
|
||||||
2. Check for JavaScript errors in console
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## See Also
|
## See Also
|
||||||
|
|
||||||
- [Suite Manual](../suite-manual.md) - Complete user guide
|
- [Calendar](./calendar.md) - Tasks with due dates show here too
|
||||||
- [Chat App](./chat.md) - Create tasks from chat
|
- [Chat](./chat.md) - Create tasks by talking to your bot
|
||||||
- [Calendar App](./calendar.md) - View tasks in calendar
|
|
||||||
- [Tasks API](../../chapter-10-rest/tasks-api.md) - API reference
|
|
||||||
256
src/06-gbdialog/api-possibilities.md
Normal file
256
src/06-gbdialog/api-possibilities.md
Normal file
|
|
@ -0,0 +1,256 @@
|
||||||
|
# API Possibilities
|
||||||
|
|
||||||
|
Your bot can connect to hundreds of external services. This chapter shows what's possible when you integrate APIs into your bot conversations.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## How API Integration Works
|
||||||
|
|
||||||
|
When users talk to your bot, it can:
|
||||||
|
|
||||||
|
1. **Fetch information** from external services (weather, news, prices)
|
||||||
|
2. **Send data** to other systems (CRM, email, databases)
|
||||||
|
3. **Automate workflows** across multiple services
|
||||||
|
|
||||||
|
The bot decides when to call APIs based on what the user asks.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## What You Can Build
|
||||||
|
|
||||||
|
### Customer Service Bot
|
||||||
|
- Look up orders from your e-commerce system
|
||||||
|
- Check shipping status from carriers
|
||||||
|
- Create support tickets automatically
|
||||||
|
|
||||||
|
### Sales Assistant
|
||||||
|
- Pull customer info from your CRM
|
||||||
|
- Check inventory levels
|
||||||
|
- Generate quotes and send emails
|
||||||
|
|
||||||
|
### Personal Assistant
|
||||||
|
- Get weather forecasts
|
||||||
|
- Check calendar availability
|
||||||
|
- Book appointments
|
||||||
|
|
||||||
|
### Data Dashboard Bot
|
||||||
|
- Pull metrics from analytics platforms
|
||||||
|
- Get stock prices and crypto rates
|
||||||
|
- Aggregate data from multiple sources
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Popular API Categories
|
||||||
|
|
||||||
|
### 🌤️ Weather & Environment
|
||||||
|
|
||||||
|
| Service | What You Can Do |
|
||||||
|
|---------|-----------------|
|
||||||
|
| OpenWeatherMap | Current weather, forecasts, alerts |
|
||||||
|
| AirVisual | Air quality index by location |
|
||||||
|
| Open-Meteo | Free weather data worldwide |
|
||||||
|
|
||||||
|
**Example conversation:**
|
||||||
|
|
||||||
|
> **User:** What's the weather in São Paulo?
|
||||||
|
>
|
||||||
|
> **Bot:** It's 24°C and partly cloudy in São Paulo. Expect rain this afternoon.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 💰 Finance & Payments
|
||||||
|
|
||||||
|
| Service | What You Can Do |
|
||||||
|
|---------|-----------------|
|
||||||
|
| Stripe | Process payments, manage subscriptions |
|
||||||
|
| CoinGecko | Crypto prices and market data |
|
||||||
|
| Exchange Rates | Currency conversion |
|
||||||
|
|
||||||
|
**Example conversation:**
|
||||||
|
|
||||||
|
> **User:** How much is Bitcoin right now?
|
||||||
|
>
|
||||||
|
> **Bot:** Bitcoin is currently $67,450 USD, up 2.3% today.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 📰 News & Content
|
||||||
|
|
||||||
|
| Service | What You Can Do |
|
||||||
|
|---------|-----------------|
|
||||||
|
| NewsAPI | Headlines from 150+ sources |
|
||||||
|
| Hacker News | Tech news and discussions |
|
||||||
|
| Reddit | Posts from any subreddit |
|
||||||
|
|
||||||
|
**Example conversation:**
|
||||||
|
|
||||||
|
> **User:** What's trending in tech news?
|
||||||
|
>
|
||||||
|
> **Bot:** Top stories: Apple announces new M4 chip, OpenAI releases GPT-5...
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 📧 Communication
|
||||||
|
|
||||||
|
| Service | What You Can Do |
|
||||||
|
|---------|-----------------|
|
||||||
|
| SendGrid | Send transactional emails |
|
||||||
|
| Twilio | SMS messages and voice calls |
|
||||||
|
| Slack | Post messages to channels |
|
||||||
|
|
||||||
|
**Example conversation:**
|
||||||
|
|
||||||
|
> **User:** Send the report to the team
|
||||||
|
>
|
||||||
|
> **Bot:** Done! I've emailed the Q3 report to the sales team and posted a summary in #sales-updates.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 🗺️ Maps & Location
|
||||||
|
|
||||||
|
| Service | What You Can Do |
|
||||||
|
|---------|-----------------|
|
||||||
|
| Google Maps | Directions, places, distances |
|
||||||
|
| OpenStreetMap | Free mapping data |
|
||||||
|
| IP Geolocation | Locate users by IP address |
|
||||||
|
|
||||||
|
**Example conversation:**
|
||||||
|
|
||||||
|
> **User:** How far is the airport?
|
||||||
|
>
|
||||||
|
> **Bot:** Guarulhos Airport is 25km away, about 45 minutes in current traffic.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 🛒 E-Commerce
|
||||||
|
|
||||||
|
| Service | What You Can Do |
|
||||||
|
|---------|-----------------|
|
||||||
|
| Shopify | Manage products and orders |
|
||||||
|
| WooCommerce | WordPress store integration |
|
||||||
|
| Stripe | Payment processing |
|
||||||
|
|
||||||
|
**Example conversation:**
|
||||||
|
|
||||||
|
> **User:** Check my order status
|
||||||
|
>
|
||||||
|
> **Bot:** Order #12345 shipped yesterday via FedEx. Expected delivery: Friday.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 📅 Productivity
|
||||||
|
|
||||||
|
| Service | What You Can Do |
|
||||||
|
|---------|-----------------|
|
||||||
|
| Google Calendar | Schedule events, check availability |
|
||||||
|
| Trello | Manage cards and boards |
|
||||||
|
| Notion | Create and update pages |
|
||||||
|
|
||||||
|
**Example conversation:**
|
||||||
|
|
||||||
|
> **User:** Schedule a meeting with John tomorrow at 2pm
|
||||||
|
>
|
||||||
|
> **Bot:** Done! I've added "Meeting with John" to your calendar for tomorrow at 2pm.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 🎵 Entertainment
|
||||||
|
|
||||||
|
| Service | What You Can Do |
|
||||||
|
|---------|-----------------|
|
||||||
|
| Spotify | Search songs, manage playlists |
|
||||||
|
| YouTube | Search videos, get info |
|
||||||
|
| TMDB | Movie and TV show data |
|
||||||
|
|
||||||
|
**Example conversation:**
|
||||||
|
|
||||||
|
> **User:** What movies are playing this weekend?
|
||||||
|
>
|
||||||
|
> **Bot:** Here's what's in theaters: Dune Part 3, The Avengers 6...
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 🏥 Health & Fitness
|
||||||
|
|
||||||
|
| Service | What You Can Do |
|
||||||
|
|---------|-----------------|
|
||||||
|
| Fitbit | Activity and sleep data |
|
||||||
|
| Nutritionix | Food and nutrition info |
|
||||||
|
| Strava | Running and cycling stats |
|
||||||
|
|
||||||
|
**Example conversation:**
|
||||||
|
|
||||||
|
> **User:** How many calories in a Big Mac?
|
||||||
|
>
|
||||||
|
> **Bot:** A Big Mac has 563 calories, 33g fat, and 25g protein.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 🔐 Authentication
|
||||||
|
|
||||||
|
| Service | What You Can Do |
|
||||||
|
|---------|-----------------|
|
||||||
|
| Auth0 | User login and registration |
|
||||||
|
| Firebase Auth | Google, Facebook, email login |
|
||||||
|
| Have I Been Pwned | Check for data breaches |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 🛠️ Developer Tools
|
||||||
|
|
||||||
|
| Service | What You Can Do |
|
||||||
|
|---------|-----------------|
|
||||||
|
| GitHub | Repo info, issues, PRs |
|
||||||
|
| Jira | Create and manage tickets |
|
||||||
|
| Sentry | Error tracking and alerts |
|
||||||
|
|
||||||
|
**Example conversation:**
|
||||||
|
|
||||||
|
> **User:** Create a bug ticket for the login issue
|
||||||
|
>
|
||||||
|
> **Bot:** Created PROJ-456: "Login button not responding on mobile" - assigned to dev team.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## API Marketplaces
|
||||||
|
|
||||||
|
Find more APIs at:
|
||||||
|
|
||||||
|
- **RapidAPI** - 40,000+ APIs in one place
|
||||||
|
- **APILayer** - Curated collection of useful APIs
|
||||||
|
- **Public APIs** - Free API directory
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Things to Consider
|
||||||
|
|
||||||
|
### Rate Limits
|
||||||
|
Most APIs limit how many requests you can make. Plan for this in high-traffic bots.
|
||||||
|
|
||||||
|
### API Keys
|
||||||
|
Keep your API keys secure. Never expose them in client-side code.
|
||||||
|
|
||||||
|
### Costs
|
||||||
|
Many APIs are free up to a limit, then charge per request. Monitor your usage.
|
||||||
|
|
||||||
|
### Reliability
|
||||||
|
Have fallback responses when APIs are slow or unavailable.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
1. **Choose an API** that matches what your bot needs to do
|
||||||
|
2. **Get API credentials** (usually free to sign up)
|
||||||
|
3. **Create a tool** in your `.gbdialog` folder that calls the API
|
||||||
|
4. **Test it** by asking your bot questions that trigger the API
|
||||||
|
|
||||||
|
Your bot's LLM automatically learns when to use each tool based on what users ask.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [Keywords Reference](./keywords.md) - BASIC commands for API calls
|
||||||
|
- [HTTP Operations](./keywords-http.md) - GET, POST, PUT, PATCH, DELETE
|
||||||
|
- [Tools and Integration](../09-tools/README.md) - Building custom tools
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
|
|
||||||
- [Chapter 06: gbdialog Reference](./06-gbdialog/README.md)
|
- [Chapter 06: gbdialog Reference](./06-gbdialog/README.md)
|
||||||
- [Dialog Basics](./06-gbdialog/basics.md)
|
- [Dialog Basics](./06-gbdialog/basics.md)
|
||||||
|
- [API Possibilities](./06-gbdialog/api-possibilities.md)
|
||||||
- [Universal Messaging & Multi-Channel](./06-gbdialog/universal-messaging.md)
|
- [Universal Messaging & Multi-Channel](./06-gbdialog/universal-messaging.md)
|
||||||
- [BASIC vs n8n/Zapier/Make](./06-gbdialog/basic-vs-automation-tools.md)
|
- [BASIC vs n8n/Zapier/Make](./06-gbdialog/basic-vs-automation-tools.md)
|
||||||
- [Template Variables](./06-gbdialog/template-variables.md)
|
- [Template Variables](./06-gbdialog/template-variables.md)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||||
<path d="M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
<circle cx="12" cy="12" r="3"/>
|
||||||
<path d="M19.4 15C19.2669 15.3016 19.2272 15.6362 19.286 15.9606C19.3448 16.285 19.4995 16.5843 19.73 16.82L19.79 16.88C19.976 17.0657 20.1235 17.2863 20.2241 17.5291C20.3248 17.7719 20.3766 18.0322 20.3766 18.295C20.3766 18.5578 20.3248 18.8181 20.2241 19.0609C20.1235 19.3037 19.976 19.5243 19.79 19.71C19.6043 19.896 19.3837 20.0435 19.1409 20.1441C18.8981 20.2448 18.6378 20.2966 18.375 20.2966C18.1122 20.2966 17.8519 20.2448 17.6091 20.1441C17.3663 20.0435 17.1457 19.896 16.96 19.71L16.9 19.65C16.6643 19.4195 16.365 19.2648 16.0406 19.206C15.7162 19.1472 15.3816 19.1869 15.08 19.32C14.7842 19.4468 14.532 19.6572 14.3543 19.9255C14.1766 20.1938 14.0813 20.5082 14.08 20.83V21C14.08 21.5304 13.8693 22.0391 13.4942 22.4142C13.1191 22.7893 12.6104 23 12.08 23C11.5496 23 11.0409 22.7893 10.6658 22.4142C10.2907 22.0391 10.08 21.5304 10.08 21V20.91C10.0723 20.579 9.96512 20.258 9.77251 19.9887C9.5799 19.7194 9.31074 19.5143 9 19.4C8.69838 19.2669 8.36381 19.2272 8.03941 19.286C7.71502 19.3448 7.41568 19.4995 7.18 19.73L7.12 19.79C6.93425 19.976 6.71368 20.1235 6.47088 20.2241C6.22808 20.3248 5.96783 20.3766 5.705 20.3766C5.44217 20.3766 5.18192 20.3248 4.93912 20.2241C4.69632 20.1235 4.47575 19.976 4.29 19.79C4.10405 19.6043 3.95653 19.3837 3.85588 19.1409C3.75523 18.8981 3.70343 18.6378 3.70343 18.375C3.70343 18.1122 3.75523 17.8519 3.85588 17.6091C3.95653 17.3663 4.10405 17.1457 4.29 16.96L4.35 16.9C4.58054 16.6643 4.73519 16.365 4.794 16.0406C4.85282 15.7162 4.81312 15.3816 4.68 15.08C4.55324 14.7842 4.34276 14.532 4.07447 14.3543C3.80618 14.1766 3.49179 14.0813 3.17 14.08H3C2.46957 14.08 1.96086 13.8693 1.58579 13.4942C1.21071 13.1191 1 12.6104 1 12.08C1 11.5496 1.21071 11.0409 1.58579 10.6658C1.96086 10.2907 2.46957 10.08 3 10.08H3.09C3.42099 10.0723 3.742 9.96512 4.0113 9.77251C4.28059 9.5799 4.48572 9.31074 4.6 9C4.73312 8.69838 4.77282 8.36381 4.714 8.03941C4.65519 7.71502 4.50054 7.41568 4.27 7.18L4.21 7.12C4.02405 6.93425 3.87653 6.71368 3.77588 6.47088C3.67523 6.22808 3.62343 5.96783 3.62343 5.705C3.62343 5.44217 3.67523 5.18192 3.77588 4.93912C3.87653 4.69632 4.02405 4.47575 4.21 4.29C4.39575 4.10405 4.61632 3.95653 4.85912 3.85588C5.10192 3.75523 5.36217 3.70343 5.625 3.70343C5.88783 3.70343 6.14808 3.75523 6.39088 3.85588C6.63368 3.95653 6.85425 4.10405 7.04 4.29L7.1 4.35C7.33568 4.58054 7.63502 4.73519 7.95941 4.794C8.28381 4.85282 8.61838 4.81312 8.92 4.68H9C9.29577 4.55324 9.54802 4.34276 9.72569 4.07447C9.90337 3.80618 9.99872 3.49179 10 3.17V3C10 2.46957 10.2107 1.96086 10.5858 1.58579C10.9609 1.21071 11.4696 1 12 1C12.5304 1 13.0391 1.21071 13.4142 1.58579C13.7893 1.96086 14 2.46957 14 3V3.09C14.0013 3.41179 14.0966 3.72618 14.2743 3.99447C14.452 4.26276 14.7042 4.47324 15 4.6C15.3016 4.73312 15.6362 4.77282 15.9606 4.714C16.285 4.65519 16.5843 4.50054 16.82 4.27L16.88 4.21C17.0657 4.02405 17.2863 3.87653 17.5291 3.77588C17.7719 3.67523 18.0322 3.62343 18.295 3.62343C18.5578 3.62343 18.8181 3.67523 19.0609 3.77588C19.3037 3.87653 19.5243 4.02405 19.71 4.21C19.896 4.39575 20.0435 4.61632 20.1441 4.85912C20.2448 5.10192 20.2966 5.36217 20.2966 5.625C20.2966 5.88783 20.2448 6.14808 20.1441 6.39088C20.0435 6.63368 19.896 6.85425 19.71 7.04L19.65 7.1C19.4195 7.33568 19.2648 7.63502 19.206 7.95941C19.1472 8.28381 19.1869 8.61838 19.32 8.92V9C19.4468 9.29577 19.6572 9.54802 19.9255 9.72569C20.1938 9.90337 20.5082 9.99872 20.83 10H21C21.5304 10 22.0391 10.2107 22.4142 10.5858C22.7893 10.9609 23 11.4696 23 12C23 12.5304 22.7893 13.0391 22.4142 13.4142C22.0391 13.7893 21.5304 14 21 14H20.91C20.5882 14.0013 20.2738 14.0966 20.0055 14.2743C19.7372 14.452 19.5268 14.7042 19.4 15Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 974 B |
Loading…
Add table
Reference in a new issue