N
n8n Store
Workflow Market
Unix Timestamp to ISO Date Converter

Unix Timestamp to ISO Date Converter

by ist00dent0 views

Description

Categories

⚙️ Automation

Nodes Used

n8n-nodes-base.setn8n-nodes-base.webhookn8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.respondToWebhook
PriceFree
Views0
Last Updated11/28/2025
workflow.json
{
  "id": "nbTOk6E6xwPG6iHB",
  "meta": {
    "instanceId": "1777696fb9fddfee653e70940936c2b1e28ba1f1bde53b7182fbd6eb01988706"
  },
  "name": "Unix Timestamp to ISO Date Converter",
  "tags": [],
  "nodes": [
    {
      "id": "9842c1bc-2ec3-467c-93d4-5ca7366b666a",
      "name": "Note: Webhook Input",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        -60
      ],
      "parameters": {
        "width": 300,
        "height": 320,
        "content": "This node listens for incoming POST requests. It expects a JSON body with a single property: 'timestamp' (a Unix timestamp in seconds, e.g., 1678886400 for March 15, 2023, 12:00:00 AM UTC)."
      },
      "typeVersion": 1
    },
    {
      "id": "424230de-0342-4d07-baae-8eece921d9b5",
      "name": "Note: Conversion Logic",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1060,
        -60
      ],
      "parameters": {
        "color": 2,
        "width": 300,
        "height": 320,
        "content": "This node takes the 'timestamp' from the webhook, multiplies it by 1000 (to convert seconds to milliseconds), and then converts it to an ISO 8601 formatted string (e.g., '2023-03-15T00:00:00.000Z'). This new string is added as 'convertedTime'."
      },
      "typeVersion": 1
    },
    {
      "id": "2a945204-1f21-48ed-baac-ac7f0c14424f",
      "name": "Note: Webhook Response",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1400,
        -60
      ],
      "parameters": {
        "color": 3,
        "width": 260,
        "height": 320,
        "content": "This node sends the 'convertedTime' back as the response to the original webhook caller. It's the final output of the workflow."
      },
      "typeVersion": 1
    },
    {
      "id": "fe220a53-89d9-4ab0-ab22-67604c27c413",
      "name": "Receive Timestamp Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        820,
        100
      ],
      "webhookId": "convert-timestamp-webhook",
      "parameters": {
        "path": "convert-timestamp",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "a7d7236a-1ee4-4432-bbd6-714f69c7049b",
      "name": "Convert to ISO 8601",
      "type": "n8n-nodes-base.set",
      "position": [
        1160,
        100
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a5991bc4-428d-4f2e-8c94-8943d90eac3d",
              "name": "convertedTime",
              "type": "string",
              "value": "={{ new Date($json.body.timestamp * 1000).toISOString() }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "08ebbb83-e4b0-41c2-9390-3a03b31f5396",
      "name": "Respond with Converted Time",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1480,
        100
      ],
      "parameters": {
        "options": {},
        "respondWith": "allIncomingItems"
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "69561b33-8bab-4460-aaa8-0b092d45bf04",
  "connections": {
    "Convert to ISO 8601": {
      "main": [
        [
          {
            "node": "Respond with Converted Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Timestamp Webhook": {
      "main": [
        [
          {
            "node": "Convert to ISO 8601",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

相关工作流