- Main Bot and Add Sub functions.(Any SDK or API)
This architecture is currently used now. SlackApp and FastApi are distributed by directory.
└── project_name
├── bolt # bolt(slack) directory
└── notion # notion directory
python 3.10
fastapi 0.92.0
[Required]
NOTION = <your-notion-secret-key>
SLACK_APP_TOKEN=xapp-<your-app-level-token>
SLACK_BOT_TOKEN=xoxb-<your-bot-token>
How to get token of slackapi
- app_token(xapp)
- SlackAPI -> Your-app -> Settings -> Basic Information
- bot_token(xoxb)
- SlackAPI -> Your-app -> Features -> OAuth & Permissions
[Optional]
If you need to connect to Notion Database.
NOTION_{DB_NAME}=<your-db-id>
- <main.py> process is temporary.
1. Mention your bot by using @
- @{bot name}
2. Use shortcut "/가이드" or "/메인봇"
- Require to rigster shortcut of slack's app setting
uvicorn app_fastapi:api --reload --host 0.0.0.0 --port 8000 --log-level warning
No | Functions Name | FROM -> TO |
---|---|---|
1 | 회의실 예약하기 | SLACK -> NOTION |
2 | 점심메뉴추천 | NOTION -> SLACK |
3 | 예약 메세지 | SLACK(BOT -> USER) |
4 | 똑개 대나무숲 | SLACK(BOT -> CHANNEL) |
AWS Lightsail Containers
1. slackbot
2. slackbot-fastapi