#AI活用アウトプット
毎朝、AIが"今日の一言と集中のコツ"を自動でSlackに送ってくれる仕組み、無料で作れます。設定を全部書きます(有料ツール不要・PCつけっぱなしも不要)。
▼手順(約5分)
① AIの鍵を無料取得:https://t.co/PmlL4ntPjq →「Get API key」→ コピー
② Slackの通知先URLを無料取得:https://t.co/Sl2pUqDSIh →「Create New App」→「Incoming Webhooks」をON → 送りたいチャンネルを選び Webhook URL をコピー
③ https://t.co/CK3JUdMVXD →「新しいプロジェクト」→ 下のコードを貼り、KEY と HOOK を差し替え
④ 左の時計(トリガー)→ 追加 → 関数=morning/時間主導型/毎日7〜8時 → 保存
これ��明朝からSlackに届きます。全部無料。
function morning(){
const KEY="AIの鍵";
const HOOK="SlackのWebhook URL";
const q="やる気の出る一言と、今日集中するコツを3つ、短く日本語で。";
const u="https://t.co/ruISYWTJ3Y"+KEY;
const r=UrlFetchApp.fetch(u,{method:"post",contentType:"application/json",payload:JSON.stringify({contents:[{parts:[{text:q}]}]})});
const t=JSON.parse(r.getContentText()).candidates[0].content.parts[0].text;
UrlFetchApp.fetch(HOOK,{method:"post",contentType:"application/json",payload:JSON.stringify({text:t})});
}
慣れたら q を「昨日のメモを要約して、今日やること3つ」に変えると自分専用の秘書に。僕はこれを育てて、今は複数のAI秘書を毎朝ぜんぶ無料枠でSlackに集約しています。(メール派は最後の行を MailApp.sendEmail に変えてもOK)
─── English ───
Build a free "AI posts to my Slack every morning" setup in ~5 min. Full steps (no paid tools, no PC left on).
① Free API key: https://t.co/PmlL4ntPjq → "Get API key" → copy
② Free Slack webhook: https://t.co/Sl2pUqDSIh → "Create New App" → enable "Incoming Webhooks" → pick a channel → copy the Webhook URL
③ https://t.co/CK3JUdMVXD → "New project" → paste the code above, replace KEY and HOOK
④ Clock icon ⏰ (Triggers) → Add → function=morning / time-driven / daily 7–8am → save
Starts landing in Slack tomorrow morning. Swap the prompt for "summarize my notes + today's 3 tasks" and it becomes your own assistant. I grew this into several assistants, all on free tiers. (Prefer email? Swap the last line for MailApp.sendEmail.)
#AI活用 #GoogleAppsScript #Gemini