CoachTrigger Dev icon

CoachTrigger Dev

Interact with coach trigger action development server API

Overview

This node interacts with a Coach Trigger development server API to perform various message-related operations within a coaching or CRM context. Specifically, the AI Message Update operation updates an existing AI-generated message in the system, allowing you to modify message content, translations, metadata such as token counts, and related identifiers.

Common scenarios where this node is beneficial include:

  • Updating AI coach messages after receiving new information or corrections.
  • Synchronizing translated message content for multilingual support.
  • Tracking usage statistics like token counts for AI model interactions.
  • Managing conversation threads and runs by updating message metadata.

For example, if an AI coach message was generated but later needs correction or translation update, this node can be used to send the updated data back to the server to keep records consistent.

Properties

Name Meaning
Authentication Choose between "Company Api" or "System Api" authentication methods.
Message ID The unique identifier of the message to update.
Message The updated message content to replace the existing one.
Coach User ID The user ID of the coach associated with the message.
Message Translated The translated version of the message content (if applicable).
LLM Model The language model used to generate or process the message.
Token In The count of input tokens consumed by the AI model (sensitive info).
Token Out The count of output tokens produced by the AI model (sensitive info).
Run ID Identifier for the specific run or session of the AI interaction.
Thread ID Identifier for the conversation thread the message belongs to.
Type A string representing the type/category of the message (default is "0").

Output

The node outputs a JSON object containing the response from the Coach Trigger API after attempting to update the AI message. This typically includes confirmation of the update or details about the updated message record.

The output structure is:

{
  "json": {
    // Response fields from the API, e.g. status, updated message data, etc.
  }
}

No binary data output is involved in this operation.

Dependencies

  • Requires access to the Coach Trigger development server API at https://dev.mymatrixapp.com/crmApi.
  • Requires either a Company API key or System API key credential configured in n8n for authentication.
  • Network connectivity to the API endpoint.
  • Proper permissions on the API keys to perform message update operations.

Troubleshooting

  • Authentication errors: Ensure that the correct API key credential is selected and properly configured. Using the wrong authentication option or expired keys will cause failures.
  • Missing required parameters: The operation requires messageId and coachUserId at minimum. Omitting these will result in errors.
  • Invalid message ID: If the provided message ID does not exist or is incorrect, the API may return a not found or validation error.
  • Malformed JSON or invalid field values: Ensure all fields conform to expected types and formats, especially token counts and IDs.
  • Network issues: Verify network connectivity and that the API endpoint is reachable.
  • API rate limits or quota exceeded: If too many requests are made, the API might reject further calls temporarily.

Links and References

  • Coach Trigger API Documentation (Assumed URL based on domain, verify actual docs)
  • n8n documentation on HTTP Request Node for understanding API call mechanics.
  • General best practices for managing API keys and credentials securely in n8n workflows.

Discussion