Alfred helps you to automatically send birthday and anniversary wishes on Slack using Google Apps Script, Google Triggers, Google Sheets, and Slack API.
➡️ In-depth Tutorial: https://alfred.danishshakeel.me/read
- Authorize the app to your Slack workspace
- Copy the Incoming Webhook URL
- Create a Google Script for your Google Sheet using
Tools > Script Editor
- Add a Library - Import Alfred using the ID -
1u4gU_yqTtdvhckO5JymTXz87MDKerxg8jc2bPeO4x6ATRS8O7cEs7eoj
- Create a file and use the
alfredExample()
as a reference
function alfredExample() {
// Instantiate a new config object with the Slack Webhook URL.
const config = Alfred.createConfig('https://hooks.slack.com/services/T000000000000/B0AAAAAAAAA/ABCDEXYZ123456')
// Set parameters.
config.dataSheet = 'Data' // Set name of the sheet containing data.
config.messageSheet = 'Messages' // Set name of the sheet containing messages.
config.dobColumnKey = 'DOB' // Birthdate column key.
config.annivColumnKey = 'Joining' // Joining Date/Anniversary column key.
config.namesColumnKey = 'rtCamper' // Names column key.
const date = new Date() // Init a date object.
date.setDate(date.getDate() - 1) // Example: match events for yesterday.
config.dateToMatch = date // Set date.
// Configure messages.
config.birthdayHeader = 'Birthday Bash!'
config.birthdayImage = 'https://i.pinimg.com/736x/ee/f0/36/eef036f583e91a438896a377716ea85e.jpg'
config.birthdayTitle = 'Today, these folks are celebrating their birthdays :birthday::'
config.anniversaryHeader = 'Cheers to another year at rtCamp!'
config.anniversaryImage = 'https://i.pinimg.com/736x/53/62/20/536220dd51e9c770b986ba364c13cf27.jpg'
config.anniversaryTitle = 'These folks are celebrating their work anniversary today :partying_face::'
// Run Alfred.
Alfred.runAlfred(config);
}