Function Do()

Execute an existing action with a custom input. Use it to call nested actions and create related records.

Sergey Shurygin avatar
Written by Sergey Shurygin
Updated over a week ago

Use Do(actionApiName, input) to execute an action by its actionApiName with a custom input. This is especially useful for executing nested action (from within another action) and to create records in a related object (for example, an opportunity for a given contact).

When an action is executed, a nested context key is created at the current level of the execution context, and its key is returned by Do(), so you can retrieve data stored in the action's context with GetC().

How to use

Use the function in any of the following ways:

Do(actionApiName, value)


  • actionApiName (text): the API name of the action to be executed.

  • value: the record ID for which the action is being executed. The record's object must match the object selected in the properties of the actionApiName action.

  • userId (optional): When using the visit planner action, you can pass userId with currentMapslyUser.userId.system, for example {{ Do(“test_planner”, null, currentMapslyUser.userId.system) }}


Context ID of the action that has been executed. You may use it as input for GetC(). Example of a Twig code that retrieves a myVar key from the context of a myActionApiName action executed for record ID
{{ GetC("myVar", Do("myActionApiName", }}



See also

Did this answer your question?