0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

Calculate → Calculate BMI

AI-generated

Overview

The node provides a utility to calculate the Body Mass Index (BMI) based on user-provided height and weight values. This is useful in health, fitness, or wellness workflows where BMI is used as an indicator of body fat and general health status. For example, it can be integrated into a health app workflow to automatically compute BMI from user inputs or data records.

Properties

Name Meaning
Height (Cm) The height of the person in centimeters. Example: 175
Weight (Kg) The weight of the person in kilograms. Example: 70

Output

The output JSON contains the result of the BMI calculation. Typically, this would include the calculated BMI value based on the formula:

BMI = weight (kg) / (height (m))^2

where height in centimeters is converted to meters before calculation.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authentication with the external service at https://prod.0codekit.com.
  • The node sends a POST request to the endpoint /calculate/bmi with the height and weight parameters in the request body.
  • Proper configuration of the API key credential in n8n is necessary for successful execution.

Troubleshooting

  • Common issues:

    • Missing or invalid API key credential will cause authentication failures.
    • Providing zero or negative values for height or weight may lead to incorrect or error responses.
    • Network connectivity issues can prevent reaching the external API endpoint.
  • Error messages:

    • Authentication errors typically indicate missing or invalid API credentials.
    • Validation errors may occur if required parameters are missing or out of expected range.
  • Resolutions:

    • Ensure the API key credential is correctly set up and active.
    • Validate input values before execution to ensure they are positive numbers.
    • Check network connectivity and endpoint availability.

Links and References

  • No direct links provided in the source code.
  • For more information about BMI calculation, see: WHO BMI Classification

Discussion