Skip to content

Action: Jump to action

This action allows you to execute any other action within the button or command where it was created, regardless of its position. Additionally, you can schedule the execution to occur immediately or at a specific time in the future.


What can you do with this action?

  • Execute other actions: Run other actions within the same button or command where this action was created, even if they are separated by a separator.
  • Schedule execution: Set actions to run at a specific time in the future, ranging from seconds to days or years, or on a specific date.

How to configure the action?

1. Create the action

  1. Go to your bot and click 🛠 Edit to enter editor mode.
  2. Select the button or command where you want to add the action, or create a new one.
  3. Click Actions 🌟🎯 New action🔀 Jump to action.
  4. Click Configure 🛠 to set up this action.

2. Configure the options

➡️ Set action

  • Specify the action to jump to using its Action ID (that action will be executed).
  • You can choose to continue with the subsequent actions of the action you jumped to or stop execution after the jump.

You can use expressions to dynamically select which action to jump to.

➡️ Schedule execution (optional)

Define if the action should be executed later:

  • By countdown (days, hours, minutes, or seconds).
  • On a specific date:

    • You can use literal dates and times. For example:

      31-12-2024 23-59-59
      
    • You can use functions. For example, to execute one day later:

      {time_add(date_now(), 1, "days")}
      

3. Activate the action

Click ✅ Activate to enable this action.


What does this action return through its ID?

Cancel scheduled execution

You can cancel a scheduled execution by obtaining the cancel_id returned by this action:

#ActionID.cancel_id#

And then passing it to the Cancel scheduled action.

Replace ActionID with the ID of this action (Jump to action).


Practical example: Creating a reminder

We will create a /reminder command that schedules a reminder to send you a message after a specified time.

Example command usage:

/reminder "Call mom" 10
  • Parameter 1: The message you will receive when the countdown ends. It is a text, so it is enclosed in quotes.
  • Parameter 2: The countdown in minutes until you receive the message. It is a number, so it does not require quotes.

What are parameters and how to retrieve them?

To learn about parameters and how to retrieve them, see the Receive parameters action.

After 10 minutes, you will receive the message:

Call mom

1. Create the command

  1. Enter editor mode by clicking 🛠 Edit in your bot.
  2. Create a new command by clicking ✳️ New button | command and name it /reminder.
  3. Click Actions 🌟 to open the command’s action menu.

2. Configure the actions

a) Action 1: Receive parameters
  1. Click 🎯 New action🖥 Receive parameters.
  2. This action does not require configuration, simply activate it by clicking ✅ Activate.
  3. Copy the ID of this action; you will need it later.
b) Action 2: Jump to action
  1. Click 🎯 New action🔀 Jump to action.
  2. Do nothing here for now (it will be configured later).
c) Action 3: Send message (Confirm scheduling to user)
  1. Click 🎯 New action✉️ Send message.
  2. Click Configure 🛠💬 Set message 💬 and enter the message to inform the user that their reminder was scheduled:

    ✅ Your reminder has been scheduled and you will receive it in {#ActionIDRecParam.param2#} minutes.
    

    Replace ActionIDRecParam with the Action ID of Receive parameters (action 1).

  3. Return to the actions menu and activate the action by clicking ✅ Activate.

d) Add a Separator

Click New separator 📍 to add a separator and create a new action block. Learn more about separators.

e) Action 4: Send message (Send reminder)
  1. Click 🎯 New action✉️ Send message.
  2. Click Configure 🛠💬 Set message 💬 and enter:

    Reminder!
    
    {#ActionIDRecParam.param1#}
    

    Replace ActionIDRecParam with the Action ID of Receive parameters (action 1).

  3. Return to the actions menu and activate the action by clicking ✅ Activate.

  4. Copy the ID of this action; you will need it in the next step.
f) Configure the Jump to action
  1. Go back to Jump to action (action 2) and click Configure 🛠.
  2. Click 🆔 Set action 🆔 and paste the Action ID of the Send message action that will send the reminder (action 4).
  3. Click 🕒 Schedule execution 🕒📅 Set date 📅 and enter:

    {time_add(date_now(), #ActionIDRecParam.param2#, "minutes")}
    
  4. Return to the actions menu and activate the action by clicking ✅ Activate.

Final result

  1. The user sends the command:

    /reminder "The movie is about to start" 60
    
  2. The bot responds:

    ✅ Your reminder has been scheduled and you will receive it in 60 minutes.
    
  3. After 60 minutes, the bot sends the message:

    Reminder!
    
    The movie is about to start
    

This is how the actions look

VisualMaker action jump to action example


Important notes

  • When you schedule the jump to another action (to execute later):

    The bot will continue executing actions that follow Jump to action.

  • When you do NOT schedule the jump to another action (executed immediately):

    The bot jumps directly to the selected action and does not execute actions that follow Jump to action.