# PowerPoint Autofill

Feathery allows users to generate PowerPoint presentations from templates (in `.pptx` format) from their form submission or AI data.

Templates can contain variables via double-curly brace syntax, e.g. `{{Field1}}`. When the document is generated, Feathery will replace variables with the corresponding field value.

{% hint style="warning" %}
Fields can only contain **letters, numbers, and underscores** when being used in PowerPoint Autofill. Other characters may cause the generation to fail by reading the field name as a formula instead.
{% endhint %}

Feathery supports [Jinja templating logic](https://documentation.bloomreach.com/engagement/docs/jinja-syntax) for advanced use cases such as conditionally showing/hiding sections, generating sections in a loop, formulas, and more.

## Conditional Logic

Feathery supports conditionally including and excluding different slides and shapes in the PowerPoint presentation based on field values.

#### Hiding Slides

To conditionally hide a slide, place a text box with the following syntax anywhere within a slide:

```
feathery.hide_slide = {{ some_expression }} 
```

`some_expression` can be any jinja expression. If expression evaluates to `True` the slide will be removed from the rendered document.

#### Hiding Shapes

To conditionally hide a shape, place the following syntax at the top of the shape:

```
feathery.hide_shape = {{ some_expression }} 
```

`some_expression` can be any jinja expression. If expression evaluates to `True` the shape will be removed from the rendered document.

## Add Tables

Feathery supports adding tables with a flexible number of rows/columns based on the field used in the following syntax:

```
feathery.add_table = FieldID
```

For example if you have the following field

```
my_table = [
  ["HEADER 1", "HEADER 2", "HEADER 3", "HEADER 4"],
  ["a", "b", "c"],
  ["d", "e", "f", "f2"],
  ["g", "h", "i"]
]
```

and you insert a table placeholder in your document template like this:

<figure><img src="https://640450274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHAVngDAEk3s8Bw7P6Ntz%2Fuploads%2F3xxjMLPTXUvw0Hal2bWQ%2FScreenshot%202026-01-07%20at%202.04.47%E2%80%AFPM.png?alt=media&#x26;token=d741164c-cdeb-4b98-8561-65055d5eb39a" alt=""><figcaption></figcaption></figure>

where the upper-left cell contains just the expression `feathery.add_table = my_table` you can expect the final table to expand to contain all of the rows/columns and retain the text and table styles. In this example the final table will look like this:

<figure><img src="https://640450274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHAVngDAEk3s8Bw7P6Ntz%2Fuploads%2FiJZr4clad5sbsdZ3lHan%2FScreenshot%202026-01-07%20at%202.04.33%E2%80%AFPM.png?alt=media&#x26;token=d282543e-9294-4b77-86e6-8d675033ccf3" alt=""><figcaption></figcaption></figure>

If your field `my_table` does not exist or is empty the table will be removed from the final rendered document.

## Embed Images

To embed an image into the document that was pulled from a form submission, input the following syntax within a shape's text:

```
<FileUploadFieldId>__Image_<width>_<height>
```

`FileUploadFieldId` is the ID of the file upload field that the image to embed was uploaded to. `Width` is the width of the embedded image, in millimeters. `Height` is the height of the embedded image, in millimeters. If you set width or height to `0`, the image width or height will be set to the size of the shape. In order to preserve the aspect ratio of the image you can set one side as described before and the other side to `-1` which will auto-adjust that side to keep the correct aspect ratio. If you set both sides to `-1` the image will scale to fit the shape while keeping the correct aspect ratio.

## Document Workflow

Once you've mapped your document, you can integrate it into your existing workflow for filling and routing to the desired location. For example, you can include your PowerPoint as an attachment in a custom [email integration](https://feathery.io/integrations/email) to be sent to recipients.
