0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

Convert → Convert Currency

AI-generated

Overview

The "Convert Currency" operation of the 0CodeKit node provides a utility to convert a specified amount from one currency to another. This is useful in scenarios where workflows need to handle financial data across different currencies, such as e-commerce platforms, accounting automation, or financial reporting systems. For example, you could use this node to convert an invoice total from USD to EUR before sending it to a European client, or to update product prices dynamically based on current exchange rates.

Properties

Name Meaning
Amount The numeric amount of money to convert from the source currency to the target currency.
From Currency The source currency code (e.g., USD, EUR) representing the currency of the input amount.
To Currency The target currency code (e.g., USD, EUR) representing the currency to convert to.
Date Optional date string (format: YYYY-MM-DD) specifying the date for the conversion rate. If left empty, the current rate is used.

The "From Currency" and "To Currency" properties support a wide range of global currency codes, including but not limited to USD, EUR, GBP, JPY, AUD, CAD, CHF, and many others.

Output

The node outputs JSON data containing the result of the currency conversion. The output includes the converted amount based on the specified parameters and the exchange rate valid for the given date or the current date if none is provided.

If the node supports binary data output, it is not indicated here; thus, the output is purely JSON with conversion results.

Dependencies

  • Requires an API key credential for the 0CodeKit service.
  • The node makes a POST request to the /convert/currency endpoint of the 0CodeKit API.
  • Network connectivity to https://prod.0codekit.com is necessary.
  • No additional environment variables are explicitly required beyond the API authentication.

Troubleshooting

  • Common Issues:

    • Invalid or missing API key credential will cause authentication failures.
    • Providing unsupported or incorrect currency codes may result in errors or no conversion.
    • Incorrectly formatted date strings can lead to request failures.
    • Network issues or API downtime can prevent successful conversion.
  • Error Messages:

    • Authentication errors typically indicate invalid or missing API credentials.
    • Validation errors may mention unsupported currencies or invalid amounts.
    • Date format errors suggest the date must be in YYYY-MM-DD format or left empty.
  • Resolutions:

    • Ensure the API key credential is correctly configured in n8n.
    • Verify currency codes against the supported list.
    • Use ISO date format for the date property or leave it blank for the latest rate.
    • Check network connectivity and retry if transient errors occur.

Links and References

Discussion