Actions91
- Account Setting Actions
- Addon Actions
- Ceiling Actions
- Company Info Actions
- Device Actions
- Exercise Actions
- Feedback Actions
- File Actions
- File Type Actions
- Gender Actions
- Guest Actions
- License Actions
- Log Actions
- Payment Actions
- Permission Actions
- Relationship Actions
- Role Actions
- Service Actions
- Service Price Actions
- Social Actions
- Topic Actions
- User Actions
- Workout Execution Actions
- Worksheet Actions
Overview
The "Worksheet - Create" operation in this node allows users to create a new workout worksheet within the GymControl system. This worksheet is a structured plan that links a coach, an athlete, and a series of workouts composed of various exercises. It is useful for fitness coaches or gym managers who want to program detailed training plans for athletes, including different types of exercises with specific parameters such as weight, sets, reps, rest time, and notes.
Practical examples include:
- A coach creating a personalized weekly workout plan for an athlete.
- Automating the creation of standardized worksheets for groups of athletes.
- Integrating with other systems to dynamically generate workout plans based on athlete progress or goals.
Properties
| Name | Meaning |
|---|---|
| Show Complete Response | Boolean flag to determine if the full API response should be returned by the node. |
| Use JSON | Boolean flag indicating whether to provide the worksheet data as raw JSON or through structured fields. |
| JSON | The raw JSON object representing the worksheet data. Required if "Use JSON" is true. |
| Worksheet | Structured input for worksheet details when "Use JSON" is false. Contains: |
| Name | The name/title of the worksheet. |
| Coach | The coach assigned to the worksheet. Can be selected by ID or from a searchable list of coaches. |
| Athlete | The athlete assigned to the worksheet. Can be selected by ID or from a searchable list of athletes. |
| Workouts | A collection of workouts included in the worksheet. Each workout includes: |
| Name | The name of the workout. |
| Exercises | A collection of exercises within the workout. Exercises can be of four types: single, combinated, timed, or custom. Each exercise includes: |
| Exercise | The exercise selected by ID or from a searchable list. |
| Type | Hidden field indicating the exercise type (single, combinated, timed, custom). |
| Weight | Weight used in the exercise (string). |
| Sets | Number of sets (minimum 1). |
| Reps | Number of repetitions per set (minimum 1). |
| Rest | Rest time between sets in seconds (minimum 1). |
| Coach Notes | Optional notes from the coach about the exercise. |
| Combinated Exercise | For combinated exercises only: an additional exercise selected by ID or from a list. |
| Combinated Reps | For combinated exercises only: number of combined reps (minimum 1). |
| Time | For timed exercises only: duration in seconds (minimum 1). |
| Instructions | For custom exercises only: instructions text describing the exercise. |
Output
The node outputs a JSON object representing the created worksheet as returned by the GymControl API. This typically includes all the details of the newly created worksheet such as its unique identifier, associated coach and athlete IDs, workouts, exercises, and any metadata provided by the API.
If the "Show Complete Response" option is enabled, the node returns the full API response including HTTP status and headers; otherwise, it returns just the parsed JSON body.
The node does not output binary data.
Dependencies
- Requires an API key credential for authenticating requests to the GymControl API.
- The base URL for the GymControl instance must be configured in the credentials.
- The node uses HTTP requests to communicate with the GymControl REST API endpoints.
- Searchable lists for coaches, athletes, exercises, etc., rely on API calls to fetch relevant data.
Troubleshooting
- Authentication errors: Ensure the API key credential is valid and has sufficient permissions.
- Invalid input data: When using structured inputs, all required fields (e.g., worksheet name, coach, athlete, workouts, exercises) must be provided and correctly formatted.
- Minimum values: Sets, reps, rest, and time fields have minimum values (usually 1); providing zero or negative numbers will likely cause errors.
- Resource not found: Selecting invalid IDs for coaches, athletes, or exercises may result in "not found" errors.
- API connectivity issues: Verify network access to the GymControl API endpoint and correct base URL configuration.
- JSON parsing errors: If using the raw JSON input mode, ensure the JSON is well-formed and matches the expected schema.
Links and References
- GymControl API Documentation (hypothetical link)
- n8n documentation on Creating Custom Nodes
- General REST API usage in n8n: HTTP Request Node