DEV Community

Schuster Braun for Vets Who Code

Posted on

3

Daily message Slack bot

I built a bot that posts for daily code challenges in a VetsWhoCode (VWC) Slack channel.

The first iteration of it was using Slack's workflow builder. I just made a slew of scheduled messages. Each message was a different day. So, when all the messages were posted, I needed to go back in and reschedule with what the new date was. After doing this a few times I felt like it was time for a change.

Image description

The next iteration is a super simple Node.js AWS Lambda connected to a daily event bridge trigger. The Lambda sends an authenticated POST request to our Slack app's web hook.

Image description

The code reads a markdown file of code challenges delimited by ---. It then divides the number of days in a year by the challenge array length. That way it will post a challenge every day.

Future work that could be done with it is:

  • Build a Challenge explorer/editor
  • Update the bot so it could work in multiple channels so you can have different kinds of languages
  • Setup Continuous Deployment. I currently just log in to the AWS account and manually update the challenges/code.

In the end, it's as simple as I could think to make it. I like to build that way, with room to expand.

SurveyJS custom survey software

Simplify data collection in your JS app with a fully integrated form management platform. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more. Integrates with any backend system, giving you full control over your data and no user limits.

Learn more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more