> For the complete documentation index, see [llms.txt](https://docs.messageflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.messageflow.com/rcs/rcs-flow-studio-creating-messages-and-scenarios/advanced-nodes-integrations-with-your-api.md).

# Advanced nodes - integrations with your API

Two nodes let you connect the conversation to your systems: Dynamic Carousel (builds cards from API data) and HTTP Request (calls an API in the background). They require cooperation with a technical person on your side — below you will find what to prepare and how to test it.

#### Dynamic Carousel

Instead of entering cards manually, the editor fetches them in real time from your API — ideal for an offer that changes often (products, availability, prices).

What to prepare (technical side):

* The endpoint address (URL) that returns the data — called with the GET method.
* JSON response — an array of objects, where each item has: title, description and an image in the media\_url / image\_url / imageUrl / mediaUrl field.
* Suggestion values in a predictable format (e.g. with the cat\_ prefix), so that you can react to them in the Decision node.

Sample API response:

```
[
  {
    "title": "Running shoes",
    "description": "Lightweight, for any weather",
    "media_url": "https://yourshop.com/img/shoes.jpg"
  },
  {
    "title": "Sports jacket",
    "description": "Breathable membrane",
    "image_url": "https://yourshop.com/img/jacket.jpg"
  }
]

```

#### How to configure:

<figure><img src="https://1762163817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDIGjHYIXYoHyJoOeeUgD%2Fuploads%2FzSQwgmhW27gR0TCd4Mom%2FZrzut_19.png?alt=media&amp;token=5ec8dbe6-f611-4f61-8dec-d80cb3c1517f" alt=""><figcaption></figcaption></figure>

1. Add a Carousel node, set Carousel Type to Dynamic and paste the endpoint address in the Data source (URL) field.
2. Add the required headers (e.g. authorization) with Add Header and set the Timeout (within the range allowed in the editor).
3. Set up error handling: Null or Go to a selected node (optionally with retries).
4. Connect the shared card-click output to a Set Value node, and then to a Decision node.

{% hint style="info" %}
How to react to clicks: cards from the API have one shared “on click” output. To identify what the recipient chose, save the value in a variable (Set Value), then branch the conversation with a Decision node based on that value.

\
Notes and limitations: cards from the API do not have separate buttons per card; the card width is fixed. Only the JSON format is supported. If suggestion values change on the API side, remember to update the conditions in the Decision node.
{% endhint %}

#### HTTP Request

This node does not send a message to the recipient — it works in the background. It fetches data from your system (e.g. order status) or sends data to it (e.g. saving a consent). You can save the retrieved data in variables and use it later in the conversation.

What to prepare:

* Address (URL) and method — GET, POST, PUT, DELETE or PATCH.
* Headers (e.g. an authorization token) as name–value pairs.
* Request body — for POST/PUT/PATCH; you can insert variables using {{variable}}.
* Variable names matching the fields in the response (see below).

How to save response data in variables:

The JSON response is “flattened”, so you refer to nested fields using dots and brackets, e.g. user.name or orders\[0].id. Create variables whose names exactly match these fields — the editor will map the values automatically.

```
// API response:
{ "user": { "name": "Anna", "points": 340 } }
 
// Create variables named:
user.name    -> saves "Anna"
user.points  -> saves 340
```

{% hint style="info" %}
Field mapping: matching is done by name. Make sure the variable names and types match the fields in the response. Keys without a matching variable are simply skipped.
{% endhint %}

#### How to configure and test:

1. Add an HTTP Request node, enter the address and choose the method.
2. Add headers and — if needed — a request body with variables.
3. Create variables matching the response fields you want to keep.
4. Set the Timeout (within the range allowed in the editor) and configure error handling (Null or Go to a node).
5. Test with sample data and check that the variables have been filled in correctly.

Retries: in error handling you can turn on retries — up to 3.

{% hint style="info" %}
When error handling is triggered: a connection error or timeout, an HTTP 4xx/5xx response, or an unexpected error. If the response is valid but a field does not match any variable, it is simply skipped (this is not an error).
{% endhint %}
