> For the complete documentation index, see [llms.txt](https://docs.eximee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/tworzenie-i-podpiecie-skryptow.md).

# Creating and attaching scripts

## Preliminary information <a href="#edytorskryptow-informacjewstepne" id="edytorskryptow-informacjewstepne"></a>

To create a new script or edit an existing one, go to the **Library** and select the tab **Scripts module.** A list of available scripts will be displayed. From this view, you can create a new script, review the script version history, create a copy, or edit an existing artifact.

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2FWJZFhuZQFdGW6xmD0wGi%2Fimage.png?alt=media&amp;token=288ea0aa-a695-418b-8a97-4bb383e61a58" alt=""><figcaption><p><em><strong>Figure</strong></em> <em><strong>1.</strong> Window with the list of scripts and the context menu of one of the artifacts</em></p></figcaption></figure>

## Creating a script <a href="#skrypty-scriptservice-tworzenieskryptu" id="skrypty-scriptservice-tworzenieskryptu"></a>

Script Service is one of the artifact types in the repository. To add a script service, use Eximee Designer and go to the tab **Library → Scripts**, and then click the button on the right **Add script.**

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2FUeCfvZrrW9CqInRhe6Cs%2Fimage.png?alt=media&amp;token=916847c8-ded3-4b75-9a33-f233487ae450" alt=""><figcaption><p><em><strong>Figure 2.</strong> Adding scripts</em></p></figcaption></figure>

## Edit window <a href="#skrypty-scriptservice-oknoedycji" id="skrypty-scriptservice-oknoedycji"></a>

The edit window allows you to change the script content, input and output parameters, and run the script on test data:

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2Fa3Xro8Uv3AFqzZdd2juO%2Fobraz.png?alt=media&amp;token=bf5120b5-0fcc-41e7-93fc-0c1de1395e58" alt=""><figcaption><p><em><strong>Figure 3.</strong> Script service edit window</em></p></figcaption></figure>

## Attaching on the application <a href="#skrypty-scriptservice-podpiecienawniosku" id="skrypty-scriptservice-podpiecienawniosku"></a>

For a specific component in the panel **Properties** you should select **Interactions → External data source → Select service**, and then choose the name of the given script and assign the appropriate components to the input and output parameters.

Scripts can also be attached as input, output, and page services.

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2F6XCav6S6ygVChOGUJmqU%2Fimage.png?alt=media&amp;token=6dd54b73-f849-42b8-92f7-c0fc23d46db0" alt=""><figcaption><p><em><strong>Figure 4.</strong> Attaching a script to an application</em></p></figcaption></figure>

## Redirecting to the script code <a href="#skrypty-scriptservice-przekierowaniedokoduskryptu" id="skrypty-scriptservice-przekierowaniedokoduskryptu"></a>

After attaching the script, an icon will appear on the right side of the window ![](https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2Fvkug4IFpxerQOFkymCfM%2Fimage.png?alt=media\&token=d487fb74-70f3-484f-9a16-91f3cb31d296) allowing you to go to the script code source. After clicking the icon, the editor window with the source of this script will open in the current browser tab. You can also right-click the icon and then choose to open the script code source in a new tab or a new browser window.

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2F75b9xjAZlgW1OXiHAkPr%2Fimage.png?alt=media&amp;token=cb935d50-9cb1-4c43-a60e-9607b0ac2bb6" alt=""><figcaption><p align="center"><em><strong>Figure 5.</strong> Context menu of the icon leading to the script source</em></p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/tworzenie-i-podpiecie-skryptow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
