CT Coach Dev icon

CT Coach Dev

Interact with HttpBin API

Activity → Get Weekly Report DATA

AI-generated

Overview

This node interacts with the Coach API to retrieve and manage user activity data, including weekly report data. Specifically, for the Activity resource and the Get Weekly Report DATA operation, it fetches a weekly summary report of a user's activities based on a specified date.

Common scenarios where this node is beneficial include:

  • Automating the retrieval of weekly performance or activity reports for users in a coaching or CRM system.
  • Integrating weekly activity summaries into dashboards or notifications.
  • Combining weekly report data with other workflow steps for further analysis or action.

Example use case:

  • A manager wants to automatically pull weekly activity reports for team members every Monday to review progress and KPIs.

Properties

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

Output

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

No binary data output is involved.

Example output snippet (conceptual):

{
  "weekStartDate": "2024-05-06",
  "weekEndDate": "2024-05-12",
  "userId": "12345",
  "activitiesSummary": {
    "totalActivities": 15,
    "completedTasks": 10,
    "kpiScores": {
      "sales": 80,
      "calls": 50
    }
  }
}

Dependencies

  • Requires access to the Coach API endpoints at https://coachtriggerapp.com/crmApi/.
  • Needs an API key credential configured in n8n, either as "Company Api" or "System Api".
  • Proper permissions for the API key to access user activity and report data.

Troubleshooting

  • Authentication errors: Ensure the correct API key credential is selected and properly configured. Invalid or missing keys will cause authorization failures.
  • Missing required parameters: The User ID property is mandatory. Omitting it will result in errors from the API.
  • Invalid date format: The Date parameter should be in a valid string format recognized by the API (e.g., ISO 8601). Incorrect formats may lead to empty or error responses.
  • API response parsing errors: If the API returns unexpected data or non-JSON responses, the node might fail to parse the output. Verify API availability and response correctness.
  • Network issues: Connectivity problems to the API endpoint will cause request failures.

Links and References

  • Coach API Documentation (Assumed URL for reference)
  • n8n Documentation on HTTP Request Node (for understanding HTTP interactions)
  • General best practices for API authentication and error handling in n8n workflows

Discussion