Slack Friendly Reminder Bot
A simple Slack app that monitors your messages and sends you a private reminder when you end messages with a period, encouraging you to be more friendly in your communication.
Monitors only messages from the app owner (you)
Detects messages ending with periods
Sends private DM reminders with friendly suggestions
Ignores bot messages, edits, and very short messages
Go to Slack API and click "Create New App"
Choose "From scratch"
Give it a name like "Friendly Reminder Bot"
Select your workspace
In your Slack app settings:
Go to "OAuth & Permissions"
Add these Bot Token Scopes:
chat:write
- To send messages
channels:history
- To read channel messages
groups:history
- To read private channel messages
im:history
- To read direct messages
mpim:history
- To read group direct messages
In "OAuth & Permissions", click "Install to Workspace"
Authorize the app
Copy the "Bot User OAuth Token" (starts with xoxb-
)
4. Set Environment Variables
In Val Town, set these environment variables:
SLACK_BOT_TOKEN
: Your bot token from step 3
SLACK_OWNER_USER_ID
: Your Slack user ID (see instructions below)
Finding Your Slack User ID
In Slack, click on your profile picture
Click "Profile"
Click the three dots menu
Click "Copy member ID"
In your Slack app settings, go to "Event Subscriptions"
Enable events
Set the Request URL to your Val Town webhook URL: https://[your-username]-slackwebhook.web.val.run
Under "Subscribe to bot events", add:
message.channels
- Messages in public channels
message.groups
- Messages in private channels
message.im
- Direct messages
message.mpim
- Group direct messages
Save changes
After adding event subscriptions, you'll need to reinstall the app to your workspace with the new permissions.
Slack sends webhook events to the Val Town endpoint
The webhook filters for messages from you (the owner)
If a message ends with a period, it sends you a private DM reminder
The reminder suggests using friendlier punctuation like ! or 😊
Send a message in any channel that ends with a period, like:
This is a test message.
You should receive a private DM from the bot with a friendly reminder!
Only processes messages from the configured owner user ID
Ignores all other users' messages
Sends reminders only as private DMs to the owner