n8n LabIntermediate

Extract Domain Name from URL using JavaScript in n8n

You have a full website URL and want to extract just the hostname (domain name).

Live Execution Simulator Idle
πŸ“₯
Incoming Data
βš™οΈ
n8n Node
🎯
Next Step
> Ready. Type your expression below and click "Check Answer" to run the node.

Incoming Payload / Data:

{
  "website": "https://app.workflowexercise.com/dashboard/"
}
new URL($json.website).

βš™οΈ Your expression is executed against test data β€” any correct solution passes. +20 XP

Related labs