# Adding Actions

Inside the "ACTIONS" block on the canvas, click the **"Add action"** button.

<div align="left"><figure><img src="/files/Uba0qik9I5Y4iJeuG7t5" alt="" width="375"><figcaption></figcaption></figure></div>

An **"Add Action" sidebar** will pop up listing all available actions. These are typically categorized into:

* **UserFlux Actions:** Core actions provided by the platform.
* **Available From \[Service Name]:** Actions related to integrated third-party services (e.g., Slack, Mailgun, SendGrid, Postmark).

<div align="left"><figure><img src="/files/oueZ3INQ1vbfWV6jiWKs" alt="" width="375"><figcaption></figcaption></figure></div>

## **UserFlux Actions**

These are native actions within the platform.

## **Send Email:**

1. Select **"Send Email"** from the "UserFlux Actions" list.
2. In the "Send email" modal:
   * Enter the **Subject** for the email.
   * Select an **Email Template** from the dropdown. If there are no templates available you will need to use the email template builder in the content tab to create one.&#x20;
   * Choose the **Email Provider** from the dropdown.
3. Click **"Done"**. The "Send email" action will appear in the "ACTIONS" block.

<figure><img src="/files/f0Um3eCsSLVOiWo760Mh" alt=""><figcaption></figcaption></figure>

## Using Liquid Variables for Dynamic Content

\
To personalize your emails, you can use Liquid variables in the **Subject** field and within the content of your selected **Email Template**.&#x20;

Liquid variables are placeholders that get replaced with actual data when the email is sent. They are typically enclosed in double curly braces: `{{ }}`.

\
In order for the liquid variables to be applied you must pass them from the trigger so the email has the relevant data in the payload.&#x20;

\
See below example from an api trigger where the variables for the subject and email templates are passed to the send email action.

<div align="left"><figure><img src="/files/IlKkiuciDig1vsP17P27" alt="" width="375"><figcaption></figcaption></figure></div>

<figure><img src="/files/nj4vjyJDmrc64O3fsugP" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/7soiugw1QgIUuT51sPSj" alt=""><figcaption></figcaption></figure>

## **Call Webhook:**

1. Select **"Call Webhook"** from the list.
2. In the "Untitled Action" (webhook configuration) modal:
   * *(Optional)* Click the pencil icon next to "Untitled Action" to give it a descriptive name.
   * Enter the **Endpoint** URL.
   * Select the HTTP **Method** (e.g., POST, GET).
   * *(Optional)* Click **"+ Add header"** to include custom HTTP headers.
   * Enter the **Request Body**, typically in JSON format. The editor may provide suggestions for dynamic variables (e.g., `{{ user.properties }}`, `{{ event.properties }}`, Liquid filters like `| capitalize`, `| json`).
3. Click **"Save"**. The configured webhook action will appear on the canvas. *Note: An "Input incorrect" error may appear if required fields like Endpoint are missing or invalid.*

<div align="left"><figure><img src="/files/LZ6am2Nwi4aB3b5d9OyL" alt="" width="375"><figcaption></figcaption></figure></div>

## **Update User:**

1. Select **"Update User"** from the list.
2. In the "Profile Update Action" modal:
   * Select the **user attribute** you want to update from the dropdown.
   * The "Set value to" field is typically pre-selected.
   * Enter the new **text value** for the attribute.
3. Click **"Done"**.

<figure><img src="/files/vXHIkkvigePtqzSNxK5e" alt=""><figcaption></figcaption></figure>

## **Track User Event:**

1. Select **"Track User Event"** from the list.
2. In the "Track User Event Action" modal:
   * Enter the **Event name**.
   * Provide any **Event properties** as a JSON object in the text area.
3. Click **"Done"**.

<figure><img src="/files/r2mDwaU4nNUadJk1GzIj" alt=""><figcaption></figcaption></figure>

## **Create Dynamic Variable:**

1. Select **"Create Dynamic Variable"** from the list.
2. In the "Create a dynamic variable" modal:
   * Enter a **Variable Name**.
   * Select the **Type** of variable:
     * **User Event Value:** To derive the variable from a property of a recent user event. Configure the event name and property.
     * **Liquid Template Value:** To define the variable using Liquid templating language. Enter your Liquid template.
3. Click **"Done"**. This action is useful for storing values to be used in subsequent steps or messages.

<figure><img src="/files/WMjt3aaOKS19zQ0v6HXC" alt=""><figcaption></figcaption></figure>

## **Actions from Integrated Services**

These actions interact with third-party platforms you've connected. The configuration modals will be specific to each service.

## **Slack: Send message to a channel:**

1. Select **"Send message to a channel"** under "Available From Slack".
2. Configure:
   * **Slack Channel ID**.
   * **Message** content.
   * *(Optional)* Add parameters.
3. Click **"Done"**.

<figure><img src="/files/kWfqYunGXBBK3CcKRnWj" alt=""><figcaption></figcaption></figure>

## **Mailgun: Send a templated message:**

1. Select **"Send a templated message"** under "Available From Mailgun".
2. Configure:
   * **Mailgun Domain**.
   * **Mailgun Template** name/ID.
   * *(Optional)* Add parameters (e.g., "Recipients Email Address").
3. Click **"Done"**.

<figure><img src="/files/WMInYjm2ngAoMeZVE9qe" alt=""><figcaption></figcaption></figure>

## **SendGrid: Send a templated email:**

1. Select **"Send a templated email"** under "Available From SendGrid".
2. Configure:
   * **SendGrid Template ID**.
   * *(Optional)* Add parameters (e.g., "Recipients Email Address").
3. Click **"Done"**.

<figure><img src="/files/IiYqDDsfQmpoPiu6JQ6c" alt=""><figcaption></figcaption></figure>

## **Postmark: Send a templated email:**

1. Select **"Send a templated email"** under "Available From Postmark".
2. Configure:
   * **From Address**.
   * **Message Stream ID**.
   * *(Optional)* Add parameters.
3. Click **"Done"**.

<figure><img src="/files/1WnIzHerqUMpqbKUooie" alt=""><figcaption></figcaption></figure>

## Managing Actions on the Canvas

* Each specific action added within an "ACTIONS" block (e.g., "Send email", "Call Webhook") will have a **trash icon** next to it, allowing you to delete that individual action.
* The entire "ACTIONS" block (step container) can be managed using the dropdown in its header, which provides options like "Entry Conditions" (to re-edit), "Duplicate Step", and "Delete Step".
* You can add multiple "ACTIONS" blocks to your workflow to create a sequence of steps.

<div align="left"><figure><img src="/files/3OPuV7K6sEcj3uSZCjpn" alt="" width="375"><figcaption></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://userflux.gitbook.io/userflux-docs/feature-guides/user-journeys/user-flows/adding-actions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
