Actions4
Overview
This node integrates with the Chatforma API, enabling users to perform various actions related to chatbots and their associated data. It supports retrieving information about bots, forms, lists, users, dialogs, and dialog messages; sending messages or dispatches to users or segments; and managing user membership in lists (adding or deleting users).
Common scenarios include:
- Fetching bot configurations or user dialogs for analysis or automation.
- Sending targeted messages or broadcasts to specific users or user segments.
- Managing user subscriptions to different lists within a bot.
For example, a marketing automation workflow could use this node to send promotional messages to a selected segment of users or retrieve dialog histories for customer support analysis.
Properties
Name | Meaning |
---|---|
Действие (action) | The action to perform: "Получить" (get), "Отправить" (send), "Добавить" (add), "Удалить" (delete) |
Объект (object) | When action is "get", specifies what to retrieve: Bots, Forms, Lists, Users, Dialogs, Dialog 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 ID (BotUserId) used when adding or deleting a user from a list |
Бот ID (get_bot_id) | Bot ID used when getting forms, lists, dialogs, dialog messages, or users |
ID пользователя (get_user_id) | User ID used when getting dialog messages |
Операция (operation) | When action is "send", specifies the type of message sending operation: |
- Текстовая рассылка списка (segment_dispatch): Send message to a user segment | |
- Текстовая рассылка пользователю (dispatch): Send message to a single user | |
- Сообщение в диалог пользователю (message_to_dialog): Send a message into a user's dialog | |
- Сообщение пользователю (message): Approve a message sent by a user | |
Бот Id (bot_id) | Bot ID used for sending messages |
ID списка (list_id) | List ID used for segment dispatch |
ID пользователя (user_id) | User ID (BotUserId) used for sending messages |
Текст сообщения (content) | Text content of the message to send |
ID сообщения (message_id) | Message ID used when approving a user message |
Output
The node outputs the JSON response returned by the Chatforma API for the performed action. This typically includes data such as lists of bots, forms, users, dialogs, messages, or confirmation of sent messages and modifications.
If the API returns binary data (not evident in the code), it would be handled accordingly, but the current implementation only processes JSON responses.
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 the Chatforma API base URL
https://api.pro.chatforma.com/public/v1/
.
Troubleshooting
- No credentials got returned!: This error occurs if the required API key credential is not configured or accessible. Ensure that the API key is properly set up in n8n credentials.
- HTTP request failures: Network issues, invalid API keys, or incorrect parameters may cause API call failures. Check the API key validity, network connectivity, and parameter correctness.
- Invalid or missing parameters: Some actions require specific parameters (e.g., bot ID, user ID). Missing or incorrect values will result in errors. Verify all required fields are filled correctly.
- Unsupported combinations: Selecting incompatible action-object-operation combinations may lead to unexpected behavior or errors. Follow the property display options to select valid combinations.
Links and References
- Chatforma API Documentation (assumed base URL, check official docs)
- Axios HTTP Client
- n8n Documentation