As @AsmaZinneeraJabir mentioned, this code compiles with ballerinax/slack:3.3.0.
The way to make it work is to :
Another way for the training 1 project to compile is by changing this code to fit the latest version of ballerinax/slack specs (which obviously works). But it is better to stay close to the initial code.
Thanks again, My initial question is answered