mmk-notion-onboardlisted
Install: claude install-skill magic-meal-kits/mmk-skills
# Recipe: Notion Invite with Gmail Fallback
> **Prerequisite:** Read [`../mmk-shared/SKILL.md`](../mmk-shared/SKILL.md) for auth, global flags, and error handling.
> Uses: [`mmk-notion-page`](../mmk-notion-page/SKILL.md) — Page invite command.
A multi-step workflow that invites a user to a Notion page, and if they don't have a Notion account, sends them a signup email via Gmail.
**This recipe has side effects** (sends real emails). It requires manual invocation only.
## Prerequisites
Both CLIs must be installed and authenticated:
- `mmk` — Magic Meal Kits CLI (`npm install -g @magic-meal-kits/cli@beta`)
- `gws` — Google Workspace CLI
## Workflow
### Step 1: Attempt Notion Page Invite
```bash
mmk notion page invite --email <email> --role <role> --block-id <block-id> -o json 2>&1
```
Check the exit code:
- **Exit 0** → Success. Report to user and stop.
- **Non-zero** → Parse the error output. Continue to Step 2.
### Step 2: Analyze the Error
Capture both stdout and stderr from the invite command:
```bash
result=$(mmk notion page invite --email <email> --role <role> --block-id <block-id> -o json 2>&1)
exit_code=$?
```
Determine the failure reason:
- If the error indicates the email is **not associated with a Notion account** (non-Notion user) → proceed to Step 3
- If it's a **different error** (auth failure, invalid block-id, permission denied) → report the error to the user and stop
### Step 3: Send Signup Email via Gmail
Send an email asking the user to create a