Actions4
Overview
This node integrates with the Chatforma API to manage and interact with chatbots, user lists, dialogs, and messages. It supports actions such as retrieving data (bots, forms, lists, users, dialogs, dialog messages), sending text messages to users or segments, and managing user membership in lists by adding or deleting users.
Common scenarios include:
- Fetching chatbot configurations or user segments for analysis or further processing.
- Sending targeted text message campaigns to specific user lists or individual users.
- Managing user subscriptions within chatbot segments dynamically.
- Retrieving dialog histories or messages for customer support or auditing.
Practical examples:
- Automatically send a promotional message to all users in a selected segment.
- Retrieve all active bots to display their status or configuration.
- Add a new user to a marketing list after they sign up on a website form.
- Delete a user from a notification list when they unsubscribe.
Properties
Name | Meaning |
---|---|
Действие | Action to perform: Получить (get), Отправить (send), Добавить (add), Удалить (delete) |
Объект | Object to retrieve when action is "get": Боты (bots), Формы (forms), Списки (lists), Пользователи (users), Диалоги (dialogs), Сообщения диалогов (dialogs_messages) |
Бот Id (list_bot_id) | Bot ID used when adding or deleting a user from a list |
ID списка (list_list_id) | List ID used when adding or deleting a user from a list |
ID пользователя (list_user_id) | User BotUserId used when adding or deleting a user from a list |
Объект (operation) | Operation to perform when action is "send": Текстовая рассылка списку (segment_dispatch), Текстовая рассылка пользователю (dispatch), Сообщение в диалог пользователю (message_to_dialog), Сообщение пользователю (message) |
Бот Id (bot_id) | Bot ID used when sending messages |
Бот ID (get_bot_id) | Bot ID used when retrieving objects other than bots |
ID пользователя (get_user_id) | User ID used when retrieving dialog messages |
Список пользователей (list_id) | User list ID used when sending segment dispatch messages |
ID пользователя (user_id) | BotUserId of the user when sending direct messages or dialog messages |
Текст сообщения (content) | Text content of the message to send |
ID сообщения (message_id) | Message ID used when sending a specific message to a user |
Output
The node outputs the JSON response returned by the Chatforma API for the requested action. The structure depends on the API endpoint called:
- For "get" actions, it returns arrays or objects representing bots, forms, lists, users, dialogs, or dialog messages.
- For "send" actions, it returns confirmation or status objects indicating success or failure of message dispatch.
- For "add" and "delete" actions, it returns the result of modifying user membership in lists.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating requests to the Chatforma API.
- Uses the Axios HTTP client library to make REST API calls.
- The node expects network access to
https://api.pro.chatforma.com
.
Troubleshooting
- Missing credentials error: If no API key is provided, the node throws an error. Ensure that valid API authentication credentials are configured.
- Invalid bot or user IDs: Using incorrect or non-existent IDs may cause API errors or empty responses. Verify IDs before use.
- Network or API errors: Connectivity issues or API downtime will cause request failures. Check network connectivity and Chatforma service status.
- Incorrect action-operation combinations: Selecting unsupported combinations of action and operation may lead to unexpected behavior or errors. Follow the property options carefully.
Links and References
- Chatforma API Documentation (assumed URL based on API base)
- Axios HTTP Client
- n8n Documentation on Creating Custom Nodes