Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/thor-example-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Thor example CI

on:
push:
branches: [main]
paths:
- "examples/thor-slack-agent/**"
- ".github/workflows/thor-example-ci.yml"
pull_request:
paths:
- "examples/thor-slack-agent/**"
- ".github/workflows/thor-example-ci.yml"

jobs:
typecheck:
runs-on: ubuntu-latest
defaults:
run:
working-directory: examples/thor-slack-agent
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm run typecheck
- run: npm run build
6 changes: 6 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ PORT=3001 npx @taskade/mcp-server --http --token YOUR_TASKADE_API_KEY

Then configure the n8n MCP node to use **HTTP Streamable** transport with URL `http://localhost:3001/mcp`.

## Thor — Slack AI agent

[Thor](./thor-slack-agent) is a Slack AI agent powered by the Taskade MCP server. Mention `@Thor` in a channel or DM him, and he reasons with Claude and acts on your Taskade workspace — creating projects, capturing tasks, and organizing work without leaving Slack.

See [`./thor-slack-agent`](./thor-slack-agent) for setup and the Slack app manifest.

## More examples coming soon

- CrewAI integration
Expand Down
40 changes: 40 additions & 0 deletions examples/flipreseller-automations/OPERATIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# FlipReseller — Operations Runbook

How the pieces fit and how to run day-to-day. This is the human index for the automation blueprints in this folder.

## The system at a glance

- **Thor** (Slack agent, `../thor-slack-agent`) — mention him in a thread to turn conversation into Taskade projects/tasks.
- **Taskade** — Thor's tool belt (projects, tasks, agents).
- **Notion — FlipReseller** — the source of truth: Inventory, Tasks, Sources, Sales Log (schema in `notion-schema.md`).
- **Todoist — FlipReseller** — quick/mobile capture; syncs to Notion via Make.
- **Make.com** — the glue (scenarios in `make-scenarios.md`); Zapier backs up single hops (`zapier-recipes.md`).
- **GitHub → Slack** — dev notifications (`github-setup.md`).

## Channel map (live)

| Purpose | Channel |
| --- | --- |
| Sourcing intake (`!source …`) | `#flipreseller-operations` |
| Sold notifications | `#sales-agent` |
| Daily digest | `#flipreseller` |
| GitHub activity | `#flipreseller-dev` |

## Capture conventions

- **Log a find:** in `#flipreseller-operations`, post
`!source <item> | cost <n> | platform <ebay|poshmark|mercari|fb>`
→ Make creates an Inventory row (Status = Sourced) and a Todoist "List <item>" task.
- **Turn a thread into work:** `@Thor capture this thread into a Taskade project`.
- **Mark sold:** set an Inventory item's Status = Sold in Notion → Make logs the sale and posts to `#sales-agent`.

## Daily / weekly cadence (mirrored in Todoist)

- **Daily:** flip review — listings, orders, buyer messages.
- **Weekly:** sourcing run; P&L reconciliation (cost, fees, shipping, net).

## Status & what's left

- Done: Thor agent, Todoist project, Notion HQ page, automation blueprints.
- Pending — **Notion databases:** create the four under FlipReseller HQ (blocked only on the Notion connector being live).
- Pending — **Make scenarios:** connect Slack/Notion/Todoist in Make → *Connections*, free a scenario slot (Free plan = 2 active), then build A–D from `make-scenarios.md`.
47 changes: 47 additions & 0 deletions examples/flipreseller-automations/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# ⚡ FlipReseller Automations

The automation layer that wires your reselling stack together — **Slack**, **Taskade** (via Thor), **Notion** (FlipReseller workspace), **Todoist**, **GitHub**, glued with **Make.com** (primary) and **Zapier** (backup).

## The stack, by job

| Layer | Tool | Role |
| --- | --- | --- |
| Conversation | Slack | Where the team works; where Thor lives |
| Agents | Thor + Claude | Turn conversation into structured action |
| Projects/Tasks | Taskade | Thor's native tool belt |
| Source of truth | Notion (FlipReseller) | Inventory, sales, sources, tasks |
| Personal tasks | Todoist | Quick capture / on-the-go |
| Code | GitHub | This repo + notifications |
| Glue | Make.com / Zapier | Move data between the above |

## Data flow (the big picture)

```
Slack thread ──@Thor──▶ Taskade project/tasks
│ │
│ (!source keyword) │ (Make: Todoist/Taskade → Notion)
▼ ▼
Make scenario ─────────▶ Notion: Inventory + Tasks (FlipReseller)
▲ │
│ │ (Status = Sold)
Todoist ◀── list task ▼
Notion: Sales Log ──▶ Slack #sales-agent 🎉
```

## Build order

1. **Notion** — create the FlipReseller workspace and databases → [`notion-schema.md`](./notion-schema.md).
2. **Todoist** — create a `FlipReseller` project (one line, in the app).
3. **Make.com** — connect Slack, Notion, Todoist, then build the scenarios → [`make-scenarios.md`](./make-scenarios.md).
4. **Zapier** — optional single-step backups → [`zapier-recipes.md`](./zapier-recipes.md).
5. **GitHub** — repo notifications into Slack → [`github-setup.md`](./github-setup.md).

> Channel mapping in use: sourcing → #flipreseller-operations, sold → #sales-agent, digest → #flipreseller, GitHub → #flipreseller-dev.

## Free-tier budget (keep it $0)

- **Make free:** 1,000 ops/mo, 15-min min interval. Put the daily digest on a schedule; keep instant triggers for low-volume events (sales, sourcing).
- **Zapier free:** 100 tasks/mo, single-step. Use only for 1–2 high-value one-hop zaps.
- **Notion / Todoist / GitHub free:** unlimited for this usage.

Rule of thumb: **Make for anything multi-step or branching; Zapier only when Make would burn ops on a trivial one-hop.**
16 changes: 16 additions & 0 deletions examples/flipreseller-automations/github-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# FlipReseller — GitHub → Slack

## 1. Native notifications (no code)
In your Slack channel (e.g. #flipreseller-dev):
```
/github subscribe samuelfreemanjobs-hash/mcp
```
Tune the event types:
```
/github subscribe samuelfreemanjobs-hash/mcp pulls issues commits releases
/github unsubscribe samuelfreemanjobs-hash/mcp deployments
```
Link your account for richer previews: `/github signin`.

## 2. Optional — release ping via Actions
For a custom Slack message on release, add a workflow that posts to a Slack Incoming Webhook. Store the webhook URL as a repo secret `SLACK_WEBHOOK_URL` and post with a `curl` step on the `release: published` event. (Kept out of this repo by default so the examples need no secrets to run.)
42 changes: 42 additions & 0 deletions examples/flipreseller-automations/make-scenarios.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# FlipReseller — Make.com scenarios

> ⚠️ Heads-up on your current Make org: it's on the **Free plan (max 2 active scenarios)** and already has 2, and none of Slack/Notion/Todoist are connected under *Connections* yet. Before these run, connect those three apps and free up a scenario slot (or upgrade).

Primary automation layer. First, in Make → *Connections*, connect **Slack**, **Notion**, and **Todoist** (OAuth). Then build these scenarios. Each lists its modules top-to-bottom; when a step maps a Notion property, you pick the database once and Make surfaces its fields.

## Scenario A — Todoist task → Notion Task
Keep every to-do in one place.

1. **Todoist ▸ Watch Tasks** — trigger; project = `FlipReseller`.
2. **Notion ▸ Create a Database Item** — database = *Tasks*.
- Task = `{{Todoist content}}`
- Due = `{{Todoist due date}}`
- Origin = `Todoist`
- Status = `To do`

Schedule: every 15 min (free-tier minimum). ~1 op/run.

## Scenario B — Slack sourcing intake → Notion Inventory + Todoist
Post `!source <item> | cost <n> | platform <x>` in **#flipreseller-operations** and it's captured.

1. **Slack ▸ Watch Public Channel Messages** — channel = `#flipreseller-operations`.
2. **Filter** — continue only if text starts with `!source`.
3. **Set variables / parse** — split on `|` to get item, cost, platform.
4. **Notion ▸ Create a Database Item** — database = *Inventory*: Item = parsed item, Status = `Sourced`, Cost = parsed cost, Platform = parsed platform.
5. **Todoist ▸ Create a Task** — content = `List {{item}}`, project = `FlipReseller`, due = `today +2 days`.
6. **Slack ▸ Create a Message** — channel `#flipreseller-operations`, threaded on the trigger message: "📦 Logged _{{item}}_ to Inventory and queued a listing task."

## Scenario C — Item sold → Sales Log + celebrate
1. **Notion ▸ Watch Database Items** — database = *Inventory*, watch updated, filter `Status = Sold`.
2. **Notion ▸ Create a Database Item** — database = *Sales Log*: map Item (relation), Platform, Sale Price, Fees, Shipping, Net = `{{Net Profit}}`, Sold On = now.
3. **Slack ▸ Create a Message** — channel `#sales-agent`: "🎉 SOLD: *{{Item}}* for ${{Sale Price}} (net ${{Net Profit}}) on {{Platform}}."

## Scenario D — Daily digest
1. **Schedule** — daily 08:00.
2. **Notion ▸ Search Database Items** — *Inventory*, filter `Status = Listed` (aging stock).
3. **Notion ▸ Search Database Items** — *Tasks*, filter `Due ≤ today` and `Status ≠ Done`.
4. **Array aggregator → Text** — build a summary.
5. **Slack ▸ Create a Message** — channel `#flipreseller`: today's open tasks + items live > 14 days.

## Op budget
A + C + D at low volume, plus occasional B, stays well under Make's 1,000 ops/mo free tier. If Scenario A's 15-min polling gets heavy, move Todoist capture to Zapier (see `zapier-recipes.md`) to save Make ops.
73 changes: 73 additions & 0 deletions examples/flipreseller-automations/notion-schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# FlipReseller — Notion schema

Create a Notion workspace named **FlipReseller** (Notion → workspace switcher → *Create workspace*; the API cannot create workspaces). Inside it, create one parent page **FlipReseller HQ** and add these four full-page databases.

## 1. Inventory
The heart of the system — one row per item you source.

| Property | Type | Notes |
| --- | --- | --- |
| Item | Title | e.g. "Nike Air Max 90 — sz 10" |
| Status | Select | Sourced · Listed · Sold · Shipped · Returned |
| Platform | Select | eBay · Poshmark · Mercari · FB Marketplace |
| SKU | Text | your internal code |
| Cost | Number ($) | what you paid |
| List Price | Number ($) | asking price |
| Sale Price | Number ($) | actual |
| Fees | Number ($) | platform + payment fees |
| Shipping | Number ($) | your cost to ship |
| Net Profit | Formula | see below |
| Source | Relation → Sources | where it came from |
| Tasks | Relation → Tasks | to-dos for this item |
| Listing URL | URL | live listing |
| Photos | Files | |
| Date Sourced | Date | |
| Date Sold | Date | |

**Net Profit** formula:
```
prop("Sale Price") - prop("Cost") - prop("Fees") - prop("Shipping")
```

## 2. Tasks
Operational to-dos, fed by Thor/Taskade, Todoist, and Slack.

| Property | Type | Notes |
| --- | --- | --- |
| Task | Title | |
| Status | Status | To do · Doing · Done |
| Priority | Select | Low · Med · High |
| Due | Date | |
| Item | Relation → Inventory | optional |
| Origin | Select | Slack · Taskade · Todoist · Manual |

## 3. Sources
Where inventory comes from.

| Property | Type |
| --- | --- |
| Name | Title |
| Type | Select (Thrift · Estate · Wholesale · Online · Consignment) |
| Location | Text |
| Reliability | Select (A · B · C) |
| Notes | Text |

## 4. Sales Log
One row per completed sale (created automatically when an item flips to Sold).

| Property | Type |
| --- | --- |
| Item | Relation → Inventory |
| Platform | Select |
| Sale Price | Number ($) |
| Fees | Number ($) |
| Shipping | Number ($) |
| Net | Number ($) |
| Sold On | Date |

## Dashboards (optional)
On **FlipReseller HQ**, add linked views:
- Inventory board grouped by Status
- Inventory filtered `Status = Listed` (what's live)
- Sales Log this month with a Net sum
- Tasks filtered `Due ≤ today`
17 changes: 17 additions & 0 deletions examples/flipreseller-automations/zapier-recipes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# FlipReseller — Zapier recipes (free-tier backups)

Zapier free = 100 tasks/mo, single-step. Use it only where a one-hop zap saves Make ops. Build each at zapier.com → *Create Zap*.

## Zap 1 — New Todoist task → Notion Task
- **Trigger:** Todoist ▸ New Task (project `FlipReseller`)
- **Action:** Notion ▸ Create Database Item (*Tasks*): Task = task content, Origin = Todoist.

Use this INSTEAD of Make Scenario A if you'd rather save Make ops.

## Zap 2 — Notion sold item → Slack
- **Trigger:** Notion ▸ Updated Database Item (*Inventory*, Status = Sold)
- **Action:** Slack ▸ Send Channel Message (#sales-agent): "🎉 Sold {{Item}} for ${{Sale Price}}".

Single-step alternative to Make Scenario C's Slack step.

> Don't run the Make and Zapier versions of the same flow at once — pick one per flow to avoid duplicates and wasted quota.
3 changes: 3 additions & 0 deletions examples/thor-slack-agent/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
.env
19 changes: 19 additions & 0 deletions examples/thor-slack-agent/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Anthropic API key — powers Thor's reasoning
ANTHROPIC_API_KEY=

# Model Thor thinks with (defaults to a current Claude model)
THOR_MODEL=claude-sonnet-5

# Taskade API key — the tools Thor wields (get one at https://www.taskade.com/settings/password)
TASKADE_API_KEY=

# Slack credentials (Socket Mode — no public URL required)
SLACK_BOT_TOKEN=xoxb-...
SLACK_APP_TOKEN=xapp-...
SLACK_SIGNING_SECRET=

# Optional tuning
# THOR_MAX_STEPS=12
# Optional: command used to launch the Taskade MCP server (defaults shown)
# TASKADE_MCP_COMMAND=npx
# TASKADE_MCP_ARGS=-y,@taskade/mcp-server
4 changes: 4 additions & 0 deletions examples/thor-slack-agent/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
dist/
.env
package-lock.json
21 changes: 21 additions & 0 deletions examples/thor-slack-agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Thor — Slack AI agent (Socket Mode: dials out, no inbound ports)
FROM node:20-slim

WORKDIR /app

# Install deps first for better layer caching.
COPY package.json ./
RUN npm install

# Build.
COPY tsconfig.json ./
COPY src ./src
RUN npm run build

# Pre-install the Taskade MCP server so Thor doesn't fetch it on each cold start.
RUN npm install -g @taskade/mcp-server
ENV TASKADE_MCP_COMMAND=taskade-mcp-server
ENV TASKADE_MCP_ARGS=

# Socket Mode means Thor connects OUT to Slack, so no port is exposed.
CMD ["node", "dist/index.js"]
Loading