Chatforma icon

Chatforma

Consume Chatforma API

Overview

This node integrates with the Chatforma API to manage bots, forms, user lists, dialogs, and dialog messages. It supports actions such as retrieving data, sending messages, adding users to lists, and deleting users from lists. This node is useful for automating chatbot management tasks, sending targeted messages to users or segments, and managing user memberships in bot segments.

Practical examples include:

  • Fetching all bots or user dialogs to analyze chatbot usage.
  • Sending a message to a specific user or segment within a bot.
  • Adding or removing users from a bot's segment list to control messaging groups.
  • Retrieving dialog messages for a user to monitor conversations.

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
Спisок пользователей (list_id) List ID used when sending segment dispatch messages
ID пользователя (user_id) BotUserId of the user when sending 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 JSON data returned by the Chatforma API corresponding to the requested action and object/operation. The structure varies depending on the endpoint called but generally includes details about bots, forms, lists, users, dialogs, messages, or confirmation of sent messages or modifications.

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 key credential.

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 credential is properly set up in n8n.
  • 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: Selecting incompatible combinations of action, object, and operation parameters may lead to unexpected behavior or errors. Follow the property options carefully.

Links and References

Discussion