Overview
This node integrates with the MyFitnessPal API to manage exercise entries in a user's fitness diary. Specifically, the "Add Exercise" operation allows users to add a new exercise activity by specifying its name, duration, and calories burned. This is useful for tracking physical activities and their impact on daily calorie expenditure.
Common scenarios include:
- Logging a workout session such as running, cycling, or swimming.
- Adding custom exercises not automatically tracked by other devices.
- Keeping a detailed record of exercise activities for health monitoring or fitness goals.
Example: A user completes a 45-minute running session burning approximately 400 calories and wants to log this into their MyFitnessPal diary via n8n automation.
Properties
| Name | Meaning |
|---|---|
| Exercise Name | Name of the exercise activity (e.g., Running, Cycling). |
| Duration | Duration of the exercise in minutes (numeric value). |
| Calories Burned | Number of calories burned during the exercise (numeric value). |
Output
The node outputs an array of JSON objects representing the response from the MyFitnessPal API after adding the exercise entry. The structure typically includes details about the newly added exercise record, such as its ID, name, duration, calories burned, and timestamps.
If the API returns binary data (not indicated here), it would represent related media or attachments, but this node focuses on JSON responses only.
Dependencies
- Requires an active connection to the MyFitnessPal API using an API key or authentication token configured in n8n credentials.
- Network access to
https://api.myfitnesspal.com/v2endpoint. - Properly configured credential in n8n for authenticating requests to MyFitnessPal.
Troubleshooting
- Authentication errors: Ensure the API key or authentication token is valid and has necessary permissions.
- Invalid input values: Check that required fields like Exercise Name, Duration, and Calories Burned are provided and correctly formatted.
- API rate limits: Frequent requests may be throttled; consider adding delays or handling retries.
- Network issues: Verify internet connectivity and that the MyFitnessPal API service is reachable.
- Error messages from API: The node returns error messages in the output JSON if continueOnFail is enabled; otherwise, execution stops on errors.
Links and References
- MyFitnessPal API Documentation (official API docs, if publicly available)
- n8n Documentation - for configuring credentials and using HTTP request nodes.