PowerPoint Generator API
  • PowerPoint Generator API
  • Getting started
    • Quick start
  • API reference
    • token/create
    • generator/create
  • Knowledge base
    • Key concepts
    • Templating your presentation
    • Building your JSON payload
    • Finding shape names
  • JSON/ PPTX Reference
    • presentation
    • slides
    • shapes
      • textbox
      • chart
      • picture
      • table
    • tags
    • Deprecated
  • Examples
    • Presentation
      • Naming output presentation
      • Using multiple templates
    • Slide
      • Change shape size and position
      • Change shape background color
      • Hide or remove shape
      • Replacing tags
    • Textboxes
      • Add text
      • Set font type and size
      • Set font color and font background color
      • Set bold, italic & underline
      • Set text alignment
      • Set text indentation
      • Set text line spacing
      • Using bullet-points
    • Chart
      • Change font settings
      • Insert data
      • Adjust chart legend
      • Appending to data labels
    • Pictures
    • Table
      • Populate simple table
      • Using `text_runs` in Table cells
      • Handling merged cells
      • Update a specific cells in existing table
    • Tags
Powered by GitBook
On this page

Was this helpful?

  1. Examples
  2. Slide

Replacing tags

Tags allow you to populate text by replacing the tag with a value of your choice.

PreviousHide or remove shapeNextTextboxes

Last updated 6 months ago

Was this helpful?

To update the tags in your slides, provide a list of key-value pairs for each slide. PowerPoint Generator API will then find and replace all matching tags with the specified values.

To create a tag, enclose your text in double curly braces, like this: {{example_tag}}.

Tags can be placed in text boxes or table shapes, making it easy to customize your presentation dynamically.

{
  "presentation": {
    "template": "slides_as_template_tagging.pptx",
    "export_version": "Pptx2010",
    "slides": [
      {
        "type": "slide", 
        "slide_index": 0,
        "shapes": [],
        "tags": [
          {
            "key": "client",
            "value": "Your favourite client"
          },
          {
            "key": "date",
            "value": "09/09/2021"
          }
        ]  
      },
      {
        "type": "slide",
        "slide_index": 1, 
        "shapes": [],
        "tags": [          
          {
            "key": "product",
            "value": "PowerPoint Generator API"
          },
          {
            "key": "adjective",
            "value": "frustrating"
          }
        ]
      }
    ]
  }
}
885KB
slides_as_template_tagging.pptx