Currency converter via webhook using ExchangeRate.host
This n8n template allows you to perform real-time currency conversions by simply sending a webhook request. By integrating with the ExchangeRate.host API, you can get up-to-date exchange rates for over 170 world currencies, making it an incredibly useful tool for financial tracking, e-commerce, international business, and personal budgeting.
๐ง How it works
-
Receive Conversion Request Webhook: This node acts as the entry point for the workflow, listening for incoming POST requests. It's configured to expect a JSON body containing:
- from: The 3-letter ISO 4217 currency code for the source currency (e.g., USD, PHP).
- to: The 3-letter ISO 4217 currency code for the target currency (e.g., EUR, JPY).
- amount: The numeric value you want to convert.
Important: The ExchangeRate.host API access_key is handled securely by n8n's credential system and should not be included in the webhook body or headers.
-
Convert Currency: This node makes an HTTP GET request to the ExchangeRate.host API (api.exchangerate.host). It dynamically constructs the URL using the from, to, and amount from the webhook body. Your API access key is securely retrieved from n8n's pre-configured credentials (HTTP Query Auth type) and automatically added as a query parameter (access_key). The API then performs the conversion and returns a JSON object with the conversion details.
-
Respond with Converted Amount: This node sends the full currency conversion result received from ExchangeRate.host back to the service that initiated the webhook.
๐ค Who is it for?
This workflow is ideal for:
- E-commerce Platforms:
- Display prices in local currencies on the fly for international customers.
- Convert incoming international payments to your local currency for accounting.
- Calculate shipping costs in different currencies.
- Financial Tracking & Budgeting Apps:
- Update personal or business budgets with converted values.
- Track expenses incurred in foreign currencies.
- Automate portfolio value conversion for multi-currency investments.
- International Business & Freelancers:
- Generate invoices in a client's local currency based on your preferred currency.
- Quickly estimate project costs or earnings in different currencies.
- Automate reconciliation of international transactions.
- Travel Planning:
- Convert travel expenses from one currency to another while abroad.
- Build simple tools to estimate costs for trips in different countries.
- Data Analysis & Reporting:
- Standardize financial data from various sources into a single currency for unified reporting.
- Build dashboards that display converted financial metrics.
- Custom Integrations:
- Connect to CRMs, accounting software, or internal tools to automate currency-related tasks.
- Build chatbots that can answer currency conversion queries.
๐ Data Structure
When you trigger the webhook, send a POST request with a JSON body structured as follows:
{
"from": "USD",
"to": "PHP",
"amount": 100
}
The workflow will return a JSON response similar to this (results will vary based on currencies and amount):
{
"date": "2025-06-03",
"historical": false,
"info": {
"rate": 58.749501,
"timestamp": 1717398188
},
"query": {
"amount": 100,
"from": "USD",
"to": "PHP"
},
"result": 5874.9501,
"success": true
}
โ๏ธ Setup Instructions
-
Get an ExchangeRate.host Access Key:
- Go to https://exchangerate.host/ and sign up for a free API key.
-
Create an n8n Credential for ExchangeRate.host:
- In your n8n instance, go to Credentials.
- Click "New Credential" and search for "HTTP Query Auth".
- Set the Name (e.g., ExchangeRate.host API Key).
- Set API Key to your ExchangeRate.host access key.
- Set Parameter Name to access_key.
- Set Parameter Position to Query.
- Save the credential.
-
Import Workflow:
- In your n8n editor, click "Import from JSON" and paste the provided workflow JSON.
-
Configure ExchangeRate.host API Node:
- Double-click the Convert Currency node.
- Under "Authentication", select "Generic Credential Type".
- Choose "HTTP Query Auth" as the Generic Auth Type.
- Select the credential you created (e.g., "ExchangeRate.host API Key") from the dropdown.
-
Configure Webhook Path:
- Double-click the Receive Conversion Request Webhook node.
- In the 'Path' field, set a unique and descriptive path (e.g., /convert-currency).
-
Activate Workflow:
- Save and activate the workflow.
๐ Tips
This workflow is a powerful starting point. Here's how you can make it even more robust and integrated:
-
Robust Error Handling:
- Add an IF node after Convert Currency to check {{ $json.success }}. If false, branch to an Error Trigger node or send an alert (e.g., Slack, Email) with {{ $json.error.info }} to notify you of API issues or invalid inputs.
- Include a Try/Catch block to gracefully handle network issues or malformed responses.
-
Input Validation & Defaults:
- Add a Function node after the webhook to validate if from, to, and amount are present and in the correct format. If not, return a clear error message to the user.
- Set default from or to currencies if they are not provided in the webhook, making the API more flexible.
-
Logging & Auditing:
- After a successful conversion, use a Google Sheets, Airtable, or database node (e.g., PostgreSQL, MongoDB) to log every conversion request, including the input currencies, amount, converted result, date, and possibly the calling IP (from the webhook headers). This is crucial for financial auditing and analysis.
-
Rate Limits & Caching:
- If you anticipate many requests, be mindful of ExchangeRate.host's API rate limits. You can introduce a Cache node to store recent conversion results for a short period, reducing redundant API calls for common conversions.
- Alternatively, add a Delay node to space out requests if you're hitting limits.
-
Format & Rounding:
- Use a Function node or Set node to format the result to a specific number of decimal places (e.g., {{ $json.result.toFixed(2) }}).
- Add currency symbols or full currency names to the output for better readability.
-
Alerting on Significant Changes:
- Chain this workflow with a Cron or Schedule node to periodically fetch exchange rates for a pair you care about (e.g., USD to EUR).
- Use an IF node to compare the current rate with a previously stored rate. If the change exceeds a certain percentage, send an alert via Slack, Email, or Telegram to notify you of significant market shifts.
-
Integration with Payment Gateways:
- For e-commerce, combine this with nodes for payment gateways (e.g., Stripe, PayPal) to automatically convert customer payments received in foreign currencies to your base currency before recording.
-
Multi-currency Pricing for Products:
- Use this workflow in conjunction with your product database. When a user selects a different country/currency, trigger this webhook to dynamically convert product prices and display them instantly.
Currency Converter via Webhook using ExchangeRate.host
This n8n workflow provides a simple API endpoint to convert currencies using the ExchangeRate.host service. It allows you to trigger a currency conversion by making an HTTP request and receive the conversion result directly in the response.
What it does
- Listens for a Webhook: The workflow starts by listening for incoming HTTP POST requests at a specific URL.
- Makes an API Request: Upon receiving a request, it makes an HTTP GET request to the ExchangeRate.host API.
- The API call is configured to fetch the latest exchange rates.
- It expects
from,to, andamountparameters in the incoming webhook request body to perform the conversion.
- Responds to the Webhook: After successfully getting the exchange rate data, it formats the conversion result and sends it back as the response to the original webhook call.
Prerequisites/Requirements
- n8n Instance: A running n8n instance to host this workflow.
- ExchangeRate.host: While the workflow uses ExchangeRate.host, it typically does not require an API key for basic usage. However, for higher rate limits or specific features, you might need to register and obtain one. (This workflow does not explicitly configure an API key, assuming free tier usage).
Setup/Usage
- Import the Workflow:
- Copy the provided JSON code.
- In your n8n instance, go to "Workflows".
- Click "New" or "Import from JSON" and paste the workflow JSON.
- Activate the Workflow: Ensure the workflow is activated (toggle switch in the top right).
- Get Webhook URL:
- The "Webhook" node (
id: 47) will display a unique URL once the workflow is saved and active. Copy this URL.
- The "Webhook" node (
- Make a Request:
- Send an HTTP POST request to the copied Webhook URL.
- The request body should be a JSON object containing
from,to, andamountparameters. - Example Request Body:
{ "from": "USD", "to": "EUR", "amount": 100 } - Example cURL Command:
curl -X POST \ YOUR_WEBHOOK_URL \ -H 'Content-Type: application/json' \ -d '{ "from": "USD", "to": "EUR", "amount": 100 }'
- Receive Response: The workflow will respond with the converted amount.
- Example Response:
{ "from": "USD", "to": "EUR", "amount": 100, "converted_amount": 92.50, "rate": 0.925 }
Respond to Webhooknode's configuration and the data returned by ExchangeRate.host) - Example Response:
Related Templates
Auto-create TikTok videos with VEED.io AI avatars, ElevenLabs & GPT-4
๐ฅ Viral TikTok Video Machine: Auto-Create Videos with Your AI Avatar --- ๐ฏ Who is this for? This workflow is for content creators, marketers, and agencies who want to use Veed.ioโs AI avatar technology to produce short, engaging TikTok videos automatically. Itโs ideal for creators who want to appear on camera without recording themselves, and for teams managing multiple brands who need to generate videos at scale. --- โ๏ธ What problem this workflow solves Manually creating videos for TikTok can take hours โ finding trends, writing scripts, recording, and editing. By combining Veed.io, ElevenLabs, and GPT-4, this workflow transforms a simple Telegram input into a ready-to-post TikTok video featuring your AI avatar powered by Veed.io โ speaking naturally with your cloned voice. --- ๐ What this workflow does This automation links Veed.ioโs video-generation API with multiple AI tools: Analyzes TikTok trends via Perplexity AI Writes a 10-second viral script using GPT-4 Generates your voiceover via ElevenLabs Uses Veed.io (Fabric 1.0 via FAL.ai) to animate your avatar and sync the lips to the voice Creates an engaging caption + hashtags for TikTok virality Publishes the video automatically via Blotato TikTok API Logs all results to Google Sheets for tracking --- ๐งฉ Setup Telegram Bot Create your bot via @BotFather Configure it as the trigger for sending your photo and theme Connect Veed.io Create an account on Veed.io Get your FAL.ai API key (Veed Fabric 1.0 model) Use HTTPS image/audio URLs compatible with Veed Fabric Other APIs Add Perplexity, ElevenLabs, and Blotato TikTok keys Connect your Google Sheet for logging results --- ๐ ๏ธ How to customize this workflow Change your Avatar: Upload a new image through Telegram, and Veed.io will generate a new talking version automatically. Modify the Script Style: Adjust the GPT prompt for tone (educational, funny, storytelling). Adjust Voice Tone: Tweak ElevenLabs stability and similarity settings. Expand Platforms: Add Instagram, YouTube Shorts, or X (Twitter) posting nodes. Track Performance: Customize your Google Sheet to measure your most successful Veed.io-based videos. --- ๐ง Expected Outcome In just a few seconds after sending your photo and theme, this workflow โ powered by Veed.io โ creates a fully automated TikTok video featuring your AI avatar with natural lip-sync and voice. The result is a continuous stream of viral short videos, made without cameras, editing, or effort. --- โ Import the JSON file in n8n, add your API keys (including Veed.io via FAL.ai), and start generating viral TikTok videos starring your AI avatar today! ๐ฅ Watch This Tutorial --- ๐ Documentation: Notion Guide Need help customizing? Contact me for consulting and support : Linkedin / Youtube
Track competitor SEO keywords with Decodo + GPT-4.1-mini + Google Sheets
This workflow automates competitor keyword research using OpenAI LLM and Decodo for intelligent web scraping. Who this is for SEO specialists, content strategists, and growth marketers who want to automate keyword research and competitive intelligence. Marketing analysts managing multiple clients or websites who need consistent SEO tracking without manual data pulls. Agencies or automation engineers using Google Sheets as an SEO data dashboard for keyword monitoring and reporting. What problem this workflow solves Tracking competitor keywords manually is slow and inconsistent. Most SEO tools provide limited API access or lack contextual keyword analysis. This workflow solves that by: Automatically scraping any competitorโs webpage with Decodo. Using OpenAI GPT-4.1-mini to interpret keyword intent, density, and semantic focus. Storing structured keyword insights directly in Google Sheets for ongoing tracking and trend analysis. What this workflow does Trigger โ Manually start the workflow or schedule it to run periodically. Input Setup โ Define the website URL and target country (e.g., https://dev.to, france). Data Scraping (Decodo) โ Fetch competitor web content and metadata. Keyword Analysis (OpenAI GPT-4.1-mini) Extract primary and secondary keywords. Identify focus topics and semantic entities. Generate a keyword density summary and SEO strength score. Recommend optimization and internal linking opportunities. Data Structuring โ Clean and convert GPT output into JSON format. Data Storage (Google Sheets) โ Append structured keyword data to a Google Sheet for long-term tracking. Setup Prerequisites If you are new to Decode, please signup on this link visit.decodo.com n8n account with workflow editor access Decodo API credentials OpenAI API key Google Sheets account connected via OAuth2 Make sure to install the Decodo Community node. Create a Google Sheet Add columns for: primarykeywords, seostrengthscore, keyworddensity_summary, etc. Share with your n8n Google account. Connect Credentials Add credentials for: Decodo API credentials - You need to register, login and obtain the Basic Authentication Token via Decodo Dashboard OpenAI API (for GPT-4o-mini) Google Sheets OAuth2 Configure Input Fields Edit the โSet Input Fieldsโ node to set your target site and region. Run the Workflow Click Execute Workflow in n8n. View structured results in your connected Google Sheet. How to customize this workflow Track Multiple Competitors โ Use a Google Sheet or CSV list of URLs; loop through them using the Split In Batches node. Add Language Detection โ Add a Gemini or GPT node before keyword analysis to detect content language and adjust prompts. Enhance the SEO Report โ Expand the GPT prompt to include backlink insights, metadata optimization, or readability checks. Integrate Visualization โ Connect your Google Sheet to Looker Studio for SEO performance dashboards. Schedule Auto-Runs โ Use the Cron Node to run weekly or monthly for competitor keyword refreshes. Summary This workflow automates competitor keyword research using: Decodo for intelligent web scraping OpenAI GPT-4.1-mini for keyword and SEO analysis Google Sheets for live tracking and reporting Itโs a complete AI-powered SEO intelligence pipeline ideal for teams that want actionable insights on keyword gaps, optimization opportunities, and content focus trends, without relying on expensive SEO SaaS tools.
Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax
Spark your creativity instantly in any chatโturn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. ๐ What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing ๐ง Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation ๐ Required Credentials OpenAI API Setup Go to platform.openai.com โ API keys (sidebar) Click "Create new secret key" โ Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai โ Dashboard โ API Keys Generate a new API key โ Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) โ๏ธ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflowโchat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" ๐ฏ Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration โ ๏ธ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions