Real-Time Currency Conversion API Endpoint using Webhooks - n8n Workflow

Use this custom n8n workflow to create a private API endpoint for real-time currency conversion using ExchangeRate.host. Securely handle credentials and deploy fast, reliable conversion services.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Developers needing a quick, serverless microservice for financial calculations.
Business analysts automating pricing or invoicing based on current exchange rates.
n8n users looking for advanced examples of dynamic HTTP requests and webhook responses.
Anyone seeking a secure way to manage external API keys within an n8n workflow.

Overview

This n8n workflow provides a solution for integrating dynamic, up-to-the-minute currency exchange rates into any application without requiring complex server setup. By utilizing an n8n trigger webhook, you instantly create a custom API endpoint. The primary value lies in its security and ease of use: it accepts required conversion parameters (source currency, target currency, and amount) via the webhook body, fetches the conversion data from ExchangeRate.host using a dedicated n8n node, and immediately responds to the caller. This ensures sensitive API keys are stored securely within your n8n environment and never exposed in external calls.

How it Works

The entire automation begins with the Receive Conversion Request Webhook n8n trigger. This n8n trigger listens for an incoming POST request at the specified path (/convert-currency). It is configured to expect a JSON body containing from, to, and amount parameters.

Once triggered, the data passes to the Convert Currency n8n node. This crucial n8n node executes a GET request to the ExchangeRate.host API. The URL for this request is dynamically constructed using expressions that pull the from, to, and amount values directly from the incoming webhook payload. Furthermore, this n8n node utilizes n8n's secure credential system (HTTP Query Auth) to automatically append the required access_key to the API request URL, ensuring security.

Finally, the API response (which contains the converted value) is forwarded to the Respond with Converted Amount n8n node. This n8n node immediately sends the result back to the original external system that called the n8n workflow webhook, completing the microservice action in real-time.

Installation Guide


  1. Import the n8n template: Copy the provided JSON and import it into your n8n instance via the 'Workflows' menu.

  2. Set up ExchangeRate.host Credentials: This n8n workflow requires credentials for the ExchangeRate.host API.

Go to 'Credentials' in your n8n interface.
Create a new credential of type 'HTTP Query Auth'.
Name it 'ExchangeRate' (or match the name configured in the workflow JSON).
Set the Key field to access_key.
* Set the Value field to your actual API key obtained from ExchangeRate.host.

  1. Activate the n8n workflow: Save the changes and toggle the workflow to 'Active'.

  2. Identify the Webhook URL: Click the Receive Conversion Request Webhook n8n node to find the full test or production webhook URL required for integration.

Node Details

Receive Conversion Request Webhook

Function: Acts as the primary n8n trigger, initiating the real-time currency conversion request.
Key Configuration: Method is set to POST. Path is /convert-currency. Response mode is set to Response Node, indicating the final response is handled downstream.

Convert Currency (HTTP Request)

Function: Connects to the ExchangeRate.host conversion endpoint, performing the core calculation.
Key Configuration:
URL: Uses n8n expressions to dynamically construct the URL based on webhook input: https://api.exchangerate.host/convert?from={{ $json.body.from }}&to={{ $json.body.to }}&amount={{ $json.body.amount }}.
Authentication: Uses HTTP Query Auth credentials (named 'ExchangeRate') to securely pass the required access_key for the API.

Respond with Converted Amount (Respond to Webhook)

Function: Takes the API result from the previous n8n node and sends it back instantly to the service that called the webhook.
Key Configuration: Respond With is set to All Incoming Items, ensuring the full JSON response from the currency API is returned.

Related n8n Workflows

Free

Nodes: 4 Nodes
Updated: December 26 2025
View all
Created by
ist00dent
ist00dent

I’m a dedicated automation engineer passionate about no-code and low-code solutions. I design and implement robust n8n workflows—integrating APIs, databases, and messaging—to eliminate manual tasks and accelerate delivery. Leveraging Python and C#, I build scalable, adaptable automations that empower teams to focus on high-value work.

Featured*