> For the complete documentation index, see [llms.txt](https://guide.transmute.industries/verifiable-data-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.transmute.industries/verifiable-data-platform/platform-guide/adapter-marketplace/neo4j-adapter.md).

# Neo4j Adapter

Leverage the connected nature of Linked Data to automatically create Knowledge Graphs from verified data exchanged on the Transmute platform.

The Neo4j Adapter builds a knowledge graph from all Verifiable Presentations sent and received on your Transmute platform Organization. Linked data automatically "snaps together" in the Knowledge Graph - no manual data mapping is needed.&#x20;

Knowledge graphs can reveals hidden or unexpected data relationships, enables advances graph algorithmic analysis, graph data science and machine learning.&#x20;

<figure><img src="https://362859350-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCnepINstRR3UUYDZWIj%2Fuploads%2FkmwxeP9LVdehKZJgW8zD%2Fimage.png?alt=media&amp;token=13cf4919-9d9e-4ecd-b363-255e662ec677" alt="Automated creation of Knowledge Graphs from Verifiable Credentials"><figcaption><p>Automated creation of Knowledge Graphs from Verifiable Credentials</p></figcaption></figure>

The Transmute platform Neo4j Adapter can be found here: <https://platform.transmute.industries/marketplace/adapters/urn:transmute:adapter:neo4j>

### Installation

On the Adapter Marketplace, click the "Neo4j" adapter for configuration details.&#x20;

<figure><img src="https://362859350-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCnepINstRR3UUYDZWIj%2Fuploads%2F8rFbxUfJ8dveLoOGihiL%2Fneo4j_01.webp?alt=media&amp;token=62bdeb3f-8fad-4d34-871f-d18b08068209" alt="Neo4j adapter on the Adapter Marketplace"><figcaption><p>Neo4j adapter on the Adapter Marketplace</p></figcaption></figure>

The Neo4j Adapter configuration page requires you to enter access details for the target Neo4j database. We recommend using Neo4j's Aura cloud platform available here: <https://neo4j.com/cloud/platform/aura-graph-database/>.&#x20;

<figure><img src="https://362859350-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCnepINstRR3UUYDZWIj%2Fuploads%2FH8hSQMsopWkLrIzAAHJ7%2Fneo4j_02.webp?alt=media&amp;token=42630c16-c45d-45d1-8e22-5dfa99cca782" alt="Neo4j configuration page"><figcaption><p>Neo4j configuration page</p></figcaption></figure>

* **URI** - Make sure to include the full URI, including protocol and port. For example: `neo4j+s9d2d1053.databases.neo4j.io:7687`
* **User** - Your Neo4j user name
* **Password** - Your Neo4j password

Once Neo4j credentials are entered, click "Install".&#x20;

<figure><img src="https://362859350-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCnepINstRR3UUYDZWIj%2Fuploads%2FdLkN7YtqnJzPeSuDUsJG%2Fneo4j_03.webp?alt=media&amp;token=14b3bfe6-caa8-4f22-b7fa-73be153b4d97" alt="Successful Neo4j installation"><figcaption><p>Successful download of the Neo4j Adapter installer</p></figcaption></figure>

This will prompt download of the Neo4j Adapter installer script and necessary credentials to connect to both you Transmute platform organization and Neo4j.&#x20;

The Neo4j Adapter will be executed as a Workflow on Github. Before continuing, make sure that you have a Github account for hosting the Workflow. If you do not already have a Github account, please first create one on [github.com](https://github.com/).&#x20;

Run the following commands to create a Github repository that holds the adapter. Note the `$` character is to show a command and not the be included in the line to execute.&#x20;

```
$ unzip Github\ Neo4j-Adapter.zip
```

This will extract a `script.sh` and `.env` file from the zip.

```
$ chmod +x script.sh
$ ./script.sh
```

The script will set up and direct you to the repository on your Github account:

<figure><img src="https://362859350-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCnepINstRR3UUYDZWIj%2Fuploads%2FnVzaA9AVyVyfT5x1278r%2Fimage.png?alt=media&amp;token=cb4f412c-47a7-49d6-bce8-84a28f2e76d0" alt="Github repository which holds the Neo4j Adapter"><figcaption><p>Github repository which holds the Neo4j Adapter</p></figcaption></figure>

### Running the Neo4j Adapter

To run the Adapter, on the Github repo, go to Actions:&#x20;

<figure><img src="https://362859350-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCnepINstRR3UUYDZWIj%2Fuploads%2F5wQ4YK752q0zPmLdZI41%2Fimage.png?alt=media&amp;token=01bf58a1-db1c-4fbc-996a-61a4eb2e95bb" alt="Running the Neo4j Adapter workflow"><figcaption><p>Running the Neo4j Adapter workflow</p></figcaption></figure>

Click "Run workflow" as indicated above. This will run the Neo4j Adapter workflow.

### Resulting Knowledge Graph

Logging in to your Neo4j DB instance, you can now query the labeled property graph representation of all your organization's Verifiable Presentations.&#x20;

<figure><img src="https://362859350-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCnepINstRR3UUYDZWIj%2Fuploads%2FGegMCY1HfeTE2OiWTDRL%2Fimage.png?alt=media&amp;token=3427d90b-a945-4c3b-86b8-d56c1bf903e1" alt="Verifiable presentation and verifiable credential data represented in Neo4j"><figcaption><p>Verifiable data represented in Neo4j</p></figcaption></figure>

### Useful Cypher Commands

This section lists some useful, basic cypher commands to get you started validating the Neo4j graph data.&#x20;

This command queries and returns all nodes in you Neo4j DB:&#x20;

```cypher
MATCH(n) RETURN n
```

This command deletes all data in you Neo4j DB:&#x20;

```cypher
MATCH(n) DETACH DELETE n
```

Please see <https://neo4j.com/developer/cypher/> for full documentation of the cypher query language.&#x20;
