Using Script Scenario

Options
radiantly
radiantly Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 6

The Webhook URL of a MS Teams channel can be used in the 'Reporter' to send scenario related messages to that Teams channel. However, I would like to know whether or not it possible to send messages to the same MS Teams channel programmatically using Dataiku Scenario API.

I simply want to use two separate channels (mail and MS Teams) to send messages using scripts.

Would like to know 'why' if this is not a possibility.

Thank you.


######### Script Scenario Starts #########

# 1. Import scenario.
from dataiku.scenario import Scenario

# 2. Initialize scenario object.
scenario = Scenario()


# 3. Do something here using methods from the scenario object.
# scenario.some_method()


# 4. Send custom reports using mail messaging channel (THIS STEPS WORKS FINE)
sender = scenario.get_message_sender("dss_notifications", type=None)
sender.set_params(sender="name@company.com", recipient="name@company.com")
sender.send(subject="The scenario is doing well", message="All is good")


# 5. Send custom reports to a MS channel (HOW to MAKE THIS STEP WORK?)
????

######### Script Scenario Ends #########

Tagged:

Best Answer

  • radiantly
    radiantly Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 6
    Answer ✓
    Options

    @Turribeach
    Thank you for the pointer. Much appreciated. The documentation is not very helpful. After a bit of trial and error I found the right way to make MS Teams messing works. Sharing my struggle as an image so that someone else can find it handy.

    Note that "channel_id" for MS Teams messaging is not the name of the Teams channel name. This is where I got confused. This is the 'id' set by the DSS admin in the DSS setting tab. This connection communicates to the MS Teams channel vis the webhook URL that you create when you register your Teams channel.

Answers

Setup Info
    Tags
      Help me…