Change User's status on Slack workspace using puppeteer
.
You need to save 3 envs in the repository secrets. Be sure to save those as the following.
TARGET_URL=https://workspace.slack.example
USER_EMAIL=sung@sungyub.com
USER_PASSWORD=pass
name: SetStatus
on:
workflow_dispatch:
schedule:
- cron: '0 16 * * *' # runs every day at 1 am. on KST
jobs:
set-status:
name: Set User's status at slack
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 14.x ]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm test
env:
TARGET_URL: ${{secrets.TARGET_URL}}
USER_EMAIL: ${{secrets.USER_EMAIL}}
USER_PASSWORD: ${{secrets.USER_PASSWORD}}
- Go to
TARGET_URL
- Logging,
USER_EMAIL
and usingUSER_PASSWORD
- If user status exists, remove it.
- Set custom user status. Custom User Status like this:
These source code files are made available under th MIT License, located in the LICENSE file.