Actions11
- User Actions
- Measure Actions
- Sleep Actions
- Activity Actions
Overview
This node integrates with the Withings API to retrieve user activity data. Specifically, for the "Activity" resource and the "Get Activity" operation, it fetches detailed user activity information such as steps, calories burned, distance, and other fitness metrics recorded by Withings devices.
Common scenarios where this node is beneficial include:
- Tracking daily physical activity for health monitoring.
- Aggregating activity data over a period for fitness reports.
- Integrating Withings activity data into broader health or wellness workflows.
- Automating alerts or notifications based on user activity levels.
For example, a user could configure this node to pull activity data from the last week to analyze trends or feed the data into a dashboard.
Properties
| Name | Meaning |
|---|---|
| Additional Fields | Optional parameters to refine data retrieval: |
| - Start Date: Start date for data retrieval (timestamp). | |
| - End Date: End date for data retrieval (timestamp). | |
| - Last Update: Retrieve only data updated after this date (timestamp). | |
| - Offset: Skip this many records (for pagination). |
Output
The node outputs JSON data containing the retrieved activity information. The output structure includes:
success: Boolean indicating if the API call was successful.resource: The resource type, here always"activity".operation: The operation performed, here"getactivity".- Other fields depend on the Withings API response body and typically include detailed activity metrics such as steps, calories, distance, and timestamps.
If the API call fails, the output JSON will contain:
success: falseerror: Error message describing the failure.status: HTTP status code returned by the API.errorCode: Specific error code from the API if available.resourceandoperationfor context.
The node does not output binary data.
Dependencies
- Requires an OAuth2 API credential configured with Withings to authenticate requests.
- Uses the Withings API endpoints under
https://wbsapi.withings.net. - The node handles token refresh internally and retries failed requests with exponential backoff.
Troubleshooting
Common Issues
- Authentication errors: Invalid or expired tokens can cause failures.
- API rate limits: Too many requests in a short time may lead to temporary blocks.
- Incorrect date formats: Input dates must be valid ISO date strings convertible to timestamps.
- Network issues: Connectivity problems can cause request timeouts.
Error Messages and Resolutions
- Errors mentioning authentication, token expiration, or permission denied indicate issues with the OAuth2 credentials. To resolve:
- Reconnect or refresh the Withings account credentials in n8n.
- Verify that the Withings developer account and app have the required scopes.
- Ensure the Withings user account is active and properly linked.
- API errors with status codes other than 0 indicate server-side or request issues; check the error message for details.
- If the node throws a retry limit exceeded error, wait a few minutes before retrying to avoid hitting rate limits.