Google Sheet.
Form fields and sheet data schema:
- Timestamp
- Name
- Birthday
- Language
- Slack ID
- Status
At config/index.ts
set birthday messages in multiple languages - use the template string ${slackID}
to mention the birthday person in the message body.
Examples:
const birthdayMessages = {
'pt-br': (slackID: string) => `Parabéns ${slackID}!!!`,
'es-uy': (slackID: string) => `Feliz cumpleaños ${slackID}!!!`,
};
The timer is set to send messages everyday at the time specified in the chosenTimer
variable - by default at 9 am. The enum TimerOptions
contain options to send morning or afternoon messages.
The env
file is not strictly an env file, but a TypeScript version where the settings are hidden through the .gitignore
file. An example is provided at env.example.ts
, where to use the file set its name to be env.ts
Please note: it is required admin access to edit the script project. Or, you can create a new script project (add the scriptId
to the .clasp.json
file) and push all the files to this new project.
- Clone the project:
git clone git@github.com:danielfcollier/ts-gas-bot-slack-birthday-remainder.git
- Install the packages:
npm install
- Login into your Google account:
clasp login
- Update the
.clasp.json
to set the project directory to the current working directory. In bash, type:
pwd | xargs clasp settings rootDir
- Formatting Tool