Chatforma icon

Chatforma

Consume Chatforma API

Overview

This node integrates with the Chatforma API to manage and interact with chatbot-related data and messaging. It supports actions such as retrieving information about bots, forms, lists, users, dialogs, and dialog messages; sending text messages to users or segments; and managing user membership in lists (adding or deleting users).

Common scenarios where this node is useful include:

  • Automating chatbot message dispatches to individual users or user segments.
  • Fetching bot configurations, user lists, or dialog histories for analysis or further processing.
  • Managing user subscriptions to specific segments or lists within a bot.
  • Sending targeted notifications or updates via chatbots.

Practical examples:

  • Sending a promotional message to all users in a selected segment.
  • Retrieving the list of active bots to display options in a workflow.
  • Adding a user to a marketing segment after they complete a form.
  • Deleting a user from a notification list when they unsubscribe.

Properties

Name Meaning
Действие (action) The action to perform: "Получить" (get), "Отправить" (send), "Добавить" (add), "Удалить" (delete)
Объект (params) 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's BotUserId used when adding or deleting a user from a list
Объект (operation) When action is "send", specifies the type of message operation:
- Текстовая рассылка списку (segment_dispatch): send message to a selected user segment
- Текстовая рассылка пользователю (dispatch): send message to a selected user
- Сообщение в диалог пользователю (message_to_dialog): send a message into a user's dialog
- Сообщение пользователю (message): mark a message as read or processed 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
Спisок пользователей (list_id) Segment/List ID used when sending a segment dispatch message
ID пользователя (user_id) User's BotUserId used when sending messages or dialog messages
Текст сообщения (content) Text content of the message to be sent
ID сообщения (message_id) Message ID used when marking a message for a user

Output

The node outputs a JSON array containing the response data returned by the Chatforma API for the requested action. The structure depends on the action and parameters:

  • For "get" actions, it returns lists of bots, forms, users, dialogs, dialog messages, or segments.
  • For "send" actions, it returns confirmation or status of the message dispatch.
  • For "add" and "delete" actions, it returns the result of modifying user membership in a segment.

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 credential is provided, the node will throw an error. Ensure that valid API authentication is configured.
  • Invalid Bot/User IDs: Providing incorrect or non-existent bot or user IDs may cause API errors or empty responses.
  • Network issues: Connectivity problems to the Chatforma API endpoint will cause request failures.
  • Incorrect action/operation combinations: Selecting unsupported combinations of action and operation parameters may lead to unexpected behavior or errors.
  • API rate limits or permission errors: The API may reject requests if limits are exceeded or permissions are insufficient.

To resolve these issues:

  • Verify API credentials and permissions.
  • Double-check input IDs and parameters.
  • Ensure stable internet connectivity.
  • Review API documentation for correct usage patterns.

Links and References

Discussion