javascriptbotframeworkazure-functionsazure-bot-serviceproactive

How to send proactive notification/ broadcast message using Azure Functions to user using various channels?


I need to send proactive notification to the user that is scheduled at a certain time via Microsoft Bot V4. I am not exactly sure how to proceed with this.

Currently, I am trying to use Azure Function to send proactive message to user however, I'm not sure what to use to connect between bot service and azure functions. I looked at Direct Line but its not clear for me.

Currently, the best approach I can think of is to use Azure Function and Direct Line to send proactive notification to users.

I tested directline API via postman but it didn't work. It says conversational ID not found.

https://directline.botframework.com/v3/directline/conversations/{conversationId}/activities

JSON POST

{
    "type": "message",
    "from": {
        "id": "user1"
    },
    "text": "hello"
}

After the message is sent it should give me the ID.

{
    "id": "0001"
}

Edit:

I managed to understand my issue with Direct Line. It doesn't allow me to send a message to DIFFERENT channel, like Web Chat or to bot on Skype. Is there any other option to send message to my user on Skype ?


Solution

  • Okay so I sorted out my problem. By using REST connector https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-authentication?view=azure-bot-service-4.0 I think I just made big assumption that I have to use Direct Line

    I maybe did not explain clear what my problem really was. Thanks for the replies !