Actions16
- User Actions
- Activity Actions
- Message Actions
Overview
This node interacts with the CoachTrigger API to retrieve various user activity and report data. Specifically, for the Activity resource and the Get Daily Report DATA operation, it fetches daily report data for a specified user on a given date. This is useful in scenarios where you want to automate the retrieval of daily performance or activity reports for users within a coaching or team management context.
Practical examples include:
- Automatically pulling daily activity summaries for individual users to monitor progress.
- Integrating daily report data into dashboards or notifications.
- Using daily report data as input for further workflow automation or analytics.
Properties
Name | Meaning |
---|---|
Authentication | Choose between "Company Api" (using a company-level API key) or "System Api" (system-level key) for authenticating requests. |
User ID | The unique identifier of the user for whom the daily report data will be retrieved. |
Date | The specific date for which the daily report data is requested. Format should be a string representing the date. |
Output
The node outputs JSON data containing the daily report information returned by the CoachTrigger API for the specified user and date. The exact structure depends on the API response but generally includes metrics, activities, or KPIs relevant to that day.
No binary data output is involved in this operation.
Example output JSON snippet (structure depends on API):
{
"reportDate": "2024-06-01",
"userId": "12345",
"activities": [
{
"activityId": "a1",
"name": "Running",
"duration": 30,
"caloriesBurned": 250
}
],
"kpis": {
"steps": 10000,
"sleepHours": 7
}
}
Dependencies
- Requires an API authentication token, either a company API key or a system API key, configured in n8n credentials.
- Makes HTTP POST requests to the CoachTrigger API endpoint:
https://www.coachtriggerapp.com/crmApi/report/daily-data
. - Proper credential setup in n8n is necessary to authenticate and authorize API calls.
Troubleshooting
- Authentication errors: Ensure the correct API key type is selected and the corresponding credential is properly configured in n8n.
- Missing required parameters: The
User ID
property is mandatory; omitting it will cause request failures. - Invalid date format: The
Date
parameter should be correctly formatted as expected by the API; otherwise, the API may return errors or empty data. - API response errors: If the API returns an error, check network connectivity, API key validity, and user permissions.
- Parsing errors: The node attempts to parse JSON responses; malformed responses from the API could cause failures.
Links and References
- CoachTrigger API Documentation (assumed URL for reference)
- n8n HTTP Request Node documentation for understanding how API calls are made: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/