# Example

### Automatically send invoices to an external system via SFTP

Imagine a company receiving invoice files from an internal application. Each time a new invoice file arrives in a specific folder, it must be sent to an external system via SFTP and archived for auditing purposes.

Manually performing these steps would be time‑consuming and error‑prone.

You can configure a **Rule** to automate the entire process so that every time a new **PDF invoice** is added to the folder, the rule is triggered automatically.

To configure the Rule for this scenario, follow these steps:

* **Listening folder (VFS):**&#x20;
  * **CustomerData/Invoices**

<figure><img src="/files/vdGAwmtiqekBbTAuCY8F" alt="" width="470"><figcaption></figcaption></figure>

* **Trigger:**&#x20;
  * **New file** - A new file arrives in the folder&#x20;

<figure><img src="/files/rJhj4k51pQ3QpcfFyhGe" alt="" width="384"><figcaption></figcaption></figure>

* **Condition attributes:**
  * **\*.pdf** - Any file with .pdf extension<br>

    <figure><img src="/files/VjHrz8Pu1WAdT9Z9Diiy" alt="" width="563"><figcaption></figcaption></figure>
* **Actions:**
  * **Push to remote** - Send the file to a remote SFTP server<br>

    <figure><img src="/files/PEGmi7vIZH7ICKfi9oHM" alt=""><figcaption></figcaption></figure>
  * **Copy to VFS** – Copy the file to an archive folder after a successful transfer<br>

    <figure><img src="/files/1q7fmr5YmU0QBY5aJfO2" alt="" width="335"><figcaption></figcaption></figure>

Click **Save** to confirm and activate the rule.&#x20;


---

# 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-mover-smart/rules/example.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.
