Skip to content

On demand · Product video

Send a Microsoft Teams message when the schedule changes

For production and operations teams that want people told in Microsoft Teams when an operation on the schedule is moved.

Recorded December 21, 2023 · 6 minutes

Graphical Scheduler teams notifications video thumbnail

Summary

Graphical Scheduler raises a Business Central business event each time someone changes the schedule. This is a completely free app from Insight Works for Business Central. The video builds an automated cloud flow in Power Automate that runs on that event and posts a message to a Microsoft Teams channel, with the user, the order number, and the before and after times converted from UTC to local time. It then moves an operation from May to June and shows the message arrive in Teams. The same approach can add conditions, such as only certain customers or orders.

Key topics

  • Start an automated cloud flow from the schedule changed business event
  • Post a message to a Microsoft Teams channel
  • Convert the before and after times from UTC to local time
  • Add conditions for particular customers or orders
Read the transcript

We’re going to walk through how to use a new feature inside of Graphical Scheduler 1.8, which is the introduction of an external business event for whenever a schedule has changed. In this example, when a schedule is changed, we want it to post a Teams message. We have a channel available where we’re going to post that message, and we want the message to occur whenever the change has taken place.

To get started, we’re going to head over to make.powerapps.com, and we’re going to create a new flow, a new automated cloud flow. Inside of here, we’re going to look for the Business Central trigger for when a business event occurs, and we’re going to create that. We choose our environment; in this case, this is my environment name. Now you choose the event, and in this case we’re looking for the event Graphical scheduler change occurred. In my case, I also want to restrict it to my example company.

Now, for this example, whenever this event occurs we’re just going to post a Teams message. So we look for Microsoft Teams, Post message in a chat or channel. We’re going to post as the Flow bot, and choose our channel: our Insight Works example team and our Graphical Scheduler channel. Inside of here we put in our message: “Hello, to whom it may concern, a schedule has changed.” We can add in some of the content that’s available from that business event: the user who made the change, the order, and context 1, which is usually the document number for whatever it is you’re changing. Then the previous allocation and the after allocation, and the previous time.

Because we get the time in as a date time, we want to convert that date time to a string. The easiest way to do that is with a time zone conversion. We find the base time, the before start time. This is always in UTC, so we grab UTC as the source. In my case I’m in Mountain Time, so I convert that into Mountain Time and choose the format I want it to display in. We call this the before time. Then we create another, very similar, time zone conversion for the after time, what it changed to, from UTC into Mountain Time. We put those timestamps into the message, the before time and the after time, and we save it.

So now we’re telling the system that any time the schedule changes, post that message. Again, this is a simple example to demonstrate how you would connect something in Power Automate. You could put in conditions; perhaps you only care about particular customers or a particular order. But this is an easy way to get notifications for basically any record, including your own custom records.

Let’s try out this example. We head back into the Graphical Scheduler and reschedule this from May into June. It’s making the change for us, and if we head back into Teams, we should now see that event. We can see that it’s coming in from workflows, and we see our message: hello, to whom it may concern, admin made a change to the production order routing line on order 101021. We didn’t change the allocation; it’s still work center 100, and we changed it from May 24 to June 11. So that’s a simple example of how to use the external business event feature that was introduced in Graphical Scheduler 1.8.

Questions about this webcast?

Send your question and the Insight Works team will reply by email. Ready to plan a project? Contact your Microsoft Partner.

Ask a question

Webcast Questions