Login to your Slack App here
Create a new App here
Choose From Scratch
Give App Name: Slack-AI-Tool
Pick up your workspace
Create the App
Go to OAuth & Permissions
Go to Scopes
Add an OAuth Scope
: chat:write, channels:history, groups:history, mpim:history, im:history, users:read
Scroll up to OAuth Token for Your Workspace
and press Install to Workspace
Copy the Bot User OAuth Token
Add the Slack App to your desired channel
Go to Slack
Pick a channel
Go to Channel Settings
Go to Integrations
Add apps
Add your Slack-AI-Tool
export service_account_name=" slack-ai"
export role_name=" slack_ai"
export project_id=" <project_id>"
export title=" Slack AI"
gcloud iam service-accounts create $service_account_name --display-name " $service_account_name "
gcloud iam roles create $role_name \
--project $project_id \
--title " $title " \
--description " This role has only the necessary permissions for DevOps AI tools" \
--permissions aiplatform.endpoints.predict
Bind service account to role
gcloud projects add-iam-policy-binding $project_id --member ' serviceAccount:<Service Account ID>@$project_id.iam.gserviceaccount.com' --role=' projects/$project_id/roles/$role_name'
gcloud iam roles update $role_name --project=$project_id --permissions=bigquery.jobs.create,aiplatform.endpoints.predict
gcloud iam roles describe --project=$project_id $role_name
Create Json key for the service account
gcloud iam service-accounts keys create $role_name \
--iam-account=< Service Account ID> @$project_id .iam.gserviceaccount.com
Build up the Docker image
docker build --platform linux/amd64 -t naturalett/slack-ai:slack-ai-v1 .
Link 1