Description
n8n-nodes-withings
This is an n8n community node for integrating with the Withings API. It provides nodes to access health and fitness data from your Withings account.
Features
- Complete integration with Withings API resources:
- Customizable parameters for all API operations
- Proper error handling and response formatting
- Automatic token refresh
- n8n (version 1.0.0 or later)
- Withings developer account and API credentials
- n8n-nodes-withings-oauth2-credential package (required for OAuth2 authentication)
– Activity data (getactivity, getsummary, getworkouts)
– Measurements (getmeas, getactivity, getintradayactivity)
– Sleep data (get, getsummary)
– User information (getdevice, getgoals, get)
Prerequisites
Installation
IMPORTANT: This package requires the separate credential package to handle Withings’ non-standard OAuth2 implementation.
Install both packages:
1. Install the OAuth2 credential package first
npm install n8n-nodes-withings-oauth2-credential2. Then install this node package
npm install n8n-nodes-withings
For Docker-based n8n installations:
Add both packages to your docker-compose.yml or Dockerfile
npm install n8n-nodes-withings-oauth2-credential n8n-nodes-withings
Or use the n8n-docker-custom approach.
Configuration
1. Create a developer account at Withings Developer
2. Register a new application to get your Client ID and Client Secret
3. Set the callback URL to: https://your-n8n-domain.com/rest/oauth2-credential/callback
4. In n8n, create a new credential of type “Withings OAuth2 API” (provided by the credential package)
5. Enter your Client ID and Client Secret
6. Configure the scopes as needed (default: user.info,user.metrics,user.activity,user.sleepevents)
7. Click “Connect my account” and complete the OAuth2 flow
Why Two Packages?
Withings uses a non-standard OAuth2 implementation that requires an additional action=requesttoken parameter in the token request body. N8n’s standard OAuth2 doesn’t support modifying the token request body, so we need a separate credential package that uses genericOAuth2Api with a custom authenticate() method to inject this parameter.
Usage
Once installed and configured, you can use the Withings API node in your workflows:
1. Add a “Withings API” node to your workflow
2. Select your Withings OAuth2 credential
3. Choose the resource (Activity, Measure, Sleep, or User)
4. Choose the operation (e.g., “Get” for sleep data)
5. Configure any additional parameters (date ranges, data fields, etc.)
Example Workflows
Get Sleep Data
Manual Trigger → Withings API (Sleep / Get) → Process Data
Configure the node:
– Start Date: 2025-01-01
– End Date: 2025-01-31
– Data Fields: hr, rr, snoring
Get Daily Activity Summary
Schedule Trigger → Withings API (Activity / Get Summary) → Store in Database
API Resources
Activity
Measure
Sleep
User
Troubleshooting
“Unable to sign without access token” Error
This usually means the OAuth2 flow didn’t complete successfully. Try:
1. Make sure you installed both packages (credential + node)
2. Delete and recreate your Withings OAuth2 credential
3. Click “Connect my account” again
4. Check the n8n logs for detailed error messages
Token Expired
Tokens automatically refresh. If you see token errors:
1. Reconnect your account in the credentials settings
2. Check that your Withings app credentials are still valid
Development
Clone the repository
git clone https://github.com/schimmmi/n8n-nodes-withings.gitInstall dependencies
npm installBuild
npm run buildWatch mode for development
npm run dev
Version History
See CHANGELOG.md for detailed version history.
Latest: v1.0.0
n8n-nodes-withings-oauth2-credential packageContributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
Links
Support
For issues, questions, or feature requests, please open an issue on GitHub.