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 (e.g., bots, forms, users), sending text messages to users or segments, and managing user membership in lists.
Common scenarios where this node is useful include:
- Fetching chatbot configurations or user dialogs for analysis or processing.
- Sending targeted text message campaigns to specific user segments or individual users.
- Adding or removing users from particular lists or segments within a bot.
- Automating dialog message sending or dispatching messages based on workflow triggers.
For example, you could use this node to send a promotional message to all users in a selected segment or retrieve all dialogs of a bot to analyze user interactions.
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 users from lists |
| ID списка (list_list_id) | List ID used when adding or deleting users |
| ID пользователя (list_user_id) | User ID (BotUserId) used when adding or deleting users |
| Объект (operation) | When action is "send", specifies the type of sending operation: |
| - Текстовая рассылка списку (segment_dispatch): Send message to a selected user list | |
| - Текстовая рассылка пользователю (dispatch): Send message to a selected user | |
| - Сообщение в диалог пользователю (message_to_dialog): Send a message into a user's dialog | |
| - Сообщение пользователю (message): Approve a message in the bot for a user | |
| Бот Id (bot_id) | Bot ID used for sending messages |
| Бот ID (get_bot_id) | Bot ID used when retrieving forms, lists, dialogs, dialog messages, or users |
| ID пользователя (get_user_id) | User ID used when retrieving dialog messages |
| Список пользователей (list_id) | List ID used when sending messages to a segment |
| ID пользователя (user_id) | User ID (BotUserId) used when sending messages |
| Текст сообщения (content) | Text content of the message to be sent |
| ID сообщения (message_id) | Message ID used when approving a message in the bot |
Output
The node outputs the JSON response returned by the Chatforma API for the requested action. This typically includes:
- For "get" actions: arrays or objects representing bots, forms, lists, users, dialogs, or dialog messages.
- For "send" actions: confirmation or status of the message dispatch.
- For "add" and "delete" actions: confirmation of user addition or removal from 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 the API key to be configured in n8n credentials under a generic API authentication token.
Troubleshooting
- Missing Credentials: If no API key credential is provided, the node will throw an error "No credentials got returned!". Ensure that the API key is correctly set up in n8n credentials.
- Invalid IDs: Providing incorrect Bot IDs, User IDs, List IDs, or Message IDs may result in API errors or empty responses. Verify these IDs are correct and exist in your Chatforma account.
- API Errors: Network issues or invalid API keys can cause request failures. Check the API key validity and network connectivity.
- Unsupported Combinations: Some property combinations are only valid for certain actions or operations. Make sure to select compatible options as per the node's input properties.
Links and References
- Chatforma API Documentation (assumed official API docs)
- Axios HTTP Client
- n8n Documentation on Creating Custom Nodes
