{"id":20746910,"url":"https://github.com/johnagan/serverless-slack","last_synced_at":"2025-07-13T22:06:53.694Z","repository":{"id":14981045,"uuid":"76796670","full_name":"johnagan/serverless-slack","owner":"johnagan","description":"A Slack App Framework for AWS Lambda / Serverless.js","archived":false,"fork":false,"pushed_at":"2023-04-17T18:47:44.000Z","size":37,"stargazers_count":85,"open_issues_count":6,"forks_count":28,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-13T22:06:13.830Z","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/johnagan.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":"2016-12-18T17:28:28.000Z","updated_at":"2023-07-14T15:51:43.000Z","dependencies_parsed_at":"2024-06-21T20:18:11.853Z","dependency_job_id":"5421cc46-a95a-48cd-b831-d18bdffa1b9f","html_url":"https://github.com/johnagan/serverless-slack","commit_stats":{"total_commits":38,"total_committers":8,"mean_commits":4.75,"dds":0.2894736842105263,"last_synced_commit":"44c275628e25e530b31b43aba89149a6c1bd69ef"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johnagan/serverless-slack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fserverless-slack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fserverless-slack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fserverless-slack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fserverless-slack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnagan","download_url":"https://codeload.github.com/johnagan/serverless-slack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fserverless-slack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265212539,"owners_count":23728560,"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-17T08:09:51.150Z","updated_at":"2025-07-13T22:06:53.669Z","avatar_url":"https://github.com/johnagan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://camo.githubusercontent.com/547c6da94c16fedb1aa60c9efda858282e22834f/687474703a2f2f7075626c69632e7365727665726c6573732e636f6d2f6261646765732f76332e737667) ![](https://camo.githubusercontent.com/d59450139b6d354f15a2252a47b457bb2cc43828/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f7365727665726c6573732e737667)\n\n# Serverless Slack\nThis is a micro-framework designed to create [Slack Apps](https://slack.com) with [serverless.js](https://github.com/serverless/serverless).\n\n## Demonstration\nA complete template and tutorial can be found at [johnagan/serverless-slack-app](https://github.com/johnagan/serverless-slack-app).\n\n## API\n\n### Events\n```js\n// handle RTM messages\nslack.on('message', (payload, bot) =\u003e { });\n\n// handle all slash commands\nslack.on('slash_command', (payload, bot) =\u003e { });\n\n// handle the outgoing webhooks trigger word \"googlebot\"\nslack.on('googlebot', (payload, bot) =\u003e { });\n\n// wildcard support\nslack.on('*', (payload, bot) =\u003e { });\n```\nEvent | Description\n:---|:---\n\\* | All events\n**message** | All RTM events\n**slash_command** | All Slash Commands\n**event** | All Event API callbacks\n**webhook** | All WebHook callbacks\n**interactive_message** | All Interactive message callbacks\n**[/command]** | Any specific slash command\n**[event type]** | Any [specific event](https://api.slack.com/events) type\n**[trigger word]** | Any trigger from outgoing webhooks\n\n### Bot\nBots are preloaded with the appropriate token and are context aware. So you can reply to messages and send ephemeral updates to a message.\n```js\nslack.on('message', (payload, bot) =\u003e {\n  bot.replyPrivate('loading...');\n\n  bot.reply({\n    text: 'Everything is working!',\n    attachments: [{\n      title: \"Slack API Documentation\",\n      title_link: \"https://api.slack.com/\",\n      text: \"Optional text that appears within the attachment\",\n      fields: [{\n        title: \"Priority\",\n        value: \"High\",\n        short: false\n      }]\n    }]\n  });\n\n  // the token is already set\n  bot.send('channels.info', { channel: 'C1234567890' }).then(data =\u003e {\n    // results from API call\n  });\n});\n```\nMethods | Description\n:---|:---\n[say](src/bot.js#L50) | Send a message\n[reply](src/bot.js#L22) | Send a public reply to the event\n[replyPrivate](src/bot.js#L41) | Send an ephemeral reply to the event\n[send](src/bot.js#L61) | Call any Slack API endpoint\n\n### Data Store\nA key/value store to maintain team/bot information and store custom setings. The store should contain a uniquie `id` field.\n```js\nslack.store.save(data).then(results =\u003e {\n  // the save results\n});\n\nslack.store.get(id).then(record =\u003e {\n  // return a single record by key\n});\n```\nMethods | Description\n:---|:---\n[get](src/filestore.js#L39) | Get a single record by id\n[all](src/filestore.js#L61) | Get all saved records\n[save](src/filestore.js#L50) | Save a record\n\n\n### Client\nThe Slack client is a way to call the API outside of an event.\n```js\nlet message = {\n  unfurl_links: true,\n  channel: 'C1QD223DS1',\n  token: 'xoxb-12345678900-ABCD1234567890',\n  text: \"I am a test message http://slack.com\",\n  attachments: [{\n    text: \"And here's an attachment!\"\n  }]\n}\n\n// send message to any Slack endpoint\nslack.send('chat.postMessage', message).then(data =\u003e {\n  // Success!\n});\n\n// respond to webhooks\nslack.send('https://hooks.slack.com/services/T0000/B000/XXXX', message);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnagan%2Fserverless-slack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnagan%2Fserverless-slack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnagan%2Fserverless-slack/lists"}