Service: Slackin - EyevinnOSC/community GitHub Wiki

Slackin

Slackin (serviceId emedvedev-slackin-extended) makes it easy to invite people to a public Slack organization: it provides a landing page where visitors enter their email and receive an invite. It is a long-running service instance. License: MIT.

What it can do

  • Serve a landing page where people fill in their email to receive an invite to your Slack workspace.
  • Show real-time user counts for your workspace.
  • Prevent abuse with Google reCAPTCHA v3 (including invisible reCAPTCHA).
  • Customize the page with a light or dark theme and a link to your code of conduct.

Creating an instance

Slackin needs access to the Slack API. Create a Slack app connected to your workspace, create an OAuth token and copy the Bot User OAuth token.

Create Slack app

Create the token with the following scope:

Token scope

Copy the Bot User OAuth token:

Bot User OAuth token

Then:

  1. Store the token as a service secret with create-service-secret (serviceId: "emedvedev-slackin-extended"), for example named slacktoken. A reCAPTCHA secret key can be stored as a secret too.
  2. Create the instance with create-service-instance using serviceId: "emedvedev-slackin-extended". The instance name must be alphanumeric and at most 20 characters. Slackin has no dependencies on other OSC services.
{
  "name": "myslackin",
  "SlackWorkspaceId": "<workspace>",
  "SlackApiToken": "{{secrets.slacktoken}}"
}
  1. Wait with wait-for-service-ready and get the URL with describe-service-instance. Slackin for your workspace is then online.

Options

Option Required Type Meaning
name Yes string Name of the instance. Alphanumeric, at most 20 characters.
SlackWorkspaceId Yes string Slack workspace id, the subdomain of your workspace URL: for https://<workspace>.slack.com give <workspace> (SLACK_SUBDOMAIN).
SlackApiToken Yes string, sensitive Slack API token used to send invitations (SLACK_API_TOKEN), for example the Bot User OAuth token. Upstream documents that the user generating the token must be an admin, ideally a dedicated inviter user. Store it as a secret and pass {{secrets.NAME}}.
SlackInviteUrl No string A Slack invitation URL to use as a fallback if your Slack app does not have authority to send invitations.
RecaptchaSecret No string, sensitive Google reCAPTCHA secret key. Choose a v3 key at https://www.google.com/recaptcha/admin. Empty by default, which disables reCAPTCHA. Use together with RecaptchaSitekey.
RecaptchaSitekey No string Google reCAPTCHA site key matching the secret. Empty by default, which disables reCAPTCHA.
Theme No string Page theme, light or dark. Default light.
CoCUrl No string URL to your code of conduct; a link is shown when set. Empty by default, no link shown.

SlackApiToken and RecaptchaSecret are secrets. A {{secrets.NAME}} reference must be the whole field value, and changing a secret later does not restart a running instance.

Using the instance

Open the instance URL to see the landing page and share it with the people you want to invite.

Slackin landing page

Limitations

  • The Slack app or token needs authority to send invitations; if it does not, set SlackInviteUrl as a fallback.
  • Upstream notes that Slack may limit the number of external invitations to a multiple of your paying members, which can cause invite emails not to arrive.

Resources

⚠️ **GitHub.com Fallback** ⚠️