How to Schedule a Message with the Scheduler Extension July 22, 2024 13:40 Updated When creating a reminder chatbot, the message scheduling functionality is essential. Imagine the user sends a message to the chatbot with the following sentence. Remind me to take my medication in 10 minutes In this case, your chatbot needs to understand the context of the conversation, extract the command information, and finally schedule a message for the next 10 minutes. In this article, we will focus solely on scheduling the message. For this, two modifications to your MessageReceiver will be necessary: Add the ISchedulerExtension interface in the constructor of your MessageReceiver. Note: It will be automatically injected by the SDK. Use the ScheduleMessageAsync(Message m, DateTimeOffset d) method to schedule your message. The code below demonstrates the use of the scheduling extension. //Note that I just changed the MessageReceiver class name from PlainTextMessageReceiver to SchedulerExtensionMessageReceiverpublic class SchedulerExtensionMessageReceiver : IMessageReceiver{ private readonly ISchedulerExtension _schedulerExtension; private readonly IMessagingHubSender _sender; public SchedulerExtensionMessageReceiver(IMessagingHubSender sender, ISchedulerExtension schedulerExtension) { _schedulerExtension = schedulerExtension; _sender = sender; } //Schedule a message to next 10 minutes public async Task ReceiveAsync(Message receivedMessage, CancellationToken cancellationToken) { var schedullingDate = DateTimeOffset.Now.AddMinutes(10); var messageContent = "tomar remédio" var message = new Message { Id = Guid.NewGuid().ToString(), To = receivedMessage.From, Content = new PlainText { Text = messageContent } }; await _schedulerExtension.ScheduleMessageAsync(message, schedullingDate); }} For more information, visit the discussion on the subject at our community or videos on our channel. 😃 Related articles How to Use Variables in Blip Desk Canned Responses How to Schedule Active Messaging Campaigns on WhatsApp How to send Active Messages on WhatsApp How to Send SMS via API Sending WhatsApp Active Messages on Blip Desk