Initially, it is important for you to know that you can configure the Interactive List Node to create an interactive list. While both solutions serve the same purpose, they vary in the aesthetic and user experience of the complement:
- The "Interactive List" Node displays a drop-down menu.
- The dynamic list form displays a numbered list.
Here you will see the flow that will allow you to generate a form with a dynamic selection list applicable to all channels, ensuring optimal integration and functionality, depending on the channel where it is implemented.

Download the flow by clicking on this link.
Below, you will find the key steps and the role of each node in the process:
- Function Node: Set Initial Parameters
- Goal: create the basic objects needed for the dynamic list.
- Objects:
- msg.count: Counter required to number the options in the list.
- msg.dynamicCallbackLabel: Stores the "callback_label" for asynchronous channels.
- msg.dynamicSelectOptions: Stores the list of options for synchronous channels.
- Function Node: Data Mockup - Users List
- Goal: Set an object (msg.data) that simulates the response of an endpoint.
- Loop Node: Users Loop
- Goal: Iterate over msg.data containing the data mockup, to process each item in the dynamic list.
- Function Node: Build The List
- Goal: Dynamically build the selection list based on the data.
- Configuration Details:
- lineBreak: Contains the line break for asynchronous channel options.
- getNumberEmoji: Converts numbers to numeric emojis for visual experience and later selection. The counter is incremental.
- msg.dynamicCallbackLabel and msg.dynamicSelectOptions: Each generated option is dynamically saved in these objects.
- Form Node
- Goal: Set the basic structure of the form within the complements object.
- Function Node: Set Form Options
- Goal: Replace the static parameters "callback_label" and "options" with the dynamic objects configured in the "Build The List" node.
Testing the Flow: run the Inject Node and observe the result in the "debug" console.
Real Implementation:
- The configuration of the "Set Initial Params" function node must not be modified.
- The "Data mockup - User list" function node must be replaced by the data obtained through a Request (http request node).
- The data obtained by the http request node will be in the "payload" object.
- This data must be stored in a different object than the "payload" (for example, msg.data), since this object will be replaced in each iteration of the Loop node.
- Within the "Build The List" node, the option will be stored dynamically in each iteration of the loop (for example, msg.payload.name).
- In this way, the objects that will contain the selection lists will be created (for example, msg.dynamicCallbackLabel and msg.dynamicSelectOptions).
- Finally, these objects will replace the form parameters, respectively:
- msg.payload.complements[0].param[0].callback_label = msg.dynamicCallbackLabel
- msg.payload.complements[0].param[0].options = msg.dynamicSelectOptions