Working with Commands

In Flow XO, any message that begins with a forward slash ( / ) is considered a Command. 

Commands are treated like ordinary messages, except that Flow XO will split out the command name, an optional username mention, and the "argument" into a special object in the trigger data called "command". For example, when this message is sent to a bot in Flow XO:

/text tooth

Flow XO will send the following data to the trigger that handles it:

This can be very useful if you want to have a single flow handling all commands, or all commands of a certain type, because you can use the command data in your trigger filters:

And of course you can use this data in your actions as well:

If the text was not a command, i.e. the message does not start with a /, then the command data will be empty. If you want to always prevent a flow from being triggered if the message is a command, you can add a filter to the trigger like this:

If you are using Telegram, this feature is very handy for use with deep links, where a user is dropped into your chat with the message /start and some additional identifier. Telegram also has additional support for commands:

Happy Flowing. As always feel free to reach out to if you have any questions or feedback about this or any other feature.

Still need help? Contact Us Contact Us