{"id":20334886,"url":"https://github.com/mdb/node-slack-integrator","last_synced_at":"2025-10-08T05:10:57.245Z","repository":{"id":26383629,"uuid":"29833049","full_name":"mdb/node-slack-integrator","owner":"mdb","description":"An Express-based starter kit for creating Slack integrations","archived":false,"fork":false,"pushed_at":"2016-07-01T12:02:44.000Z","size":20,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T03:13:51.936Z","etag":null,"topics":[],"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/mdb.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}},"created_at":"2015-01-25T21:56:15.000Z","updated_at":"2017-06-20T10:34:05.000Z","dependencies_parsed_at":"2022-09-26T16:21:34.109Z","dependency_job_id":null,"html_url":"https://github.com/mdb/node-slack-integrator","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fnode-slack-integrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fnode-slack-integrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fnode-slack-integrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fnode-slack-integrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdb","download_url":"https://codeload.github.com/mdb/node-slack-integrator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487733,"owners_count":21112188,"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":[],"created_at":"2024-11-14T20:38:28.621Z","updated_at":"2025-10-08T05:10:52.200Z","avatar_url":"https://github.com/mdb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/mdb/node-slack-integrator.svg?branch=master)](https://travis-ci.org/mdb/node-slack-integrator)\n\n# node-slack-integrator\n\nA very simple Express-based server for creating Slack integrations.\n\n`node-slack-integrator` runs an Express server with an `/integration` endpoint.\n\n## How to use\n\n1. Log into your Slack and configure a slash command integration that posts to `\u003cyour-integration-host.com\u003e/integration` when a Slack user enters `/some command`.\n\n2. Deploy a `node-slack-integrator` instance to `\u003cyour-integration-host.com\u003e`. Your `node-slack-integrator` instance should be instantiated with a `payload` method \u0026 a `hookPath` property.\n\nThe `payload` method receives Slack's post request and generates the appropriate payload your integration should post in your Slack.\n\nThe `hookPath` property specifies the unique part of your Slack hook endpoint. This can be found in your Slack's admin.\n\n## Example\n\n```javascript\n// slack_integration.js\nvar Integrator = require('slack-integrator');\n\nnew Integrator({\n  // a 'payload' method to generate a Slack-formatted payload object\n  // this method receives the request Slack issues to your integration\n  // in response to a user's `/command`, as well as a callback called\n  // with the Slack-formatted payload object\n  payload: function(request, callback) {\n    // this should return the payload object containing the\n    // data you wish to display in Slack\n    // see Slack documentation regarding its format\n\n    // example:\n    callback({\n      username: 'my bot',\n      text: 'some text',\n      channel: request.body.channel_id,\n      icon_emoji: ':ghost:'\n    });\n  },\n\n  // optional; if set, this ensures against requests from un-authorized Slacks\n  token: 'the token provided by your Slack instance',\n\n  // https://hooks.slack.com/services/\u003cYOUR_HOOK_PATH\u003e\n  hookPath: \"the path to your Slack instance's hook endpoint\"\n});\n```\n\nRunning `node slack_integration.js` runs an Express app at port 3000. Port 3000 can be overridden via a `PORT` environment variable, or by a `port` declared on the options object passed to your integrator during instantiation.\n\nThe slack integration instance's `/integration` endpoint can be used to receive slash command-prompted POST requests from Slack.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdb%2Fnode-slack-integrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdb%2Fnode-slack-integrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdb%2Fnode-slack-integrator/lists"}