Skip to content

毎日占いをChatGPTで生成し、Slackに自動投稿するBot

Notifications You must be signed in to change notification settings

QP12cGPT/fortune-to-slack-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

🌟 Daily Fortune to Slack Bot

毎朝、ChatGPTにお願いして「今日の占い」をSlackに自動投稿するPythonスクリプトです。

💡 Features

  • ChatGPTが生成する占い(運勢・メッセージ・ラッキーカラー・アイテム)
  • Slackチャンネルに自動投稿
  • .env にAPIキーを保存(秘密保持)

🔧 Usage

  1. .env.example.env にリネームして、各APIキーを記入
  2. 必要なパッケージをインストール:
pip install openai slack_sdk python-dotenv
  1. スクリプトを実行:
python daily_fortune_to_slack.py

🗓 自動化(任意)

  • Windowsタスクスケジューラで定期実行
  • n8nなどの自動化ツールでも構築可能

📁 .env.example

OPENAI_API_KEY=your_openai_api_key
SLACK_BOT_TOKEN=your_slack_bot_token
SLACK_CHANNEL_ID=your_slack_channel_id

📜 License

MIT

About

毎日占いをChatGPTで生成し、Slackに自動投稿するBot

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages