Slack Bot [Python/Flask]: Wait for Direct Messages from specified users and save the responses Slack Bot [Python/Flask]: Wait for Direct Messages from specified users and save the responses flask flask

Slack Bot [Python/Flask]: Wait for Direct Messages from specified users and save the responses


I would suggest using the Events API from Slack to collect message to your bot.

After setup Slack will automatically send a request to your app for every new message where your bot is mentioned, e.g. by subscribing to the app_mention event. That request will include the actual message along with context information.

Alternatively you can listen too all messages by subscribing to the message event and then filter out the ones that you want to keep.