Parse URL
Parse URLs to extract their components and validate them. The action breaks down URLs into their constituent parts (protocol, hostname, path, query parameters, etc.) and checks whether the hostname resolves via DNS—all in a single step.
Overview
Section titled “Overview”The Parse URL action takes a URL string and extracts all its components using the native URL parser. It also performs DNS resolution to verify the hostname actually exists. Use it to analyze URLs, extract tracking parameters, validate links, or route workflows based on URL properties.
Configuration
Section titled “Configuration”Input Fields
Section titled “Input Fields”URL (Required)
Section titled “URL (Required)”The URL to parse. Must include the protocol (http:// or https://).
Example:
https://example.com:8080/path/to/page?utm_source=google&utm_medium=cpc#sectionOutput Fields
Section titled “Output Fields”URL Components
Section titled “URL Components”| Field | Type | Description | Example |
|---|---|---|---|
protocol | String | The protocol (http, https, etc.) | https |
hostname | String | Domain without port | example.com |
host | String | Domain with port (if present) | example.com:8080 |
port | String | Port number (empty if default) | 8080 |
pathname | String | The path portion | /path/to/page |
search | String | Query string with ? | ?utm_source=google |
hash | String | Fragment/anchor with # | #section |
origin | String | Protocol + host | https://example.com:8080 |
queryParamsJson | String | All query params as JSON | {"utm_source":"google"} |
Boolean Checks
Section titled “Boolean Checks”All boolean fields return "TRUE" or "FALSE" as strings.
| Field | Description |
|---|---|
isValidUrl | Whether the URL parses successfully |
hasPath | Has a non-trivial path (not just /) |
hasQueryParams | Has query parameters |
hasHash | Has a fragment/anchor |
hasPort | Has an explicit port number |
isSecure | Protocol is https: |
hostnameResolves | Hostname resolves via DNS |
Examples
Section titled “Examples”Example 1: Validate URLs Before Processing
Section titled “Example 1: Validate URLs Before Processing”Scenario: Only process contacts with valid, resolvable URLs.
Workflow Setup:
- Add Parse URL action with the contact’s website property
- Add If/Then branch:
isValidUrlequals"TRUE"ANDhostnameResolvesequals"TRUE" - Continue workflow for valid URLs only
Example 2: Extract UTM Parameters
Section titled “Example 2: Extract UTM Parameters”Scenario: Save UTM tracking parameters from URLs to contact properties.
Workflow Setup:
- Parse the URL from a form submission or landing page
- Use the
queryParamsJsonoutput with Parse JSON to extract specific parameters:utm_source→ Contact property “Original Source”utm_medium→ Contact property “Original Medium”utm_campaign→ Contact property “Original Campaign”
Example 3: Check for HTTPS
Section titled “Example 3: Check for HTTPS”Scenario: Flag contacts with insecure website URLs.
Workflow Setup:
- Parse the contact’s website URL
- If
isSecureequals"FALSE":- Set contact property “Website Security” to “HTTP Only”
- Create task to review security
Example 4: Route by Domain
Section titled “Example 4: Route by Domain”Scenario: Route leads differently based on their company website domain.
Workflow Setup:
- Parse the company website URL
- Use
hostnamein If/Then branches:- If hostname contains
.edu→ Route to Education team - If hostname contains
.gov→ Route to Government team - Otherwise → Route to General Sales
- If hostname contains
Example 5: Validate Link Submissions
Section titled “Example 5: Validate Link Submissions”Scenario: Ensure submitted links are valid before creating content.
Workflow Setup:
- Parse the submitted URL
- Check multiple conditions:
- If
isValidUrlequals"FALSE"→ Reject: “Invalid URL format” - If
hostnameResolvesequals"FALSE"→ Reject: “Domain doesn’t exist” - If
hasPathequals"FALSE"→ Warn: “URL points to homepage only”
- If
- Otherwise → Accept and continue
URL Parsing Details
Section titled “URL Parsing Details”Valid URL Formats
Section titled “Valid URL Formats”The action parses any URL with a valid protocol:
https://example.com— Simple domainhttp://example.com:8080/path— With port and pathhttps://sub.domain.example.com— Subdomainshttps://example.com?key=value&other=123— With query paramshttps://example.com/path#section— With hash/fragment
Invalid URL Handling
Section titled “Invalid URL Handling”If the URL cannot be parsed (missing protocol, invalid format), all component fields return empty strings and all boolean checks return "FALSE".
| Invalid Input | Result |
|---|---|
example.com | Invalid (missing protocol) |
not-a-url | Invalid |
://missing-protocol.com | Invalid |
Query Parameter Extraction
Section titled “Query Parameter Extraction”The queryParamsJson field contains all query parameters as a JSON object:
URL: https://example.com?foo=bar&baz=qux&empty=
queryParamsJson: {"foo":"bar","baz":"qux","empty":""}
To extract individual parameters, chain the Parse JSON action using the queryParamsJson output.
DNS Validation
Section titled “DNS Validation”The hostnameResolves check performs a DNS lookup with a 5-second timeout to verify the hostname has valid DNS records.
What it checks:
- Domain exists in DNS
- Has A or AAAA records
What it doesn’t check:
- Whether the URL returns a successful HTTP response
- Whether specific paths exist
- SSL certificate validity
Note: A passing DNS check confirms the domain exists but doesn’t guarantee the specific URL path is accessible.
Best Practices
Section titled “Best Practices”- Always check
isValidUrlfirst — Other fields may be empty if URL is invalid - Combine with Parse JSON — Extract specific query parameters from
queryParamsJson - Handle missing protocols — Consider prepending
https://if users commonly omit it - Use
hostnameResolvesfor link validation — Catches domains that don’t exist - Branch on
isSecure— Enforce HTTPS requirements in your workflows
Use Cases
Section titled “Use Cases”Lead Qualification
Section titled “Lead Qualification”- Check if company website is valid and resolves
- Deduct quality points if
isValidUrlorhostnameResolvesequals"FALSE" - Flag
.eduor.govdomains for special routing
Marketing Attribution
Section titled “Marketing Attribution”- Extract UTM parameters from submitted URLs
- Parse referral URLs to identify traffic sources
- Track campaign performance with query parameter analysis
Data Validation
Section titled “Data Validation”- Validate URLs in form submissions
- Check that provided links actually work
- Ensure URLs use HTTPS for security compliance
Competitive Intelligence
Section titled “Competitive Intelligence”- Extract competitor domains from submitted comparisons
- Parse competitor URLs for product analysis
- Route based on industry (by domain pattern)
Technical Details
Section titled “Technical Details”Performance
Section titled “Performance”- URL parsing: < 1ms (native browser/Node.js URL API)
- DNS check: 10-5000ms (network dependent, 5-second timeout)
- Total execution time: Typically 10-500ms
Timeout Handling
Section titled “Timeout Handling”The DNS lookup has a 5-second timeout. If the lookup times out, hostnameResolves returns "FALSE".
Related Actions
Section titled “Related Actions”- Parse JSON — Extract specific query parameters from
queryParamsJson - Match Regex — Custom pattern matching for URLs
- Validate Email — Similar validation for email addresses