Actions11
- User Actions
- Measure Actions
- Sleep Actions
- Activity Actions
Overview
This node integrates with the Withings API to retrieve user activity data, specifically focusing on workouts when using the "Activity" resource with the "Get Workouts" operation. It allows users to fetch detailed workout information recorded by Withings devices or apps within specified date ranges or other filtering criteria.
Common scenarios where this node is beneficial include:
- Aggregating workout data for fitness tracking dashboards.
- Automating health and exercise reporting workflows.
- Integrating Withings workout data into broader wellness or coaching platforms.
For example, a user can configure the node to pull all workouts between two dates to analyze weekly exercise patterns or trigger follow-up actions based on recent workout activity.
Properties
| Name | Meaning |
|---|---|
| Additional Fields | Optional filters to refine the data retrieval: |
| - Start Date: Start timestamp to begin fetching workouts from. | |
| - End Date: End timestamp to stop fetching workouts at. | |
| - Last Update: Fetch only workouts updated after this timestamp. | |
| - Offset: Skip a number of records (useful for pagination). |
Output
The node outputs JSON objects containing the response from the Withings API for the requested workout data. The structure includes:
success: Boolean indicating if the API call was successful.resource: The resource type, here always"activity".operation: The operation performed, here"getworkouts".- Other fields as returned by the Withings API under
body, which typically contains workout details such as timestamps, duration, calories burned, and other metrics.
If an error occurs, the output JSON will contain:
success: falseerror: Error message describing the failure.statusanderrorCode: API error codes if available.resourceandoperation: To identify the context of the error.
The node does not output binary data.
Dependencies
- Requires an OAuth2 API credential configured for Withings to authenticate requests.
- Uses the Withings REST API endpoints, specifically
/v2/measurewith actiongetworkouts. - The node handles rate limiting and retries internally with exponential backoff and token refresh attempts.
Troubleshooting
Common Issues
- Authentication errors: Invalid or expired OAuth tokens will cause failures.
- API rate limits: Excessive requests may be throttled; the node implements retry logic but persistent issues may require reducing request frequency.
- Incorrect date formats: Ensure date/time inputs are valid ISO strings or timestamps.
- Empty results: If no workouts match the filters, the API returns empty data.
Error Messages and Resolutions
- Errors mentioning token expiration, unauthorized access, or invalid credentials indicate the need to reconnect or refresh the Withings account credentials in n8n.
- API errors with status codes other than 0 indicate issues like invalid parameters or server errors; verify input properties and try again later.
- Network timeouts or connectivity issues may require checking internet connection or Withings API status.