{"id":19614330,"url":"https://github.com/fpapado/micro-slack-slash","last_synced_at":"2026-05-20T07:38:02.433Z","repository":{"id":96505007,"uuid":"81250744","full_name":"fpapado/micro-slack-slash","owner":"fpapado","description":"A minimal Slack slash commands interface","archived":false,"fork":false,"pushed_at":"2017-02-27T20:54:48.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-14T09:08:40.779Z","etag":null,"topics":["micro","slack","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fpapado.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-02-07T20:27:30.000Z","updated_at":"2017-02-07T21:05:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"c46a4426-b5f2-47fd-815b-f4dcd6bd1bdd","html_url":"https://github.com/fpapado/micro-slack-slash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fpapado/micro-slack-slash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Fmicro-slack-slash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Fmicro-slack-slash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Fmicro-slack-slash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Fmicro-slack-slash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fpapado","download_url":"https://codeload.github.com/fpapado/micro-slack-slash/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Fmicro-slack-slash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33250373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T04:48:54.280Z","status":"ssl_error","status_checked_at":"2026-05-20T04:48:10.851Z","response_time":356,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["micro","slack","slash-commands"],"created_at":"2024-11-11T10:51:12.132Z","updated_at":"2026-05-20T07:38:02.388Z","avatar_url":"https://github.com/fpapado.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\nA simple Slack slash command integration that replies to various messages.\nIt accepts POST requests in the `slash command` format, verifies the key \u0026 domain, and looks for handlers corresponding to the `text` field, dispatching as appropriate. Otherwise, it throws an error.\n\nUses `async-await` and the handy [micro framework](https://github.com/zeit/micro) to provide a minimal interface.\nIdeal for deploying to [now.sh](https://now.sh).\n\nOriginally designed for Trondheim \u0026 Røros, it is easy to extend and customise to your liking.\nThere is no routing to speak of, apart from handling each `message.text` differently for each command.\n\n# Development\n- You should have `node` installed; the 6.9 LTS is known to work well\n- Install dependencies with `yarn` or `npm install`\n- Then `yarn run start` or `npm start`, and navigate to `localhost:3000`\n- Send POST requests to the root; see the format below\n- Add new handlers in modules or index.js, and link them to the switch in index.js. The demo handlers should give you an idea of what to return.\n\n# Deployment\nThe service is currently deployed using [now.sh](https://now.sh), which means you just run `now` at the project root.\n\nOtherwise, the steps would be roughly:\n- Install `node`\n- Copy your code to the production server\n- Set `NODE_ENV=production`\n- Proxy Port 80 to the server port\n- You might want to look into a process manager, or run the server as a service\n\n# Slack setup\n- Go to your team's **Add integrations** option\n- Select **Slash Commands**\n- Customise **Command**; users will type `/mycommandname message`\n- Add the **URL** of your public-facing service\n- Set **method** to POST\n- Add the **token** that you get either directly to `index.js` or the env variable `SLACK_TOKEN`\n- Customise anything else to your liking\n\n# Usage / Slash Command Format\nSlack describes it as:\n```\ntoken=xMbiJZV2dFxNSSWvINE5SY9Z\nteam_id=T0001\nteam_domain=example\nchannel_id=C2147483705\nchannel_name=test\nuser_id=U2147483697\nuser_name=Steve\ncommand=/weather\ntext=94070\nresponse_url=https://hooks.slack.com/commands/1234/5678\n```\n\nOf these, `text` is important to disambiguate which handler to use, and `token` to gate access.\nThe other fields are also available under `const message`; you can combine them however you wish, and pass it on to the handlers.\n\n`Response_url` is a bit more interesting; [read the Slack documentation to learn more about it](https://api.slack.com/slash-commands).\n\n# References\nSlack slash-command docs:\n[https://api.slack.com/slash-commands](https://api.slack.com/slash-commands)\n\nZeit micro:\n[https://github.com/zeit/micro](https://github.com/zeit/micro)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpapado%2Fmicro-slack-slash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffpapado%2Fmicro-slack-slash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpapado%2Fmicro-slack-slash/lists"}