Neo4J Connector

Anypoint Connector for Neo4J provides the capability of execute CQL statements and run basic operations (such as create, update, delete, select nodes) against a Neo4J Graph DB instance.


MuleSoft maintains this connector under the Connector Support Policy - Select.

This document assumes that you are familiar with Mule, Anypoint Connectors, Anypoint Studio, Mule Concepts, and Global Elements.

For hardware and software requirements, see the Neo4J Connector Release Notes.

To Install this Connector

  1. In Anypoint Studio, click the Exchange icon in the Studio taskbar.

  2. Click Login in Anypoint Exchange.

  3. Search for the connector and click Install.

  4. Follow the prompts to install the connector.

When Studio has an update, a message displays in the lower right corner, which you can click to install the update.

Connector Namespace and Schema

When designing your application in Anypoint Studio, when you drag the connector from the palette onto the Anypoint Studio canvas, Studio automatically populates the XML code with the connector namespace and schema location.

  • Namespace:

  • Schema Location:

If you are manually coding the Mule application in Studio’s XML editor or another text editor, define the namespace and schema location in the header of your Configuration XML, inside the <mule> tag.
<mule xmlns=""

      <!-- put your global configuration elements and flows here -->


Note: Use current in the schema path. Studio interprets this to the current Mule version.

Maven Dependency Information

For Maven dependency management, include this XML snippet in your pom.xml file.


How to Configure

Place the connector in your flow as applicable for your use case.

To use the Neo4J connector in your Mule application, you must configure a global Neo4J element that can be used by the Neo4J connector. The Neo4J connector provides the following global configuration, requiring the following information:

Field Description


Enter the username to log in with.


Enter the corresponding password.


Bolt endpoint.


Rest endpoint URL (works with HTTP or HTTPS).

neo4j global element props


Name Description


Execute any CQL statement against DB.

Create Node

Create a node with a specific initial label. Optionally, properties for the node can be added.

Select Nodes

Query nodes with a specific label. Optionally, properties used as filter can be provided.

Update Nodes

Modified properties for one or multiple nodes with a specific label. Optional Properties can be added as search filter criteria.

Delete Nodes

Delete one or multiples nodes based on a specific label. This lets you delete nodes with inbound/outbound relationships. Optional Properties can be added as search filter criteria.

For a full list of operations for any version of the connector, see the Neo4J Connector Reference.

Common Use Cases

Node Basic Create, Read, Update, and Delete

Example Flow
  1. Create a new Mule Project in Anypoint Studio and set your Neo4J environment properties in src/main/resources/

  2. Drag an HTTP connector onto the canvas and configure it with the default values.

  3. Drag a Transform Message onto the canvas and create a flowVar called 'params' with the following code:

    %dw 1.0
    %output application/java
    	"name":"Tom Hanks",
    	"born": 1956
  4. Drag the Neo4J connector onto the canvas and configure a new Global Element according to the table below:

    Parameter Value









    <neo4j:config name="Neo4j__Basic_Authentication" username="${neo4j.username}" password="${neo4j.password}" boltUrl="${neo4j.boltUrl}" restUrl="${neo4j.restUrl}" doc:name="Neo4j: Basic Authentication"/>
    1. In the Properties Editor, configure:

      Parameter Value

      Display Name

      Create node

      Connector Configuration



      Create node



      Parameters Reference


      Create node

      Note: Click Test Connection to confirm that Mule can connect with the Neo4J instance. If the connection is successful, click OK to save the configuration. Otherwise, review or correct any invalid parameters and test again.

  5. Drag a Neo4J connector onto the canvas, in the Properties Editor, configure the parameters:

    Parameter Value


    Select nodes



  6. Drag a Neo4J connector onto the canvas, in the Properties Editor, configure the parameters:

    Parameter Value


    Delete nodes



  7. Drag an Object to JSON onto the canvas.

  8. Save the changes and deploy the project as a Mule Application. Open a browser and make a request to the following URL:


    If the node was successfully created and deleted, information should be displayed in a JSON format:

    [{"a":{"born":1956,"name":"Tom Hanks"}}]

Connector Performance

To define the pooling profile for the connector manually, access the Pooling Profile tab in the global element for the connector.

For background information on pooling, see Tuning Performance.

See Also