{"id":15714296,"url":"https://github.com/slack-samples/javascript-welcome-bot","last_synced_at":"2025-07-22T11:07:26.916Z","repository":{"id":55368322,"uuid":"94129013","full_name":"slackapi/template-terms-of-service","owner":"slackapi","description":"Sample Slack app that uses the Events API and interactive messages to send new users a Terms of Service or welcome message","archived":false,"fork":false,"pushed_at":"2024-01-11T08:15:50.000Z","size":248,"stargazers_count":35,"open_issues_count":11,"forks_count":25,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-30T14:22:36.262Z","etag":null,"topics":["slack-blueprint","slack-workflow-sample"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slackapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-12T18:42:39.000Z","updated_at":"2024-09-13T13:46:45.000Z","dependencies_parsed_at":"2023-01-25T12:45:57.023Z","dependency_job_id":null,"html_url":"https://github.com/slackapi/template-terms-of-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Ftemplate-terms-of-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Ftemplate-terms-of-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Ftemplate-terms-of-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Ftemplate-terms-of-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slackapi","download_url":"https://codeload.github.com/slackapi/template-terms-of-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237261575,"owners_count":19281265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["slack-blueprint","slack-workflow-sample"],"created_at":"2024-10-03T21:35:52.472Z","updated_at":"2025-07-22T11:07:23.198Z","avatar_url":"https://github.com/slackapi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sending a Welcome Message to a New User \n\n\u003e :sparkles: *Updated December 2019: As we have introduced some new features, this tutorial and the code samples have been updated! All the changes from the previous version of this example, read the [DIFF.md](diff.md)*\n\nSample Slack app that presents a Terms of Service (or any other message) when a new user joins a team.\n\nThe user can accept the Terms of Service using message buttons. If a user has been presented with the Terms before and they haven't accepted, a background job can send them a reminder after a specific period of time. If you are on Plus plan or Slack Enterprise Grid, you may use the [SCIM API](https://api.slack.com/scim) to disable the user's account.\n\n![term-of-service](screenshot.png)\n\n## Setup\n\n#### Create a Slack app\n\n1. [Create an app](https://api.slack.com/apps)\n2. Enable Interactive components (See *Enable Interactive Components* below)\n3. Navigate to the **OAuth \u0026 Permissions** page and add the following bot token scopes:\n    * `chat:write`, `im:write`, `users:read`\n4. Click 'Save Changes' and install the app (You should get an OAuth access token after the installation)\n5. Enable the events (See *Enable the Events API* below. It doesn't let you  the Request URL until you run the code!)\n6. In your Slack workspace, invite the bot to #general, where the new user will join.\n\n#### Run locally or [![Remix on Glitch](https://cdn.glitch.com/2703baf2-b643-4da7-ab91-7ee2a2d00b5b%2Fremix-button.svg)](https://glitch.com/edit/#!/remix/slack-terms-of-service-blueprint)\n1. Get the code\n    * Either clone this repo and run `npm install`\n    * Or visit https://glitch.com/edit/#!/remix/slack-terms-of-service-blueprint\n2. Set the following environment variables to `.env` (see `.env.sample`):\n    * `SLACK_ACCESS_TOKEN`: Your app's `xoxb-` token (available on the Install App page, after you install the app to a workspace once.)\n    * `SLACK_SIGNING_SECRET`: Your app's Signing Secret (available on the **Basic Information** page)\n3. If you're running the app locally:\n    * Start the app (`npm start`)\n\n#### Enable the Events API\n1. Go back to the app settings and click on Events Subscriptions\n1. Set the Request URL to your server (*e.g.* `https://yourname.ngrok.com`) or Glitch URL + `/events`\n1. On the same page, subscribe to the `team_join` team events\n\n#### Enable Interactive Messages\n1. In the app settings, click on Interactive Messages\n1. Set the Request URL to your server or Glitch URL + `/interactive`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslack-samples%2Fjavascript-welcome-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslack-samples%2Fjavascript-welcome-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslack-samples%2Fjavascript-welcome-bot/lists"}