A Getting Things Done (GTD) bot for Google Chat that helps you manage tasks through simple commands.
- Add tasks: Create new tasks with the
addcommand - List tasks: View all your tasks with their completion status
- Mark tasks as done: Complete tasks using the
donecommand
| Command | Description | Example |
|---|---|---|
add <task> |
Add a new task | add Buy groceries |
list |
List all tasks | list |
done <id> |
Mark task as done | done 1 |
# Deploy the application
encore app create gtd-agent
encore run- Go to Google Chat API
- Create a new webhook
- Set the webhook URL to:
https://your-app.encore.app/chat - Configure the webhook to send messages to your chat
The application automatically creates the required database table when deployed. The tasks table has the following structure:
CREATE TABLE tasks (
id SERIAL PRIMARY KEY,
content TEXT NOT NULL,
done BOOLEAN DEFAULT FALSE
);- URL:
/chat - Method:
POST - Content-Type:
application/json
{
"message": {
"text": "add Buy groceries"
}
}{
"text": "✅ Task added with ID: 1"
}- Go 1.24.2 or later
- Encore CLI
# Install dependencies
go mod tidy
# Run the application
encore runThe application will be available at http://localhost:4000/chat for local development.
- Framework: Encore (Go)
- Database: PostgreSQL (managed by Encore)
- API: RESTful webhook endpoint
- Pattern: Command-based message processing
The bot uses regular expressions to parse incoming messages and route them to the appropriate command handlers. Each command interacts with the PostgreSQL database to perform CRUD operations on tasks.