Skip to content

Neo4J Connection String

Constructs a Neo4J connection URI from individual parameters and produces a driver configuration and validation summary. It supports bolt and neo4j protocols (including secure variants), optional routing context, database selection, and basic connection tuning options.
Preview

Usage

Use this node when you need to assemble a valid Neo4J connection string and companion driver configuration to pass into downstream nodes or external services. Typical workflow: provide host, port, protocol, credentials, and optional routing/database parameters; inspect the returned JSON for the built URI, driver settings, and validation warnings/errors before using it to connect to your Neo4J instance.

Inputs

FieldRequiredTypeDescriptionExample
hostTrueSTRINGNeo4J hostname or IP address.db.example.com
portTrueINTNeo4J port number (7687 for bolt, 7474 for http).7687
protocolTruebolt \| bolt+s \| bolt+ssc \| neo4j \| neo4j+s \| neo4j+sscConnection protocol: bolt (direct), neo4j (routing); +s for encrypted, +ssc for self-signed certificates.neo4j+s
usernameTrueSTRINGNeo4J username for authentication.neo4j
passwordTruePASSWORDNeo4J password for authentication. Will be URL-encoded in the URI if provided.
databaseFalseSTRINGOptional database name; if empty, the server's default database is used.neo4j
routing_contextFalseSTRINGJSON string for routing context in cluster/routing setups. Applied only to neo4j/neo4j+s/neo4j+ssc protocols.{"policy": "eu-west"}
max_connection_lifetimeTrueINTMaximum connection lifetime in seconds.1800
max_connection_pool_sizeTrueINTMaximum number of connections in the pool.50
connection_acquisition_timeoutTrueINTTimeout in seconds for acquiring a connection from the pool.120
encryptedTrueBOOLEANEnable encryption for the driver connection. Recommended for production.True
trustTrueTRUST_ALL_CERTIFICATES \| TRUST_SYSTEM_CA_SIGNED_CERTIFICATES \| TRUST_DEFAULTTrust strategy for SSL certificates used when encryption is enabled.TRUST_SYSTEM_CA_SIGNED_CERTIFICATES

Outputs

FieldTypeDescriptionExample
textSTRINGThe generated Neo4J connection string URI.neo4j+s://neo4j:%3Cneo4j-password%3E@db.example.com:7687?database=neo4j&policy=eu-west
jsonSTRINGJSON string containing connection_string, driver_config, and validation_result (valid/errors/warnings).{"connection_string":"neo4j+s://neo4j:%3Cneo4j-password%3E@db.example.com:7687?database=neo4j","driver_config":{"uri":"neo4j+s://...","auth":["neo4j",""],"max_connection_lifetime":1800,"max_connection_pool_size":50,"connection_acquisition_timeout":120,"encrypted":true,"trust":"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"},"validation_result":{"valid":true,"errors":[],"warnings":["Consider using encrypted protocols (bolt+s, neo4j+s) for production"]}}
htmlSTRINGHTML output placeholder (not used by this node; returns empty).
xlsxSTRINGXLSX output placeholder (not used by this node; returns empty).
pdfSTRINGPDF output placeholder (not used by this node; returns empty).

Important Notes

  • Protocols: Use 'bolt' for direct connections and 'neo4j' for routing/cluster-aware connections. Use '+s' for encryption and '+ssc' for self-signed certificates.
  • Routing context: Only appended for 'neo4j', 'neo4j+s', and 'neo4j+ssc' protocols; ignored for 'bolt' variants.
  • Credentials: Username and password are optional but recommended; if set, both are URL-encoded and embedded in the URI.
  • Database parameter: If provided, added as 'database=' query parameter.
  • Validation: The node returns a validation_result with errors (e.g., missing host, invalid port) and warnings (e.g., unencrypted protocol, large pool size).
  • Driver config: The JSON includes 'auth', pool and timeout settings, and 'encrypted' and 'trust' when applicable for use by drivers or downstream nodes.

Troubleshooting

  • Invalid routing_context JSON: The node will fall back to an empty routing context and log a warning. Ensure routing_context is valid JSON.
  • Connection string missing credentials: Provide both username and password; if either is omitted, 'auth' is set to null and a warning is returned.
  • Unencrypted protocol warning: Switch to 'bolt+s' or 'neo4j+s' and set 'encrypted' to true for production environments.
  • Invalid port range: Set 'port' between 1 and 65535; otherwise, 'valid' is false with an error.
  • Self-signed certificates: If using self-signed certs, choose 'bolt+ssc' or 'neo4j+ssc' and set 'trust' as appropriate.
  • Large pool size warning: Reduce 'max_connection_pool_size' if you see warnings or resource pressure.