{"id":15909467,"url":"https://github.com/anubhavmishra/slack-slash-command","last_synced_at":"2025-08-08T21:05:36.127Z","repository":{"id":72556527,"uuid":"469190290","full_name":"anubhavmishra/slack-slash-command","owner":"anubhavmishra","description":"Slack slash command application in Golang","archived":false,"fork":false,"pushed_at":"2022-08-18T21:09:32.000Z","size":5846,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T05:30:38.513Z","etag":null,"topics":["golang","slack","slash-command"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anubhavmishra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-12T20:15:28.000Z","updated_at":"2024-02-09T14:11:01.000Z","dependencies_parsed_at":"2023-05-24T13:00:13.122Z","dependency_job_id":null,"html_url":"https://github.com/anubhavmishra/slack-slash-command","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anubhavmishra/slack-slash-command","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anubhavmishra%2Fslack-slash-command","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anubhavmishra%2Fslack-slash-command/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anubhavmishra%2Fslack-slash-command/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anubhavmishra%2Fslack-slash-command/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anubhavmishra","download_url":"https://codeload.github.com/anubhavmishra/slack-slash-command/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anubhavmishra%2Fslack-slash-command/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269489275,"owners_count":24425568,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["golang","slack","slash-command"],"created_at":"2024-10-06T15:00:53.361Z","updated_at":"2025-08-08T21:05:36.077Z","avatar_url":"https://github.com/anubhavmishra.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slack-slash-command\nSlack slash command service written in Golang\n\n## Prerequisites\n\n### Download the project\n\n```bash\ngit clone https://github.com/anubhavmishra/slack-slash-command.git\n```\n\n### Download and install ngrok\n\n```bash\nbrew install ngrok/ngrok/ngrok\n```\n\nor\n\n```bash\nsudo unzip ~/Downloads/ngrok-stable-darwin-amd64.zip -d /usr/local/bin\n```\n\n## Usage\n\n### Build the project\n\nBuild the project\n\n```bash\ncd slack-slash-command\n```\n\n```bash\nmake build-service\n```\n\n### Create a Slack app and generate verification token\n\n* Go to [Slack API](https://api.slack.com/) webpage\n* Click \"Create an app\"\n* Select \"From scratch\" option from the \"Create an app\" modal\n* Enter application name and select a workspace for your application\n* Click \"Create App\" button to create your application. This should create your application and take you to the \"Basic Information\" page of your application.\n* Copy the \"Verification Token\" from the \"App Credentials\" section. You can find the \"App Credentials\" section by scrolling down towards the bottom of the \"Basic Information\" page.\n\nThe video below showcases how to create a Slack app and find the verification token.\n\nhttps://user-images.githubusercontent.com/4024506/158033562-b41e8678-7151-492a-9cf8-47a28a76c204.mov\n\nSet Slack token\n\n```bash\ncd slack-slash-command\n```\n\n```bash\nexport SLACK_VERIFICATION_TOKEN=\"SLACK TOKEN HERE\"\n```\n\n### Start slash command application\n\n```bash\ncd slack-slash-command\n```\n\n```bash\n./build/slack-slash-command\n```\n\nExpected output\n\n```bash\n2022/03/12 18:53:59 PORT environment variable not found defaulting to port 8080\n2022/03/12 18:53:59 Server listening on port 8080\n\n```\n\nThe slash command application is now listening on port 8080\n\n### Start a ngrok tunnel to expose the slash command application\n\nIn a new terminal window, run the command below\n\n```bash\nngrok http 8080\n```\n\nExpected output\n\n```bash\nngrok by @inconshreveable                                                                                                                                    (Ctrl+C to quit)\n\nSession Status                online\nSession Expires               1 hour, 59 minutes\nVersion                       2.3.40\nRegion                        United States (us)\nWeb Interface                 http://127.0.0.1:4040\nForwarding                    http://8dec-49-207-209-126.ngrok.io -\u003e http://localhost:8080\nForwarding                    https://8dec-49-207-209-126.ngrok.io -\u003e http://localhost:8080\n\nConnections                   ttl     opn     rt1     rt5     p50     p90\n                              0       0       0.00    0.00    0.00    0.00\n```\n\nCopy the `https` address from the output. In this case, it's `https://8dec-49-207-209-126.ngrok.io`\n\n\n### Create a slash command\n\n* From your application homepage, select \"Slash Commands\" from the side navigation bar.\n* From the \"Slash Commands\" section, select \"Create New Command\"\n* Enter details for your slash command. First, in the \"Command\" input box enter `/hello`\n* In the \"Request URL\" input box paste the ngrok `https` address and add `/receive` at the end of it.\nFor this example, the `https` URL will look like this `https://8dec-49-207-209-126.ngrok.io/receive`\n* Enter a short description in the \"Short Description\" input box\n* Click the \"Save\" button in the lower right corner of the webpage.\n\nThe video below showcases how to create a slash command.\n\nhttps://user-images.githubusercontent.com/4024506/158033572-bac3294d-4b85-43f0-b38f-8bd7ef8d3869.mov\n\n### Install Slack app\n\n* Go to the \"Basic Information\" page of your application\n* In the \"Install your app\" section click on \"Install to Workspace\" button\n* Click \"Allow\" to give permission to the app. Application should now be installed.\n\nThe video below showcases how to install a Slack app.\n\nhttps://user-images.githubusercontent.com/4024506/158033577-8f542a28-f304-491f-a648-a42c055af37b.mov\n\n### Use the slash command in Slack\n\n* Go to the Slack channel you want to install the slash command.\n* Click on the View all members of this channel\" button on the top right corner of the Slack channel\n* Select the \"Integrations\" tab in the modal.\n* In the \"Apps\" section click \"Add apps\" button.\n* Scroll to find the \"Slack Slash Command\" app and click the \"Add\" button beside its name. Slack application should now be installed in the channel.\n* In the message box of the channel type `/hello` to invoke the slash command. You should see a message \"Hello World!\" back from the \"Slack Slash Command\" application.\n\nThe video below showcases how to install Slack application in a channel and invoke `/hello` slash command to get a response back from the \"Slack Slash Command\" application.\n\nhttps://user-images.githubusercontent.com/4024506/158033583-5e245540-0702-4b43-978d-21873a1c511e.mov\n\n## Thanks\n\nThank you to [Emily Goldfein](https://medium.com/@emilygoldfein) for the [Creating Slack Slash Commands using Go](https://medium.com/@emilygoldfein/creating-slack-slash-commands-using-go-3cea3b3f0920) blog post as this project uses a lot of the code in the blog post. This project just removes the Open Weather Map API usage in the application and gives users a more generic example to create a Slack slash command application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanubhavmishra%2Fslack-slash-command","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanubhavmishra%2Fslack-slash-command","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanubhavmishra%2Fslack-slash-command/lists"}