Skip to content

Send email to newsletter subscribers about upcomming meetings #240

Send email to newsletter subscribers about upcomming meetings

Send email to newsletter subscribers about upcomming meetings #240

name: Send email to newsletter subscribers about upcomming meetings
on:
schedule:
# Runs "At 00:00 on Sunday." (see https://crontab.guru)
- cron: '00 00 * * 0'
jobs:
send_email:
name: Get list of events and send them to subscribers
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install deps
run: npm install
working-directory: ./.github/workflows/create-event-helpers
- name: Send email with Kit.com
uses: actions/github-script@v7
env:
CALENDAR_ID: ${{ secrets.CALENDAR_ID }}
CALENDAR_SERVICE_ACCOUNT: ${{ secrets.CALENDAR_SERVICE_ACCOUNT }}
KIT_API_KEY: ${{ secrets.KIT_API_KEY }}
KIT_MEETINGS_TAG_ID: ${{ secrets.KIT_MEETINGS_TAG_ID }}
with:
script: |
const sendEmail = require('./.github/workflows/create-event-helpers/kit/index.js');
sendEmail();