Open3
Slack New Platform を使って AWS リソースを使えるようになるまで
Slack New Platform を使ってみたいと思っていたから試しに有料プランを契約して色々触ってみる
Slack App から AWS リソースにアクセスして処理実行するといったワークフローを作ってみる
Slack CLI をインストール
まずはログイン
$ slack login
📋 Run the following slash command in any Slack channel or DM
This will open a modal with user permissions for you to approve
Once approved, a challege code will be generated in Slack
/slackauthticket hoge
? Enter challenge code xxxx
✅ You've successfully authenticated! 🎉
Authorization data was saved to ~/.slack/credentials.json
💡 Get started by creating a new app with slack create my-app
Explore the details of available commands with slack help
サンプルアプリのプロジェクトを作る
slack create my-app
? Select a template to build from: Issue submission (default sample)
⚙️ Creating a new Slack app in ~/my-app
📦 Installed project dependencies
✨ my-app successfully created
🧭 Explore the documentation to learn more
Read the README.md or peruse the docs over at api.slack.com/automation
Find available commands and usage info with slack help
📋 Follow the steps below to begin development
Change into your project directory with cd my-app/
Develop locally and see changes in real-time with slack run
When you're ready to deploy for production use slack deploy
Slackにデプロイ
slack deploy
? Choose a deployed environment Install to a new team
? Install to a new team taddyteam xxx
🔔 If you leave this team, you can no longer manage the installed apps
Installed apps will belong to the team if you leave the workspace
📚 App Manifest
Created app manifest for "my-app" in "taddyteam"
🏠 App Install
Installing "my-app" app to "taddyteam"
Updated app icon: assets/default_new_app_icon.png
Finished in 4.6s
⚡ Listing triggers installed to the app...
There are no triggers installed for the app
⚡ Create a trigger
Searching for trigger definition files under 'triggers/*'...
Found 1 trigger definition file
? Choose a trigger definition file: triggers/submit_issue.ts
⚡ Trigger successfully created!
Submit an issue xxx (shortcut)
Created: 2024-01-02 17:14:00 +09:00 (1 second ago)
Collaborators:
Sadayoshi Tada @tada xxx
Can be found and used by:
everyone in the workspace
https://slack.com/shortcuts/xxxx/xxx
🎁 App packaged and ready to deploy
0.017MB was packaged in 1.5s
🚀 my-app deployed in 9.2s
Dashboard: https://slack.com/apps/xxx
App Owner: tada (xxx)
Workspace: taddyteam (xxx)
🌩 Visit Slack to try out your live app!
When you make any changes, update your app by re-running slack deploy
💌 We would love to know how things are going
Survey your development experience with slack feedback --name platform-improvements
できた