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 messages to users or segments; and managing user membership in lists (adding or deleting users).

Common scenarios include:

  • Fetching bot configurations or user lists for analysis or synchronization.
  • Sending targeted messages to individual users, user segments, or dialog conversations.
  • Managing user subscriptions to specific segments or lists within a bot.

Practical examples:

  • Automatically dispatch a promotional message to a selected user segment.
  • Retrieve all dialogs of a bot to monitor ongoing conversations.
  • Add a user to a marketing list after they complete a form.

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), Сообщения диалогов (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) When action is "send", specifies the type of message operation: Текстовая рассылка списку (segment_dispatch), Текстовая рассылка пользователю (dispatch), Сообщение в диалог пользователю (message_to_dialog), Сообщение пользователю (message)
Бот Id (bot_id) Bot ID used when sending messages
Бот 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
ID пользователя (user_id) BotUserId of the user when sending messages
Текст сообщения (content) Text content of the message to send
ID списка (list_id) List ID used when sending segment dispatch messages
ID сообщения (message_id) Message ID used when sending a specific message to a user

Output

The node outputs JSON data returned by the Chatforma API corresponding to the requested action and object/operation. This includes:

  • Lists of bots, forms, segments, users, dialogs, or dialog messages.
  • Confirmation or details of sent messages.
  • Results of adding or deleting users from lists.

The output JSON structure depends on the API endpoint called but generally contains relevant entities or status information.

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 internally 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 credentials are configured.
  • Invalid IDs or parameters: Providing incorrect bot IDs, user IDs, list IDs, or message IDs may result in API errors or empty responses. Verify these values before running the node.
  • API rate limits or connectivity issues: Network problems or API rate limiting can cause request failures. Check network connectivity and API usage quotas.
  • Unexpected response structure: Changes in the Chatforma API could affect output format. Review API documentation if outputs differ from expectations.

Links and References

Discussion