Coming soon: We’re working on a brand new, revamped Community experience. Want to receive updates? Sign up now!

0 votes

Can I use a project variable in the message sent out at the end of a scenario by a slack web hook.


More context because I feel I'm doing something convoluted (hence probably not the simplest way to do it) :

In one project the 'final' recipe executes some functional action.

I set a project level variable summarizing some infos on the run like this. This is the final line of code at the end of a scenario run.

(python code in the recipe)


On the scenario , I set a slack webhook as a 'reporter'

on the text to display :

Reporting on SomeRun
Vouchers sent via somesend
Results : ${outcome}

and would like to add  Message: ${reportmessages}  something like this

Thanks for any pointers !



1 Answer

0 votes


On the latest version of DSS, you can directly set a project variable, for instance:

And use it in your scenario reporter using the $ magic ${foo}. This will return "bar" :)

In your case, if there is a scenario step to define and reset the project variable " reportmessages" , you will indeed reference it with ${reportmessages} inside the scenario reporting screen.




Would it be the way you recommend to get a string passed *from inside a  recipe code *  to a slack chan through report message ?
 do you see any other way to do it ?
It may be better to do the variable set in a Python scenario step so that it is monitored in the scenario log. That assumes you have Automation features activated. If not, you can do it in a recipe, there is nothing wrong with that.
thx. I'll try this.
1,337 questions
1,364 answers
11,916 users

©Dataiku 2012-2018 - Privacy Policy