決済失敗 → Notion カンバンに自動でタスクを追加 決済完了 → Notion カンバンのタスクを自動で「完了」に移動 開発の裏側 Cursor AI を活用し、ほぼ日本語の指示だけでコードを生成 少ない実装コストで、担当者のステータス管理業務をゼロに! // Cursor AI で生成したコードの例 app.post('/webhook', async (c) => { const body = await c.req.text() const sig = c.req.header("stripe-signature") event = stripe.webhooks.constructEvent(body, sig, "secret") if (event.type === 'invoice.payment_failed') { await notion.pages.create({ parent: { database_id: NOTION_DB_ID }, properties: { ... } }); } }); 自動化システムの仕組み Stripe Webhook 決済イベント(成功/ 失敗)を検知 カスタマーID を含むペイロードを送信 API 処理サーバー Webhook イベントの種類を判定 Notion データベースのクエリ・更新 AI 生成コード がここで活躍! Notion API タスクの自動追加・移動を実行 担当者は実際のカンバンでタスクを確認 未対応 対応中 完了