1. Opening Problem Statement ⚙️
Meet Alex, a freelance finance analyst who handles multiple client projects involving international invoicing and budgeting. Every morning, Alex spends about 30 minutes manually checking exchange rates from various websites, copying the data, and updating his Google Sheets tracking documents. This repetitive task is error-prone and costly — mistakes in conversion rates can lead to invoicing errors, delayed payments, and lost client trust. Alex’s time could be better spent analyzing data instead of chasing exchange rate updates.
This exact scenario is what this n8n workflow solves by automating real-time exchange rate data retrieval and updating it directly in Google Sheets, saving Alex hours of tedious work and ensuring accuracy.
2. What This Automation Does
This automation fetches the latest USD exchange rates every day at 08:00 AM and updates two Google Sheets tabs: one for live rate updates and the other for archiving historical data. Here’s what happens when this workflow runs:
- Triggers automatically at 08:00 AM to run daily without manual intervention.
- Makes an HTTP API call to ExchangeRate-API to pull the latest USD to all currency rates.
- Processes and formats the data, including human-friendly update timestamps.
- Updates a “live” Google Sheet with current exchange rates reflecting the latest data.
- Appends a historical record of the rates into an archive sheet for future reference and trend analysis.
- Eliminates manual entry errors and saves approximately 15-30 minutes each morning.
3. Prerequisites ⚙️
- n8n Account – Either cloud or self-hosted. (For self-hosting, Hostinger is a good option: Hostinger Hosting)
- ExchangeRate-API account for free API key access.
- Google Sheets account with API credentials setup to read/write spreadsheets.
- Basic knowledge of n8n workflow creation and credential setup.
4. Step-by-Step Guide 🛠️
Step 1: Set Up Scheduled Trigger
Go to n8n’s dashboard, click + Add Node, select Schedule Trigger. Configure it to trigger daily at 08:00 AM (08:00 UTC) by setting the hour to 7 (accounting for timezone offset if needed). This starts the workflow every morning automatically.
Expected outcome: The workflow begins running daily without manual start.
Common mistake: Setting the wrong hour and expecting local time instead of UTC, causing timing discrepancy.
Step 2: Configure HTTP Request to ExchangeRate-API
Add an HTTP Request node, select GET method, and set URL to:
https://v6.exchangerate-api.com/v6/
Replace with your actual ExchangeRate-API key.
Expected outcome: The node fetches JSON with USD exchange rates to many currencies.
Common mistake: Forgetting to replace the API key placeholder resulting in errors.
Step 3: Format Output to JSON Using Code Node
Add a Code node next. Paste following JavaScript to extract conversion rates:
const rates = items[0].json.conversion_rates;
return [
{
json: rates
}
];
>This strips unnecessary data, preparing it for Google Sheets update.
Expected outcome: Clear JSON object of currency rates for next nodes.
Step 4: Filter and Format Fields
Add a Set node named “Filter Fields” to create two new fields:
base_currencyfrombase_code, set to “USD” in this case.time_last_update_utcformatted to a readable date and time string like “May 8, 2024 at 08:00 UTC” using JavaScript.
Expected outcome: Its outputs include useful metadata for Google Sheets.
Step 5: Merge Data Streams
Add a Merge node (mode: combine by SQL) that combines outputs from two prior processing streams. This enables flexible handling and sending to multiple sheets simultaneously.
Expected outcome: All necessary data unified for the Google Sheets nodes.
Step 6: Update Live Exchange Rate Sheet
Configure a Google Sheets node named “Update Rate Sheet” to update an existing row where column base_currency matches “USD”. The node maps all currency rates to respective columns in the sheet, such as “USD”, “EUR”, “GBP” etc.
You must select your target Google Sheets document and sheet (likely “gid=0” or main sheet tab).
Expected outcome: The live sheet automatically reflects the latest currency conversions each run.
Step 7: Archive Rates for History
Add another Google Sheets node labeled “Archive Rates” to append the same rate data as a new row in a dedicated “Archives” sheet within the same document for keeping historical records.
Configure the document ID and sheet name (like “Archives”) accordingly.
Expected outcome: You maintain a timestamped log of all past exchange rates for reporting or trend analysis.
5. Customizations ✏️
- Add More Currency Base Options: In the HTTP Request node, change the URL base currency (USD) to any other supported currency like EUR or GBP by altering the path
/latest/USDto/latest/EUR. This will then update sheets with different base rates. - Change Update Time: In the Schedule Trigger node, adjust the trigger hour to match your preferred time zone or frequency, like multiple times a day.
- Add Notification on Update: Add a Slack or email node after the Google Sheets updates to notify you when the sheet refreshes successfully.
- Expand Archiving: Modify the Archive Rates Google Sheets node to include additional metadata such as request ID or response time for diagnostics.
6. Troubleshooting 🔧
Problem: “HTTP Request failed with status 403 or 401”
Cause: Invalid or expired API key for ExchangeRate-API.
Solution: Double-check and update your API key in the HTTP Request node URL. Test the API endpoint directly in a browser or Postman to verify.
Problem: “Google Sheets operation fails with permission error”
Cause: Google Sheets API credentials invalid or lacking correct permissions.
Solution: Re-authenticate the Google Sheet node credentials ensuring proper scopes (read/write) and that the target sheet is shared or owned by the authenticated Google account.
7. Pre-Production Checklist ✅
- Test manual trigger to validate API response and JSON parsing.
- Verify Google Sheets nodes update and append data correctly.
- Ensure the scheduled trigger matches your timezone intentions.
- Back up existing Google Sheets data before first run to avoid accidental overwrite.
8. Deployment Guide
Activate the workflow by switching it on in n8n. Make sure your credentials for ExchangeRate-API and Google Sheets are current and valid. Monitor runs through the n8n execution logs daily initially to confirm success.
10. Conclusion
You have now automated fetching, formatting, updating, and archiving of USD exchange rates in Google Sheets with n8n. Alex and others saving 30 minutes daily now can focus on higher-value analysis rather than manual update tasks. Consider expanding this workflow to multiple base currencies or incorporate notifications to build your financial automation ecosystem further.