DEV Community

Upkar Lidder for IBM Developer

Posted on • Originally published at Medium on

4 2

Let Serverless do the work !

One of my colleagues reached out to me to see if I can help automate a weekly status update task using Serverless and Slack bots. He currently has to download an excel file from a server every Monday at 9AM and provide stats to the team based on the contents of the file. This is a perfect opportunity to use periodic triggers and serverless actions to automate this mundane task ! I am using Apache OpenWhisk hosted on IBM Cloud Functions, but you can easily follow this same recipe on other serverless platforms.

The code is divided into two functions / actions

  1. read-cos : reads the file from IBM Cloud Object Store and aggregates the stats that need to be shared with the team
  2. post-slack : posts a message to a given channel on Slack

I finally create a sequence action composed of the above two actions. I then link a trigger that invokes this sequence every Monday at 9am ! Easy peasy !

The application uses the following solutions

The complete source is available on Github. Additionally, I have recorded a video that goes through the process. Take a look …

What are your automation stories with Serverless ? Please share in the comments below !

Thought of the day …

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay