n8n Β· Text

n8n new URL()

Parses a URL string so you can read parts like hostname, pathname, origin and searchParams.

Syntax

new URL(urlString).hostname

Example

new URL('https://app.site.com/x').hostname

Result: app.site.com

Practice new URL() β€” free interactive labs

More n8n text functions