Quarterly Review Dashboard

L3
ModelContextProtocolNotionCompany In A Box

Create a quarterly business review dashboard in Notion based on the existing Company In A Box workspace with department objectives and action items database.

Created by Zijian Wu
2025-07-27
Database ManipulationData AggregationReport GenerationStatus TrackingTemplate Population

Model Ranking

Click on the dots to view the trajectory of each task run
Model
Run Results
Pass@4
Pass^4
Avg Time
Avg Turns
Input Tokens
Output Tokens
Total Tokens
Claude
claude-opus-4-1
0
/1
--
497.6s
25.0
824,570
6,513
831,083
Claude
claude-sonnet-4
0
/4
391.2s
41.5
1,664,334
7,901
1,672,234
Claude
claude-sonnet-4-high
0
/4
293.5s
35.0
1,564,092
7,198
1,571,290
Claude
claude-sonnet-4-low
0
/4
313.6s
40.0
1,438,354
7,275
1,445,628
DeepSeek
deepseek-chat
0
/4
277.2s
22.0
471,795
2,844
474,639
Gemini
gemini-2-5-flash
0
/4
26.3s
4.8
53,861
2,762
56,623
Gemini
gemini-2-5-pro
0
/4
58.9s
3.8
42,648
3,265
45,913
Z.ai
glm-4-5
0
/4
261.5s
32.0
784,249
5,677
789,926
OpenAI
gpt-4-1
0
/4
85.8s
14.0
226,154
2,806
228,960
OpenAI
gpt-4-1-mini
0
/4
49.0s
10.8
150,306
1,380
151,685
OpenAI
gpt-4-1-nano
0
/4
39.4s
12.3
106,912
1,327
108,239
OpenAI
gpt-5-high
0
/4
2318.2s
27.5
1,866,835
94,143
1,960,978
OpenAI
gpt-5-low
0
/4
1352.1s
36.3
1,172,089
70,732
1,242,821
OpenAI
gpt-5-medium
0
/4
1361.4s
36.0
1,754,469
76,406
1,830,874
OpenAI
gpt-5-mini-high
0
/4
366.2s
24.8
827,161
15,895
843,057
OpenAI
gpt-5-mini-low
0
/4
88.6s
18.8
303,796
4,574
308,369
OpenAI
gpt-5-mini-medium
0
/4
203.8s
30.0
649,008
13,230
662,238
OpenAI
gpt-5-nano-high
0
/4
609.6s
8.5
164,689
111,447
276,137
OpenAI
gpt-5-nano-low
0
/4
61.2s
4.8
25,780
11,385
37,165
OpenAI
gpt-5-nano-medium
0
/4
208.8s
9.8
103,909
44,598
148,506
OpenAI
gpt-oss-120b
0
/4
51.5s
9.5
115,858
2,611
118,468
Grok
grok-4
0
/4
757.7s
25.3
796,531
10,782
807,313
Grok
grok-code-fast-1
0
/4
589.5s
31.3
829,584
6,706
841,091
MoonshotAI
kimi-k2-0711
0
/4
162.7s
23.3
443,736
3,277
447,012
MoonshotAI
kimi-k2-0905
0
/4
390.4s
29.8
732,365
4,112
736,477
OpenAI
o3
0
/4
150.5s
13.8
184,144
5,806
189,951
OpenAI
o4-mini
0
/4
352.8s
24.3
425,401
23,599
449,000
Qwen
qwen-3-coder-plus
0
/4
115.4s
28.5
850,696
2,972
853,668
Qwen
qwen-3-max
0
/4
188.4s
30.3
692,801
4,805
697,606

Task State

Notion Workspace
This task is executed based on this Notion workspace
This workspace is cloned from notion official template marketplace.View Original Template

Instruction

Create a quarterly business review dashboard in Notion based on the existing Company In A Box workspace.

Task Requirements:

  1. Inside the Company Wiki page you will find a sub-page named Company Goals. Extract every departmental objective listed under the four departments — Product, Marketing, Sales, and HR.
  2. Under the top-level page Company In A Box, create a new child page titled Q4 2024 Business Review Dashboard.
  3. Inside that new page build the following structure (all parts must exist):
    1. A single callout block near the top that summarises progress toward the three Current Goals shown on the main page: • LATAM expansionEnterprise pushEmployee engagement
      (All three phrases must appear in the callout text.)
    2. Four separate section headings (any heading level) – one for each department (Product, Marketing, Sales, Human Resources) – placed below the callout. Under each heading list that department’s objectives in a progress-tracking format (e.g. to-dos, check-box list). Each objective from the Company Goals page must appear at least once.
    3. Add a database named Action Items with the following properties exactly: • Task Name – title • Department – select (options: Product, Marketing, Sales, HR) • Priority – select (options: High, Medium, Low) • Status – status Populate this database with ≥ 5 action-item pages derived from the departmental objectives, making sure every field in each entry is filled: • Task Name & Department must correctly correspond to the underlying objective/department. • Priority and Status can be any allowed value, but they must not be left empty.
  4. Keep the overall visual style consistent with the existing wiki (use headings, dividers, etc.).


Verify

*.py
Python
import sys
from typing import List
from notion_client import Client
from tasks.utils import notion_utils


def _contains_keywords(text: str, keywords: List[str]) -> bool:
    lowered = text.lower()
    return all(kw.lower() in lowered for kw in keywords)


def verify(notion: Client, main_id: str = None) -> bool:
    """Programmatically verify that the dashboard page and its contents meet the
    requirements described in description.md.
    """
    DASHBOARD_TITLE = "Q4 2024 Business Review Dashboard"
    PARENT_PAGE_TITLE = "Company In A Box"
    CALL_OUT_KEYWORDS = ["latam", "enterprise", "employee engagement"]
    DEPARTMENTS = ["Product", "Marketing", "Sales", "Human Resources"]
    REQUIRED_DB_PROPERTIES = {
        "Task Name": "title",
        "Department": "select",
        "Priority": "select",
        "Status": "status",
    }
    PRIORITY_OPTIONS = {"High", "Medium", "Low"}

    # 1. Locate the dashboard page
    page_id = None
    if main_id:
        found_id, obj_type = notion_utils.find_page_or_database_by_id(notion, main_id)
        if found_id and obj_type == "page":
            page_id = found_id

    if not page_id:
        page_id = notion_utils.find_page(notion, DASHBOARD_TITLE)

    if not page_id:
        print(f"Error: Page '{DASHBOARD_TITLE}' not found.", file=sys.stderr)
        return False

    # Optional: ensure it is a child of Company In A Box
    try:
        page_obj = notion.pages.retrieve(page_id=page_id)
        parent_id = page_obj.get("parent", {}).get("page_id")
        if parent_id:
            parent_page = notion.pages.retrieve(page_id=parent_id)
            parent_title_rt = (
                parent_page.get("properties", {}).get("title", {}).get("title", [])
            )
            parent_title = (
                parent_title_rt[0].get("plain_text") if parent_title_rt else None
            )
            if parent_title != PARENT_PAGE_TITLE:
                print(
                    f"Error: Dashboard page is not a direct child of '{PARENT_PAGE_TITLE}'.",
                    file=sys.stderr,
                )
                return False
    except Exception:
        pass  # parent check is best-effort only

    # 2. Verify callout with keywords
    all_blocks = notion_utils.get_all_blocks_recursively(notion, page_id)
    callout_ok = False
    for block in all_blocks:
        if block.get("type") == "callout":
            callout_text = notion_utils.get_block_plain_text(block)
            if _contains_keywords(callout_text, CALL_OUT_KEYWORDS):
                callout_ok = True
                break
    if not callout_ok:
        print(
            "Error: No callout found that includes all three Current Goal keywords (LATAM, Enterprise, Employee engagement).",
            file=sys.stderr,
        )
        return False

    # 3. Verify department section headings
    found_depts = set()
    for block in all_blocks:
        if block.get("type") in {"heading_1", "heading_2", "heading_3"}:
            heading_text = notion_utils.get_block_plain_text(block)
            for dept in DEPARTMENTS:
                if dept.lower() in heading_text.lower():
                    found_depts.add(dept)
    if set(DEPARTMENTS) != found_depts:
        missing = set(DEPARTMENTS) - found_depts
        print(
            f"Error: Missing department headings: {', '.join(missing)}.",
            file=sys.stderr,
        )
        return False

    # 4. Verify Action Items database exists and has correct schema
    db_id = notion_utils.find_database_in_block(notion, page_id, "Action Items")
    if not db_id:
        print(
            "Error: Database 'Action Items' not found on the dashboard.",
            file=sys.stderr,
        )
        return False

    try:
        db = notion.databases.retrieve(database_id=db_id)
    except Exception as exc:
        print(f"Error: Unable to retrieve database: {exc}", file=sys.stderr)
        return False

    db_props = db.get("properties", {})
    for prop_name, expected_type in REQUIRED_DB_PROPERTIES.items():
        if prop_name not in db_props:
            print(
                f"Error: Property '{prop_name}' missing from database.", file=sys.stderr
            )
            return False
        actual_type = db_props[prop_name]["type"]
        if isinstance(expected_type, list):
            if actual_type not in expected_type:
                print(
                    f"Error: Property '{prop_name}' has type '{actual_type}', expected one of {expected_type}.",
                    file=sys.stderr,
                )
                return False
        else:
            if actual_type != expected_type:
                print(
                    f"Error: Property '{prop_name}' has type '{actual_type}', expected '{expected_type}'.",
                    file=sys.stderr,
                )
                return False
        # Extra check for Priority options
        if prop_name == "Priority":
            options = {opt["name"] for opt in db_props[prop_name]["select"]["options"]}
            if not PRIORITY_OPTIONS.issubset(options):
                print(
                    f"Error: Priority property options must include High/Medium/Low. Current options: {options}",
                    file=sys.stderr,
                )
                return False

    # 5. Verify at least 5 action items exist
    try:
        pages = notion.databases.query(database_id=db_id).get("results", [])
    except Exception as exc:
        print(f"Error querying database pages: {exc}", file=sys.stderr)
        return False

    if len(pages) < 5:
        print("Error: Database contains fewer than 5 action items.", file=sys.stderr)
        return False

    # Optional: Verify Department values valid
    for page in pages:
        props = page.get("properties", {})

        # Task Name must be non-empty
        title_rt = props.get("Task Name", {}).get("title", [])
        task_name = title_rt[0].get("plain_text") if title_rt else ""
        if not task_name.strip():
            print(
                f"Error: Action item '{page.get('id')}' is missing a Task Name.",
                file=sys.stderr,
            )
            return False

        # Department must be valid
        dept_select = props.get("Department", {}).get("select", {}).get("name")
        if not dept_select or dept_select not in DEPARTMENTS:
            print(
                f"Error: Action item '{page.get('id')}' has invalid or missing Department value.",
                file=sys.stderr,
            )
            return False

        # Priority and Status must be set (any value)
        priority_val = props.get("Priority", {}).get("select", {}).get("name")
        status_val = props.get("Status", {}).get("status", {}).get("name")
        if not priority_val or not status_val:
            print(
                f"Error: Action item '{page.get('id')}' must have both Priority and Status set.",
                file=sys.stderr,
            )
            return False

    print(
        "Success: Verified Business Review Dashboard, departmental sections, callout, and Action Items database with ≥5 entries."
    )
    return True


def main():
    notion = notion_utils.get_notion_client()
    main_id = sys.argv[1] if len(sys.argv) > 1 else None
    if verify(notion, main_id):
        sys.exit(0)
    else:
        sys.exit(1)


if __name__ == "__main__":
    main()