{"id":15743835,"url":"https://github.com/doowb/slack-invite-webtask","last_synced_at":"2025-03-13T10:31:01.336Z","repository":{"id":57362775,"uuid":"66860824","full_name":"doowb/slack-invite-webtask","owner":"doowb","description":"Webtask.io service to invite users to a slack team.","archived":false,"fork":false,"pushed_at":"2016-08-29T19:30:38.000Z","size":17,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T19:51:48.558Z","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/doowb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-29T16:31:14.000Z","updated_at":"2018-10-27T08:20:49.000Z","dependencies_parsed_at":"2022-09-26T16:32:19.040Z","dependency_job_id":null,"html_url":"https://github.com/doowb/slack-invite-webtask","commit_stats":null,"previous_names":["doowb/slack-invite-wt"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fslack-invite-webtask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fslack-invite-webtask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fslack-invite-webtask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fslack-invite-webtask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doowb","download_url":"https://codeload.github.com/doowb/slack-invite-webtask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243385896,"owners_count":20282644,"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-10-04T03:21:37.712Z","updated_at":"2025-03-13T10:31:01.009Z","avatar_url":"https://github.com/doowb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slack-invite-webtask [![NPM version](https://img.shields.io/npm/v/slack-invite-webtask.svg?style=flat)](https://www.npmjs.com/package/slack-invite-webtask) [![NPM downloads](https://img.shields.io/npm/dm/slack-invite-webtask.svg?style=flat)](https://npmjs.org/package/slack-invite-webtask) [![Build Status](https://img.shields.io/travis/doowb/slack-invite-webtask.svg?style=flat)](https://travis-ci.org/doowb/slack-invite-webtask)\n\nWebtask.io service to invite users to a slack team.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save slack-invite-webtask\n```\n\n## Usage\n\n```js\nvar invite = require('slack-invite-webtask');\nmodule.exports = function(ctx, req, res) {\n  // do any customization for your implementation here\n  invite(ctx, req, res);\n};\n```\n\n## What is this?\n\nThis module is intended to be used in a [webtask.io](https://webtask.io/) task to provide slack invitation functionality.\n\nThere is a distribution file provided in [dist/main.js](dist/main.js) if you want to deploy it to webtask.io directly using the following command:\n\n```bash\n$ wt create node_modules/slack-invite-webtask/dist/main.js --name my-slack-invite-name --secret SLACK_TEAM='my-slack-team' --secret SLACK_TOKEN='XXXXXXX'\n```\n\nThe main requirement is to provide the `SLACK_TEAM` and `SLACK_TOKEN` values. The above example shows setting them as secrets so they'll be available on the `ctx` when the webtask is executed.\n\nThe `SLACK_TEAM` property is the same as the subdomain used when accessing slack... `https://{slack-team}.slack.com`.\nThe `SLACK_TOKEN` property is the authentication token of an administrator for the specified slack team that can invite people to slack.\n\n## Webtask usage\n\nAfter the webtask has been created, it can be used by `POST`ing to the webtask url and providing an `email` property in the body.\n\n```html\n\u003cform method=\"POST\" action=\"https://webtask.it.auth0.com/api/run/wt-{my-profile}-0/my-slack-invite-name?webtask_no_cache=1\"\u003e\n  \u003cdiv\u003eEmail\u003c/div\u003e\n  \u003cdiv\u003e\u003cinput type=\"text\" name=\"email\"\u003e\u003c/div\u003e\n  \u003cdiv\u003e\u003cinput type=\"submit\" value=\"Send\"\u003e\u003c/div\u003e\n\u003c/form\u003e\n```\n\nA JSON object will be returned. If an error occurs, the JSON object will contain an `error` property with the corresponding error message. Otherwise, the success message from slack will be returned.\n\n## About\n\n### Related projects\n\n[gulp-bundle-webtask](https://www.npmjs.com/package/gulp-bundle-webtask): Gulp plugin for browserifying and bundling your source code before deploying to webtask.io. | [homepage](https://github.com/doowb/gulp-bundle-webtask \"Gulp plugin for browserifying and bundling your source code before deploying to webtask.io.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](contributing.md) for avice on opening issues, pull requests, and coding standards.\n\n### Building docs\n\n_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_\n\nTo generate the readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install -g verb verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d \u0026\u0026 npm test\n```\n\n### Author\n\n**Brian Woodward**\n\n* [github/doowb](https://github.com/doowb)\n* [twitter/doowb](http://twitter.com/doowb)\n\n### License\n\nCopyright © 2016, [Brian Woodward](https://github.com/doowb).\nReleased under the [MIT license](https://github.com/doowb/slack-invite-webtask/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on August 29, 2016._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fslack-invite-webtask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoowb%2Fslack-invite-webtask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fslack-invite-webtask/lists"}