Watson Workspace will no longer be available after February 28, 2019. Learn more.

Developers

Direct Messaging to Apps

Comments

2 comments

  • Avatar
    Vitalijus Rudzinskas (Edited )

    If the app is in space and set to react to messages posted, it will get events with the message text, userID, spaceID.

    Using userID the app can get "email" and "displayName".

    My app currently gets events from the spaces and

    if event is "messageCreated"
    {
          if user is "ME"
          {
                 if messageText.contains("banana")
                 {
                       doStuff(); ...


    That's what I do when I want the app to trigger something for testing. Hope this helps.

    And you know what... I think your use case REEKS of Conversation Service as well and I am not touching that.


    Edit:
    But getting /cmd working is better for you in the long run anyway.

    I mean:
    /emailuser # user@gmail # Confirmation Of Invoice 1001871 # Hi John,
    Writing you to confirm receival of invoice 1001871.
    Regards,
    Jack Sparrow

    This is done and works, new line characters are parsed and appear in email sent. How cool is that, huh ?


  • Avatar
    Darren Cacy

    A user can speak with an app without using commands. The app can be "made cognitive" via adding in a Watson Assistant workspace, as discussed here.

    If you do that, then instead of the slash command Vitalijus suggested, you can say something like "send an email to invoice 1001871 telling him that we received the invoice".

    Of course, you can do this directly with the Watson Assistant if all you want to do is have one person talk to a bot.  The power of workspace, though, is to have several people talking together, with Watson chiming in as appropriate. :-)  That said, I agree that it would be nice to talk directly with an app now and then.

Please sign in to leave a comment.