# File converter

<figure><img src="/files/iAmPCSqb1CA3lONt4cja" alt=""><figcaption></figcaption></figure>

## Description <a href="#description" id="description"></a>

The **File Converter** node is designed to handle quick and reliable file format conversions directly within your workflow.<br>

**Field and Function:**

1. **Original file**\*
   * Input: the file you want to convert.
   * Example: `trigger.file` (a file uploaded or passed from a previous node).
2. **Original file format**\*

   * Select the format of the file you uploaded.
   * This ensures the system can correctly read the file before conversion.

   <figure><img src="/files/RbPOhe0uhVq4Ww1RUDlr" alt=""><figcaption></figcaption></figure>
3. **Target file format**\*

   * Select the format you want to convert the file into.
   * The available options will depend on the format chosen in the **Original file format**.

   <figure><img src="/files/C8t0Alg8Y2AaP7Y6q352" alt=""><figcaption></figcaption></figure>

## List of relationships between "Original File format" and "Target file format" <a href="#description" id="description"></a>

<table><thead><tr><th width="301.42578125">Original file type</th><th>Target file format</th></tr></thead><tbody><tr><td>.txt (Plain Text)</td><td>.docx<br>.pdf<br>.html<br>.md</td></tr><tr><td>.json (JavaScript Object Notation)</td><td>.xlsx<br>.md<br>.xml<br>.base64</td></tr><tr><td>.html (HyperText Markup Language)</td><td>.docx<br>.pdf<br>.txt<br>.xlsx<br>.csv<br>.jpg<br>.png<br>.json<br>.md<br>.xml<br>.base64</td></tr><tr><td>.md (Markdown)</td><td>.docx<br>.pdf<br>.html</td></tr><tr><td>.csv (Comma-Separated Values)</td><td>.pdf<br>.xlsx<br>.jpg<br>.png<br>.json<br>.html<br>.xml<br>.base64</td></tr><tr><td>.jpeg/ .jpg (Joint Photographic Experts Group)</td><td>.pdf</td></tr><tr><td>.png (Portable Network Graphics)</td><td>.pdf</td></tr><tr><td>.pdf (Portable Document Format)</td><td>.docx<br>.pptx<br>.txt<br>.xlsx<br>.jpg<br>.png<br>.webp<br>.html</td></tr><tr><td>.xlsx (Microsoft Excel)</td><td>.pdf<br>.csv<br>.jpg<br>.png<br>.json<br>.html<br>.xml<br>.base64</td></tr><tr><td>.docx (Microsoft Word 2007 and later)</td><td>.pdf<br>.txt<br>.jpg<br>.png<br>.html</td></tr></tbody></table>

## Example <a href="#description" id="description"></a>

1. Input:
   1. Original File type = File PDF
   2. Target file format = File JPG

<figure><img src="/files/7PJiJNEunadRQ8LO2KYI" alt=""><figcaption></figcaption></figure>

2. After executing the flow

<figure><img src="/files/eXd9Gi9IIRm4Av2y1ieA" alt=""><figcaption></figcaption></figure>

3. At the "Output node", you can download the file

<figure><img src="/files/ydVGDbGohXWjZmENq44u" alt=""><figcaption></figcaption></figure>


---

# 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.diaflow.io/workflow-builder/nodes/built-in-tools/file-converter.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.
