Sends contacts from an EveryAction report to a Slack channel to invite them to the Slack workspace
- Create a scheduled report in EveryAction and send it to an email you can pipe to a PHP script. Ensure that the report contains the following fields:
- DOB
- Personal Email (if you want to use a different email from their contact record, you'll have to edit parse-email.php)
- Contact Name
- Pipe emails to the email specified in EveryAction to report-pipe.php
- Set your Slack API token (the bot OAuth access token) and channel ID (starts with C) in lines 10 and 11 of parse-email.php and line 4 of interactive-hook.php
- If you have a maximum age for hub members, edit
+20 years
on line 42 of parse-email.php. If you do not have a maximum age, remove lines 41-44. - Edit the
$payload =
JSONs to customize the message sent in the specified Slack channel - In interactive-hook.php, edit the message, icons, and names in the messages returned to users who interact with the buttons sent with the payloads you customized above