# Neo4j Cypher script

### Description

The `Neo4j Cypher script` action executes Cypher statements in a workflow.

As with all actions, the goal is not to retrieve data but to execute various statements like creating or dropping indexes, calling APOC procedures, add or delete some static data and so on.\
The result of this action is a `true` or `false` exit code that determines if a success or failure hop to the next action in the workflow is chosen.

### Important

**To allow you to enter semi-colons (;) in commands, strings and so on we require you to separate commands with a semi-colon on a new line**

### Configuration options

| Option            | Description                                                                                                           |
| ----------------- | --------------------------------------------------------------------------------------------------------------------- |
| Connection name   | The name of the connection on which you want to execute the cypher statements.                                        |
| Script            | The script with cypher commands seperated by a semi-colon (;) on a new line. For examples see below.                  |
| Replace variables | Check this option if you want to replace variables in the format `${VARIABLE_NAME}` in the script prior to execution. |

### Example

```highlight
CREATE INDEX idx_company_id on :Company(id)
;
CREATE INDEX idx_company_id on :Company(id)
;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/workflows/actions/neo4j-cypherscript.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
