Slackbot for broadcast messaging custom content based on user
This is a work in progress and employs lots of inefficient methods. Specifically, there's a loop through the object that should only happen once, if at all, but I do it per user. Doesn't really matter since the whole run took about 10 seconds per 100 users :)
messageBot takes a JSON of email & message objects and broadcasts them as DMs.
[
{
"email": "[email protected]",
"message": "We have a shirt size of *M* on record for you. We're ordering shirts soon! If this is correct, *do nothing*. If it is wrong, reach out to @shirtadmin ASAP :)"
}
]
botId.py
needs to have a simple class like the following:
class bot:
id = "XXXXXXX"
token = "xoxb-85858585858585-33939932908d09g8094mt3dfskjewfa"
Run python3 messageBot.py
to loop through all of the messages and send instantly.