PowerPoint: Populate a template
Use this action to dynamically update a Powerpoint template to create customized Powerpoint presentations. This action can take a predefined template and create a presentation with new information each instance.
Use case
If the original Powerpoint file has {{company-name}}
in it and a previous step (for example, a webform) gathers the company name as PagerDuty Workflow Automation
, this step will replace {{company-name}}
reference with PagerDuty Workflow Automation
.
- Save time by creating custom powerpoint presentations based on dynamic values
- Reduce errors from doing a find-replace on an existing deck
- Increase brand consistency by ensuring a standard template is used
How to configure this action
This action works by replacing {{field-name}}
references in a template .pptx PowerPoint file with field values to create a new file. Both text and images can be replaced.
Images are added in field reference format, {{my-image}}
, but must have a “%” prefix: e.g., {{%my-images}}
. The tag must be placed in a text box in the .pptx template that is not part of the default layout on the slide.
How to conditionally display text or images in a PowerPoint presentation
Similar to conditional field references, you can conditionally populate parts of a PowerPoint presentation based on if a field exists or not. This is like writing an IF/THEN statement.
For example, add the following text to a presentation to define a condition for text to appear only if a field value DOES exist:
{{#field-name}} This text will only display if field-name DOES exist. {{/field-name}}
If there is any data in the {{field-name}}
field, the text This text will only display if field-name DOES exist
will appear in the presentation. If the field is empty, the text won’t appear.
✅ Heads-up: This action supports .JPEG, .GIF, .BMP, and .PNG files. If an unsupported image file type is used, the action will complete without adding the image.
Fields for this action
-
Template file
- Reference the field where the file template is stored.
-
The file template can be uploaded two ways: in an Instance Field or through a previous action. Use a reference to locate the file in either case.
- If using an Instance Field, upload the file as a default and reference the field here.
- If another person should upload the template, add a required file field in preceding task and reference the field here.
-
New file name
-
Enter a name for the new updated file, this is what the updated file will be named and saved as.
-
If left blank, the new file will have the same name as the template file.
💡 Tip: The .pptx extension will be added to this name automatically and does not need to be included.
-
-
Keep unmatched fields
- If a reference field in a template file does not match with a field in the Workflow, Select
True
orFalse
from the drop down to change how this unmatched field is handled. - For example, if the field
{{company-name}}
is empty and has no value, the matching reference in the .pptx template{{company-name}}
field would be considered unmatched.- Select
True
for any unmatched fields in the initial file template to be retained, showing{{field-name}}
in the document - Select
False
or leave blank for any unmatched fields to be removed
- Select
- If a reference field in a template file does not match with a field in the Workflow, Select
-
Output field name
- The name of the field in which the result should be saved. The step name is used by default.
What will this output?
This action will produce a new file field with all updated data. The Output field name can be referenced as: {{output-field-name}}
as chosen above.
Get help with a problem or question
If something’s not working as expected, or you’re looking for suggestions, check through the options below.
Why do the text or images I add not show up?
There are three things to check:
- Check to make sure all of the references inside the .pptx file are in text boxes.
- Check to make sure references for images are added in with the prefix “%”, e.g.,
{{%my-images}}
. - Check that the references are in a text box in the .pptx template that is not part of the default layout on the slide.
Here’s a small example of the way the references are added:
Text shows up, but why do the images I add not show up?
If just the images are not working, you may be using an unsupported image type. This action supports .JPEG, .GIF, .BMP, and .PNG files.
If an unsupported image file type is used, the action will complete without adding the image.
As well, check to make sure references for images are added in with the prefix “%”, e.g., {{%my-images}}
.
Thanks for your feedback
We update the Help Center daily, so expect changes soon.
Link Copied
Paste this URL anywhere to link straight to the section.