> For the complete documentation index, see [llms.txt](https://support.docstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.docstudio.com/admin-panel/conversion-rules/how-to-create-a-conversion-rule-outgoing-documents.md).

# How to Create a Conversion Rule (Outgoing Documents)

<figure><img src="/files/5es8bkLK3D4CpvQR6UcZ" alt=""><figcaption></figcaption></figure>

### Create an outgoing conversion rule

1. Enter a rule name or keep the default name.
2. Turn on/off the rule.
3. Enable outgoing conversion rule option.
4. Enter a matching rule. Use RegExp to match document names or content to this conversion rule.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Use a pattern to match a set of files. For example, if you have <code>example111.txt</code>, <code>example222.txt</code>, and <code>example333.txt</code>, use <code>example.*.txt</code> to match all of them.</p></div>
5. Select what the system uses for matching:
   * **The name**. Match by file name.
   * **The content**. Match by file content.
6. Enter the template UUID that matches the outgoing document.
7. Select the template version.

   * The system auto-fills the latest template version by default.
   * Select another version from the list if needed.

   When the template UUID and version are filled, the system auto-generates the conversion rule and the template.
8. Upload a source example file from your local machine.
   * The file content appears in the source file preview.
   * To update the content, update the local file and upload it again.
9. Review the generated conversion rule.

   * Click the info icon to see an example.
   * Update the conversion rule if needed.

   Review the auto-generated template.
10. Click the **Run Conversation** <img src="/files/qjZr81hFulId2RXBhRPO" alt="" data-size="line"> button to check the conversion result.
11. Review the result in **Result** window.
12. After successful execution, click the <img src="/files/ACG5de7RE8J5HuWqUniH" alt="" data-size="line"> button to create the conversion rule.

{% hint style="info" %}
Enable the rule and click **Save** to apply it to outgoing documents that match the rule.
{% endhint %}
