{"id":13908397,"url":"https://github.com/slackapi/template-slash-command-and-dialogs","last_synced_at":"2025-04-03T03:11:46.396Z","repository":{"id":56558879,"uuid":"102995611","full_name":"slackapi/template-slash-command-and-dialogs","owner":"slackapi","description":"Sample Slack app that uses a Slash Command and interactive message to create helpdesk tickets","archived":false,"fork":false,"pushed_at":"2023-11-13T21:05:34.000Z","size":49,"stargazers_count":143,"open_issues_count":7,"forks_count":75,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T08:35:57.292Z","etag":null,"topics":["slack","slack-blueprint","slack-tutorial","slack-workflow-sample","slash-commands"],"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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-09-10T01:34:40.000Z","updated_at":"2025-01-09T16:34:08.000Z","dependencies_parsed_at":"2024-04-09T11:39:42.873Z","dependency_job_id":"62af2a37-73cc-448b-a51d-52a178b796fa","html_url":"https://github.com/slackapi/template-slash-command-and-dialogs","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-slash-command-and-dialogs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Ftemplate-slash-command-and-dialogs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Ftemplate-slash-command-and-dialogs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Ftemplate-slash-command-and-dialogs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slackapi","download_url":"https://codeload.github.com/slackapi/template-slash-command-and-dialogs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246927839,"owners_count":20856198,"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","slack-blueprint","slack-tutorial","slack-workflow-sample","slash-commands"],"created_at":"2024-08-06T23:02:42.213Z","updated_at":"2025-04-03T03:11:46.378Z","avatar_url":"https://github.com/slackapi.png","language":"JavaScript","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# Slash Command and ~~Dialogs~~ Modals blueprint\n\n\u003e :sparkles: *Updated October 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\n## Creating a helpdesk ticket using a Slash Command and a ~~Dialog~~ Modal\n\nUse a slash command and a dialog to create a helpdesk ticket in a 3rd-party system. Once it has been created, send a message to the user with information about their ticket.\n\n![helpdesk-dialog](https://user-images.githubusercontent.com/700173/30929774-5fe9f0e2-a374-11e7-958e-0d8c362f89a3.gif)\n\n## Setup\n\n### Create a Slack app\n\n1. Create an app at [https://api.slack.com/apps](https://api.slack.com/apps)\n2. Add a Slash command (See *Add a Slash Command* section below)\n3. Enable Interactive components (See *Enable Interactive Components* below)\n4. Navigate to the **OAuth \u0026 Permissions** page and select the following bot token scopes:\n    * `commands`\n    * `chat:write`\n    * `users:read`\n    * `users:read.email`\n    * `im:write`\n5. Click 'Save Changes' and install the app (You should get an OAuth access token after the installation)\n\n#### Add a Slash Command\n1. Go back to the app settings and click on Slash Commands.\n1. Click the 'Create New Command' button and fill in the following:\n    * Command: `/helpdesk`\n    * Request URL: Your server or Glitch URL + `/command`\n    * Short description: `Create a helpdesk ticket`\n    * Usage hint: `[the problem you're having]`\n\nIf you did \"Remix\" on Glitch, it auto-generate a new URL with two random words, so your Request URL should be like: `https://fancy-feast.glitch.me/command`. \n\n\n#### Enable Interactive Components\n1. Go back to the app settings and click on Interactive Components.\n1. Set the Request URL to your server or Glitch URL + `/interactive`.\n1. Save the change.\n\n\n### Set Your Credentials\n\n1. Set the following environment variables to `.env` (see `.env.sample`):\n    * `SLACK_ACCESS_TOKEN`: Your bot token, `xoxb-` (available on the **OAuth \u0026 Permissions** once you install the app)\n    * `SLACK_SIGNING_SECRET`: Your app's Signing Secret (available on the **Basic Information** page)\n2. If you're running the app locally, run the app (`npm start`). Or if you're using Glitch, it automatically starts the app.\n\n#### Run the app \n\n1. Get the code\n    * Clone this repo and run `npm install`\n2. Set the following environment variables to `.env` (see `.env.sample`):\n    * `SLACK_ACCESS_TOKEN`: Your bot token, `xoxb-` (available on the **OAuth \u0026 Permissions** once you install the app)\n    * `SLACK_SIGNING_SECRET`: Your app's Signing Secret (available on the **Basic Information** page)\n3. If you're running the app locally, run the app (`npm start`).\n\nIf you want to run it locally, I recommend creating a localhost tunnel with [ngrok](https://ngrok.com)!\n\n\n### App Flow Diagram\n![diagram](https://api.slack.com/dev-cdn/v1568133600/img/api/articles/blueprints/slash_command_and_dialogs.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslackapi%2Ftemplate-slash-command-and-dialogs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslackapi%2Ftemplate-slash-command-and-dialogs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslackapi%2Ftemplate-slash-command-and-dialogs/lists"}