Python_variabe_name = variables # import default modules # reading in the variable we created in slack into our python script An example personalized response may be something like sending a request to the website the user has posted in their slack message. We could send requests to different APIs, process the posted data, lookup the data against our databases, and so much more. Here, we have limitless options on what we can do with the user's input. Let's use it in a python module to send back personalized results. Since we imported the variable of slack message text into our workflow, we can access it anywhere downstream of the trigger. We do this by selecting the output "Slack Message Text." Then, if we want to create personalized response depending on the message text, we can create a variable using the outputs. In this example, let's say we want to activate whenever a message is posted to a certain, specified channel. This slack trigger allows us to activate the workflow depending on the event type. We have a variety of different triggers available, but in this tutorial, let's use a slack trigger. In WayScript, we activate our scripts using triggers. No prerequisites but some content you might find helpful: In this tutorial, let's take a look at how we can execute python code whenever a message is sent to a specified channel in slack. Let's learn how we can make your slack channels even more powerful with WayScript. Chances are that you are already using Slack in your personal or workplace communications.
0 Comments
Leave a Reply. |