@lakshmi Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
Here’s a high-level approach:
- Store User Information: When a user interacts with the bot, store their information (UserId, UserName, ServiceURL) in a database.
- Create Azure Function: Create an Azure Function that is triggered based on your requirements. This could be a timer trigger if you want to send messages at specific times, or an HTTP trigger if you want to manually trigger the broadcast.
- Broadcast Messages: In your Azure Function, retrieve the list of users from the database. For each user, create a conversation using the stored ServiceURL and UserId. Then, send the message to the conversation.
This StackOverflow post talks about the sample approach:
Alternatively, To broadcast a message to all the users who are using your bot, you can use the SignalR output binding to send messages to clients connected to Azure SignalR Service. You can broadcast messages to all clients, or you can send them to a subset of clients. For example, only send messages to clients authenticated with a specific user ID, or only to a specific group. The trigger details and broadcast function sample is here:
Hope this helps.