Quick Start
Last updated
Last updated
The quickest way to get up and running with Actions is to just have a go! The following sections will outline how to create your first action using a simple "Hello World" style command. We want the command to run when a user sends a command such as !hello or /hello with the output being "Hello X, how are you?"
Login to the Modr8 platform website
Select "Manage"
against your bot profile
Select the "Actions"
button on your chat profile
Click the "Create"
button on the "Create A New Action"
card
Provide a name for your action so it is easier to find later by adding it to the "Strategy Name"
text box
"Executes For"
allows you to change permissions of when the action will run, we will leave it as is for now.
"Active"
is a switch to turn the action off or on, leave this enabled
"Execution Probability"
is a % chance for the action to be run on every event received. Leave this as 100%
Now that the main header information of the action is set up we will move on to adding in conditions.
Conditions define what must happen for the action outcomes to run. In our Hello World example we want it to run when a message is sent to the chat that starts with !hello or /hello.
In the "Property"
drop down select "Message Text"
as we want to match message text
In the "Match"
drop down select "Starts With"
as we want to match the start of a message
In the "Match Value"
text box add the text /hello
Click "Add Condition"
button as we want to add another condition for the command to run
Complete steps 1 -3 again in the new condition that opens up but add !hello
to the "Match Value"
this time.
Switch the drop down that says "Match All Conditions"
to read "Match Any Condition"
Now we have defined some conditions for our action to run which are when a message is sent to the chat that starts with "/hello" or "!hello"
When the conditions are met, we said we wanted to issue a message to the user. We will now begin adding the text in using our action outcomes.
Scroll down to "Action Groups"
In the "Execute Action"
drop down select "Send Message"
In the "Message Text"
area that opens up add "Hello {{o_user}}, how are you?"
Check the tick box "Delete After Timeout"
Click "Save Changes"
In your chat with your bot you should now be able to send either /hello or !hello and see your action running.
In this tutorial we have simply replicated what our command module can already do, but hopefully with all of the various options you have seen it is apparent how much customisation you can do!
Actions are a great way of solving the complex use-cases every community has where Modr8 does not have a generic setting you can use actions to do exactly what you need.