NotionとClaude APIで作るエンジニアの第二の脳2026:タスク管理・メモ・プロジェクト追跡を全自動化

PR本記事はアフィリエイト広告を含みます。リンク経由でのご購入により運営者に成果報酬が支払われることがありますが、読者への価格や条件は変わりません。

結論:NotionをデータベースにしてClaude APIで自動処理させると「考える時間」が増える

先に結論から書きます。

Notionは「情報を入れる箱」として優秀ですが、入れた情報を活用するには手動操作が必要です。Claude APIをNotionと組み合わせると、「会議メモを自動でタスクに分解」「散らかったメモから週次レポートを生成」「プロジェクトの進捗を自動でサマリー化」が実現できます。

この記事では、実際に副業・フリーランス運営で使っているNotion×Claude APIの自動化システムを公開します。

自動化1:会議メモ → タスク自動生成

会議でメモを書いたら、ClaudeがNotionのタスクデータベースに自動でアクションアイテムを追加します。

import anthropic
from notion_client import Client
import json
from datetime import datetime, timedelta

notion = Client(auth="your_notion_token")
claude = anthropic.Anthropic()

TASK_DB_ID = "your_task_database_id"

def extract_tasks_from_meeting_notes(meeting_notes: str, assignee: str) -> list[dict]:
    """会議メモからタスクを抽出する"""
    response = claude.messages.create(
        model="claude-sonnet-4-6",
        max_tokens=1500,
        messages=[{
            "role": "user",
            "content": f"""
以下の会議メモからアクションアイテムを抽出してください。

会議メモ:
{meeting_notes}

各タスクを以下のJSON形式で出力してください(JSON配列のみ出力):
[
  {{
    "title": "タスクのタイトル",
    "description": "詳細説明",
    "priority": "高/中/低",
    "due_days": 7
  }}
]
"""
        }]
    )
    
    tasks = json.loads(response.content[0].text)
    return tasks

def add_tasks_to_notion(tasks: list[dict], assignee: str):
    """抽出したタスクをNotionデータベースに追加する"""
    today = datetime.now()
    
    for task in tasks:
        due_date = today + timedelta(days=task["due_days"])
        
        notion.pages.create(
            parent={"database_id": TASK_DB_ID},
            properties={
                "タスク名": {
                    "title": [{"text": {"content": task["title"]}}]
                },
                "優先度": {
                    "select": {"name": task["priority"]}
                },
                "期日": {
                    "date": {"start": due_date.strftime("%Y-%m-%d")}
                },
                "ステータス": {
                    "select": {"name": "未着手"}
                },
                "説明": {
                    "rich_text": [{"text": {"content": task["description"]}}]
                }
            }
        )
        print(f"✅ タスク追加: {task['title']}")

# 実行例
meeting_notes = """
2026-06-02 クライアントMTG記録
- 来週までにAPIの仕様書をドラフトする(田中担当)
- デザインレビューは木曜日に実施(デザイナー全員参加)
- ステージング環境の確認を月曜中に完了させる
- 請求書を月末までに送付すること
"""

tasks = extract_tasks_from_meeting_notes(meeting_notes, assignee="田中")
add_tasks_to_notion(tasks, assignee="田中")

自動化2:日次メモから週次レポートを自動生成

毎日Notionに書いたメモを週末に自動集計してサマリーレポートを生成します。

def get_weekly_notes(database_id: str) -> list[dict]:
    """今週のメモページを取得する"""
    week_start = (datetime.now() - timedelta(days=7)).strftime("%Y-%m-%d")
    
    results = notion.databases.query(
        database_id=database_id,
        filter={
            "property": "作成日",
            "date": {"after": week_start}
        }
    )
    
    notes = []
    for page in results["results"]:
        title = page["properties"]["タイトル"]["title"]
        if title:
            # ページの本文を取得
            blocks = notion.blocks.children.list(block_id=page["id"])
            content = ""
            for block in blocks["results"]:
                if block["type"] == "paragraph":
                    texts = block["paragraph"]["rich_text"]
                    if texts:
                        content += texts[0]["text"]["content"] + "\n"
            
            notes.append({
                "title": title[0]["text"]["content"],
                "content": content
            })
    
    return notes

def generate_weekly_report(notes: list[dict]) -> str:
    """週次メモからレポートを生成する"""
    notes_text = "\n\n".join([
        f"## {note['title']}\n{note['content']}"
        for note in notes
    ])
    
    response = claude.messages.create(
        model="claude-sonnet-4-6",
        max_tokens=2000,
        messages=[{
            "role": "user",
            "content": f"""
以下の今週のメモを整理して週次レポートを作成してください。

今週のメモ:
{notes_text}

レポートに含める内容:
1. 今週の主要な進捗・完了事項(箇条書き)
2. 来週に持ち越すタスク(箇条書き)
3. 気づき・改善点(2〜3点)
4. 来週の優先事項(トップ3)

マークダウン形式で出力してください。
"""
        }]
    )
    
    return response.content[0].text

def save_report_to_notion(report_text: str, report_db_id: str):
    """生成したレポートをNotionに保存する"""
    today = datetime.now()
    week_str = today.strftime("%Y年%m月第%W週")
    
    page = notion.pages.create(
        parent={"database_id": report_db_id},
        properties={
            "タイトル": {
                "title": [{"text": {"content": f"週次レポート {week_str}"}}]
            },
            "作成日": {
                "date": {"start": today.strftime("%Y-%m-%d")}
            }
        }
    )
    
    # レポート本文を追加
    notion.blocks.children.append(
        block_id=page["id"],
        children=[{
            "object": "block",
            "type": "paragraph",
            "paragraph": {
                "rich_text": [{"type": "text", "text": {"content": report_text}}]
            }
        }]
    )
    
    print(f"✅ 週次レポート保存完了: {week_str}")

自動化3:プロジェクトの進捗を自動分析・警告

締め切りが近いタスクや進捗が遅れているプロジェクトを自動で検知してSlack通知。

def analyze_project_health(project_db_id: str) -> str:
    """プロジェクトの健全性を分析する"""
    tasks = notion.databases.query(database_id=project_db_id)
    
    task_summary = []
    today = datetime.now()
    
    for task in tasks["results"]:
        props = task["properties"]
        
        title = props.get("タスク名", {}).get("title", [{}])[0].get("text", {}).get("content", "")
        status = props.get("ステータス", {}).get("select", {}).get("name", "")
        due = props.get("期日", {}).get("date", {})
        
        if due and due.get("start"):
            due_date = datetime.strptime(due["start"], "%Y-%m-%d")
            days_left = (due_date - today).days
            
            task_summary.append({
                "title": title,
                "status": status,
                "days_left": days_left
            })
    
    # ClaudeにプロジェクトのリスクをAIで分析させる
    summary_text = json.dumps(task_summary, ensure_ascii=False, indent=2)
    
    response = claude.messages.create(
        model="claude-sonnet-4-6",
        max_tokens=800,
        messages=[{
            "role": "user",
            "content": f"""
以下のタスクリストを分析してプロジェクトのリスクをレポートしてください。

タスクリスト(残り日数付き):
{summary_text}

分析内容:
1. 🔴 緊急対応が必要なタスク(期日まで3日以内・未完了)
2. 🟡 注意が必要なタスク(期日まで7日以内・未着手)
3. 💡 全体の健全性評価(1行)

簡潔にまとめてください。
"""
        }]
    )
    
    return response.content[0].text

# Task Schedulerで毎朝8時に実行
report = analyze_project_health("your_project_db_id")
print(report)

セットアップ手順

1. Notion APIキーの取得

  1. notion.so/my-integrations にアクセス
  2. 「New integration」をクリック
  3. 名前をつけて「Submit」
  4. 「Internal Integration Token」をコピー

2. データベースにインテグレーションを接続

  1. NotionのデータベースページをSHARE
  2. 作成したIntegrationを招待

3. ライブラリをインストール

pip install notion-client anthropic python-dotenv

4. 環境変数の設定

NOTION_TOKEN=your_integration_token
NOTION_TASK_DB_ID=your_task_database_id
ANTHROPIC_API_KEY=your_claude_api_key

コスト感と費用対効果

項目 月額コスト
Notion Plus 約1,650円
Claude API(個人利用) 500〜1,500円程度
合計 約2,200〜3,200円

節約できる時間: 週次レポート作成(1時間/週)、タスク整理(30分/週)を合わせると月約6時間。時給換算で1万円以上の価値。


まとめ

自動化 節約時間 難易度
会議メモ → タスク生成 30分/回 ★★☆
週次レポート自動生成 1時間/週 ★★☆
プロジェクト進捗分析 15分/日 ★★★

NotionとClaude APIの組み合わせは「情報管理の自動化」に最も効果的です。最初のセットアップに2〜3時間かかりますが、その後は毎週・毎日の作業が自動化され、本来の仕事(開発・クライアント対応・副業)に集中できます。


おすすめ

DMM WEBCAMP

未経験からエンジニア転職を目指すプログラミングスクール。AI×エンジニア転職記事と相性が良い。

関連ツールを見る

この記事で紹介したツール・サービスをまとめてチェック。

おすすめ

エックスサーバー

国内シェアNo.1のレンタルサーバー。WordPressブログをすぐに始められる。このブログも実際にXserverで運営しています。

Xserverを見てみる →

ムカイ
この記事を書いた人

ムカイ

個人事業主エンジニア。C#フルリモート案件に参画しながら、Claude Codeを使ってAI×副業の自動化・コンテンツ制作を実践中。「稼ぐ仕組みを作るのが好き」がモットー。

コメントを残す