Timezone Conversion Microservice using TimeZoneDB API - n8n Workflow

Deploy a secure, custom timezone conversion API endpoint using this n8n workflow. It leverages the TimeZoneDB API to convert Unix timestamps between specified zones instantly.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Developers who require a lightweight, reliable microservice for time zone conversions.
System administrators or integration specialists needing to normalize timestamps for global reporting.
Users exploring advanced n8n templates for secure external API integration.
Automation enthusiasts seeking practical examples of an n8n node utilizing HTTP query authentication.

Overview

Managing time differences across global operations can be complex. This automation solves the problem by providing a dedicated, instant API endpoint for converting Unix timestamps between two specified time zones (e.g., America/New_York to Europe/London). This robust n8n workflow ensures high efficiency and, critically, maintains security. The TimeZoneDB API key is handled via secure n8n credentials, meaning sensitive data is never exposed in the webhook URL or workflow body. By using this n8n template, you gain a reusable and easily deployable tool for any system requiring dynamic time conversion.

How it Works

The process begins with the Receive Time Conversion Request n8n trigger. This webhook listens for an incoming POST request containing three crucial pieces of data: the source time zone (fromZone), the target time zone (toZone), and the Unix timestamp (time). Once the n8n node receives the data, it passes the payload to the Convert Timezone (TimeZoneDB) n8n node. This HTTP Request n8n node securely constructs the TimeZoneDB API URL using the received data points as query parameters. The API call securely passes the necessary credentials via n8n's credential system. The TimeZoneDB API returns the converted time and relevant zone information. Finally, the Respond with Converted Time n8n node takes the data received from the TimeZoneDB API and sends it back immediately to the original caller, completing the real-time request and response cycle inherent in this useful n8n workflow.

Installation Guide


  1. Import the n8n Workflow: Copy the provided JSON data and import it directly into your self-hosted or cloud n8n instance using the 'New' -> 'Import from JSON' feature.

  2. Set Up TimeZoneDB Credentials: You must obtain an API key from TimeZoneDB. In n8n, navigate to Credentials and create a new credential of type 'HTTP Query Auth'. Name it 'TimeZoneDB API' (matching the name used in the workflow JSON). Set the parameter name to 'key' and the value to your TimeZoneDB API key.

  3. Activate the n8n Trigger: Find the 'Receive Time Conversion Request' n8n node, copy the generated test webhook URL, and ensure the n8n workflow is activated so the trigger can start listening for POST requests.

  4. Testing: Send a POST request to the webhook URL with a JSON body containing fromZone (IANA format), toZone (IANA format), and time (Unix timestamp in seconds).

Node Details

Receive Time Conversion Request (Webhook Trigger): The starting n8n trigger for this automation. It is configured to listen for HTTP POST requests at the /convert-timezone path, expecting a JSON body containing fromZone, toZone, and time data points.
Convert Timezone (TimeZoneDB) (HTTP Request Node): This central n8n node performs the core logic. It dynamically builds the API URL for TimeZoneDB, injecting webhook data using expressions like {{$json.body.fromZone}}. Crucially, it uses the 'HTTP Query Auth' generic credential type to securely include the TimeZoneDB API key as a query parameter, ensuring the security of this n8n workflow.


  • Respond with Converted Time (Respond to Webhook Node): This final n8n node ensures a clean, immediate response. It takes the output from the TimeZoneDB API call and forwards the entire response body back to the application or service that initiated the n8n trigger.

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*