CoachTrigger Live icon

CoachTrigger Live

Interact with coach trigger action liveelopment server API

Overview

This node interacts with a coaching and activity tracking API to retrieve various user-related data, including weekly report data for activities. Specifically, the "Get Weekly Report DATA" operation fetches aggregated weekly report information for a specified user on a given date. This is useful in scenarios where coaches, managers, or automated systems need to analyze user performance, engagement, or progress over a week.

Practical examples include:

  • Generating weekly summaries of user activities for performance reviews.
  • Feeding weekly report data into dashboards or notifications.
  • Automating follow-ups based on weekly user engagement metrics.

Properties

Name Meaning
Authentication Choose between two authentication methods: "Company Api" (using an API key credential) or "System Api" (using a system key credential).
User ID The unique identifier of the user for whom the weekly report data is requested.
Date The specific date to get the weekly report data for; typically represents the week of interest.

Output

The node outputs JSON data representing the weekly report for the specified user and date. The exact structure depends on the API response but generally includes aggregated metrics, activity summaries, or KPI values related to the user's weekly performance.

No binary data output is indicated by the source code.

Example output JSON (structure inferred from context):

{
  "weekStartDate": "2024-05-20",
  "weekEndDate": "2024-05-26",
  "userId": "12345",
  "activitiesSummary": [
    {
      "activityId": "a1",
      "activityName": "Running",
      "totalDuration": 120,
      "sessionsCount": 3
    },
    {
      "activityId": "a2",
      "activityName": "Meditation",
      "totalDuration": 60,
      "sessionsCount": 5
    }
  ],
  "kpiValues": {
    "steps": 35000,
    "caloriesBurned": 2500
  }
}

Dependencies

  • Requires access to the external CoachTrigger API at https://www.coachtriggerapp.com/crmApi/.
  • Requires either a company API key or a system API key credential configured in n8n for authentication.
  • Network connectivity to the API endpoint must be available.

Troubleshooting

  • Authentication errors: If the API key or system key is invalid or missing, the API will reject requests. Ensure credentials are correctly set up in n8n.
  • Missing required parameters: The node requires User ID and optionally Date. Omitting these may cause errors or empty responses.
  • API response parsing errors: If the API returns malformed JSON or unexpected data, the node might fail to parse the response. Verify API availability and correctness.
  • Network issues: Timeouts or connection failures can occur if the API server is unreachable. Check network settings and API status.

Links and References

Discussion