Actions

You can perform some useful things at some steps of your flow with actions. For example, send an email, webhook, save user input to a variable, change flow language, etc...

Please note, that you can set actions on "Message" and "Message with reply" steps only.

Saving user input to variable

If you have enabled the "Wait for reply" option, you can save the user input to the variable. To do that, you need to enable the "Save to variable" option and select the variable you want to save the value.

Sending an Email

If you want to send an email when some step of the flow is reached, please follow these steps:

  • double click the flow step

  • in the "Actions" section of the step editor turn on the "Send email" option

  • select the email template (you can add email templates on the Settings / Email page

  • enter "Email subject"

  • enter email recipients. You can set several recipients - each one on a new line

  • click the "Save" button

Sending webhook

Using webhooks you can integrate with some third-party services to perform some useful actions. For example, you can integrate with Pabbly Connect to connect our chat to thousands of services. To send a webhook follow these steps:

  • double click the flow step

  • in the "Actions" section of the step editor turn on the "Send data to URL" option

  • enter a URL you want to send the webhook to

  • select a method. If you don't need to send data to the URL you can select GET, otherwise you need a POST method

  • if you need to send some data to the URL, you need to fill in the Webhook data section

Webhook will send data with POST variables like that:

[
    key1 => "value 1",
    key2 => "value 2",
    ...
]

You can use variables in data value. So, for example, you have an {email} and a {name} variables in your flow. Then, when the user reaches some step of the flow, you need to send a name and email to some URL. There is how it should look like:

For example, the user has entered his name "John" and email "john@doe.com". The data you'll receive on your endpoint will be:

[
    u_name => "John",
    u_email => "john@doe.com"
]

Saving webhook response to variable

If you have enabled the "Send data to URL" option, then you can save the webhook response to a variable(s). Let's say your webhook endpoint returns this JSON value:

{
    "status": "ok",
    "model": {
        "id": "123"
    },
    "message": "your request is received"
}

For example, you want to save the "status", "model id", and a "message" to variables. First of all, you need to create variables to store those data. Let's say you have created variables {status}, {model_id}, and {message}. So you need to fill in the section like that:

Please pay attention to the model_id variable. When you need to access nested variables you need to divide each level with the dot.

Changing a language for the flow

If you have your flow in a few languages, you may need to change the language of the flow at some point.

To do that, just turn on the "Change flow language" option and select a language in the dropdown below.

Last updated