VS Code - Teams Toolkit Notification bot query

Rishikesh Rai 45 Reputation points
2024-12-10T16:23:54.7266667+00:00

Hi,

I'm new to the Teams toolkit and exploring it to create a notification bot. The template pre-builds a demo bot with a scheduled time to send notifications every 30 seconds. My queries are:

Is there a way to schedule the notifications at specific times, like 9:00 AM, and to schedule them 2 to 3 times a day?

I want to send personalized messages to users based on their user ID/email. For example, I want to send notifications to 2,000 Teams users, but each user will receive a different message, this message will get from an Api.

Any insights or guidance on this would be helpful.

Thank you!

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,895 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,683 questions
0 comments No comments
{count} votes

Accepted answer
  1. Prasad-MSFT 8,631 Reputation points Microsoft External Staff
    2024-12-11T06:10:00.0266667+00:00

    https://learn.microsoft.com/en-us/microsoftteams/platform/bots/build-notification-capability?tabs=ts1%2Cts2%2Cts3%2Cts4%2Cjsts%2Cts5%2Cdotnet#customize-notification

    You can schedule notifications at specific times, such as 9:00 AM, and multiple times a day by using Azure Functions with a timer trigger. This allows you to set up a cron expression to define the specific times when the notifications should be sent.

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=python-v2%2Cisolated-process%2Cnodejs-v4&pivots=programming-language-csharp#ncrontab-expressions

    Example When triggered
    0 0 9 * * * at 9:30 AM every day

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.