← All runbooks
gooseworks-ai / client-package-notion

create-client-package-notion

Package all GTM work done for a client into a structured, shareable Notion page with subpages and linked Google Sheets. The agent reads the client's workspace folder (strategies, campaigns, content, leads, notes) and builds a navigable delivery package. Lead list CSVs are uploade

agent claude-codemodel claude-sonnet-4-6snapshot python312-uveval programmatic9 stepsv1.0.0

Deploy create-client-package-notion to your jetty.io

One-click installs this runbook into a collection on your Jetty account. You can run it from the Spot dashboard, schedule it, or pipe inputs in via the API.

The shape of the run

9 steps · start to finish.

  1. 1
    Step 1

    Environment Setup

    Verify required MCP connections are active before proceeding.

    # Confirm MCP server availability
    # Check Notion MCP is connected by attempting a lightweight API call
    # Check Rube MCP is connected for Google Sheets access
    
    import os, pathlib
    
    client_name = os.environ.get("CLIENT_NAME", "")
    if not client_name:
        raise ValueError("CLIENT_NAME is required. Set it before running this runbook.")
    
    client_dir = pathlib.Path(f"clients/{client_name}")
    if not client_dir.exists():
        raise FileNotFoundError(f"Client directory not found: {client_dir}")
    
    results_dir = pathlib.Path("/app/results")
    results_dir.mkdir(parents=True, exist_ok=True)
    
    print(f"Client: {client_name}")
    print(f"Client folder: {client_dir} (exists: {client_dir.exists()})")
    

    If either MCP server is unavailable, fail fast:

    • Notion MCP missing: Run RUBE_MANAGE_CONNECTIONS with toolkits: ["notion"] to reconnect, or check MCP server config.
    • Rube MCP missing: Run RUBE_MANAGE_CONNECTIONS with toolkits: ["googlesheets"] to reconnect.
  2. 2
    Step 2

    Scan the Client Folder

    Read the client folder at `clients/<client_name>/` and inventory all available assets.

  3. 3
    Step 3

    Upload Lead Lists to Google Sheets

    For each `.csv` file found in `leads/` (run in parallel where possible):

  4. 4
    Step 4

    Plan the Notion Page Structure

    Design the page hierarchy based on what assets exist. The general pattern is:

  5. 5
    Step 5

    Create the Top-Level Notion Page

    Create a standalone workspace-level page with:

  6. 6
    Step 6

    Create Subpages

    For each section in the planned structure, create subpages under the top-level page. Create pages in batches where possible (max 3 rounds of batch creation if API errors occur).

  7. 7
    Step 7

    Iterate on Errors (max 3 rounds)

    If any page creation fails:

  8. 8
    Step 8

    Verify and Write Output Files

    After all pages are created, collect results and write output files.

  9. 9
    Step 9

    Write Summary and Validation Report

    Write `/app/results/summary.md` and `/app/results/validation_report.json`.