OpenAI LangChain Integration with Custom Code

7a90ca21-9861-4162-9abd-fb94796f3b8e

Latency
9607ms
Cost
$0.0027
Tokens
1,077
Status
success
gemini-3-flash-preview

Workflow Graph

Trace

[
  {
    "data": {
      "nodeType": "integration"
    },
    "event": "node_start",
    "nodeId": "ad1a920e-1048-4b58-9c4a-a0469a1f189d",
    "timestamp": 1780860205245
  },
  {
    "data": {
      "mode": "read",
      "status": "ok",
      "service": "lmopenai",
      "latencyMs": 250,
      "operation": "run",
      "simulated": true
    },
    "event": "integration_mocked",
    "nodeId": "integration",
    "timestamp": 1780860205496
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "integration"
    },
    "event": "node_end",
    "nodeId": "ad1a920e-1048-4b58-9c4a-a0469a1f189d",
    "timestamp": 1780860205496
  },
  {
    "data": {
      "nodeType": "manualTrigger"
    },
    "event": "node_start",
    "nodeId": "05ad7d68-5dc8-42f2-8274-fcb5bdeb68cb",
    "timestamp": 1780860205502
  },
  {
    "data": {
      "initialData": {
        "input": "Can you explain how to use the n8n Code node to transform an array of objects by adding a timestamp to each item?"
      }
    },
    "event": "triggered",
    "nodeId": "manualTrigger",
    "timestamp": 1780860205502
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "manualTrigger"
    },
    "event": "node_end",
    "nodeId": "05ad7d68-5dc8-42f2-8274-fcb5bdeb68cb",
    "timestamp": 1780860205502
  },
  {
    "data": {
      "nodeType": "llm"
    },
    "event": "node_start",
    "nodeId": "4e2af29d-7fc4-484b-8028-1b9a84d60172",
    "timestamp": 1780860205506
  },
  {
    "data": {
      "messages": 1,
      "maxTokens": 1024
    },
    "event": "calling openai/gpt-4o-mini",
    "nodeId": "llm",
    "timestamp": 1780860205506
  },
  {
    "data": {
      "model": "gpt-4o-mini",
      "provider": "openai"
    },
    "event": "llm_call",
    "nodeId": "_context",
    "timestamp": 1780860205506
  },
  {
    "data": {
      "model": "gemini-3-flash-preview",
      "costUsd": 0.0016403,
      "provider": "openai",
      "latencyMs": 5066,
      "promptTokens": 1,
      "completionTokens": 656
    },
    "event": "llm_result",
    "nodeId": "_context",
    "timestamp": 1780860210578
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "llm"
    },
    "event": "node_end",
    "nodeId": "4e2af29d-7fc4-484b-8028-1b9a84d60172",
    "timestamp": 1780860210578
  },
  {
    "data": {
      "nodeType": "integration"
    },
    "event": "node_start",
    "nodeId": "05e0d5c6-df18-42ba-99b6-a2b65633a14d",
    "timestamp": 1780860210584
  },
  {
    "data": {
      "mode": "read",
      "status": "ok",
      "service": "code",
      "latencyMs": 250,
      "operation": "run",
      "simulated": true
    },
    "event": "integration_mocked",
    "nodeId": "integration",
    "timestamp": 1780860210836
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "integration"
    },
    "event": "node_end",
    "nodeId": "05e0d5c6-df18-42ba-99b6-a2b65633a14d",
    "timestamp": 1780860210836
  },
  {
    "data": {
      "nodeType": "set"
    },
    "event": "node_start",
    "nodeId": "39e2fd34-3261-44a1-aa55-96f169d55aad",
    "timestamp": 1780860210842
  },
  {
    "data": {
      "inputKeys": [
        "input"
      ],
      "mergeKeys": [
        "string"
      ]
    },
    "event": "merged",
    "nodeId": "set",
    "timestamp": 1780860210842
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "set"
    },
    "event": "node_end",
    "nodeId": "39e2fd34-3261-44a1-aa55-96f169d55aad",
    "timestamp": 1780860210842
  },
  {
    "data": {
      "nodeType": "set"
    },
    "event": "node_start",
    "nodeId": "42a3184c-0c62-4e79-9220-7a93e313317e",
    "timestamp": 1780860210845
  },
  {
    "data": {
      "inputKeys": [
        "input"
      ],
      "mergeKeys": [
        "string"
      ]
    },
    "event": "merged",
    "nodeId": "set",
    "timestamp": 1780860210845
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "set"
    },
    "event": "node_end",
    "nodeId": "42a3184c-0c62-4e79-9220-7a93e313317e",
    "timestamp": 1780860210845
  },
  {
    "data": {
      "nodeType": "integration"
    },
    "event": "node_start",
    "nodeId": "9c729e9a-f173-430c-8bcd-74101b614891",
    "timestamp": 1780860210847
  },
  {
    "data": {
      "mode": "read",
      "status": "ok",
      "service": "code",
      "latencyMs": 250,
      "operation": "run",
      "simulated": true
    },
    "event": "integration_mocked",
    "nodeId": "integration",
    "timestamp": 1780860211099
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "integration"
    },
    "event": "node_end",
    "nodeId": "9c729e9a-f173-430c-8bcd-74101b614891",
    "timestamp": 1780860211099
  },
  {
    "data": {
      "nodeType": "llm"
    },
    "event": "node_start",
    "nodeId": "6427bbf0-49a6-4810-9744-87d88151e914",
    "timestamp": 1780860211104
  },
  {
    "data": {
      "messages": 1,
      "maxTokens": 1024
    },
    "event": "calling openai/gpt-4o-mini",
    "nodeId": "llm",
    "timestamp": 1780860211104
  },
  {
    "data": {
      "model": "gpt-4o-mini",
      "provider": "openai"
    },
    "event": "llm_call",
    "nodeId": "_context",
    "timestamp": 1780860211104
  },
  {
    "data": {
      "model": "gemini-3-flash-preview",
      "costUsd": 0.0010478,
      "provider": "openai",
      "latencyMs": 3747,
      "promptTokens": 1,
      "completionTokens": 419
    },
    "event": "llm_result",
    "nodeId": "_context",
    "timestamp": 1780860214852
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "llm"
    },
    "event": "node_end",
    "nodeId": "6427bbf0-49a6-4810-9744-87d88151e914",
    "timestamp": 1780860214852
  }
]