Skip to main content

Replace Shapes With Image

Replaces all shapes containing specific text with images in a Google Slides presentation.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Presentation Id - The ID of the Google Slides presentation where shapes will be replaced with images.
  • Text to Replace - The text content that identifies which shapes should be replaced with images.
  • Replacement Image Url - The URL of the image that will replace the matching shapes.

Options

  • Search case sensitivity - If enabled, the text search is case-sensitive; otherwise, it's case-insensitive.
  • Image Replace Method - The method used to fit the replacement image:
    • Center Inside - Scales the image to fit entirely within the original shape boundaries while maintaining aspect ratio
    • Center Crop - Scales and crops the image to fill the original shape boundaries while maintaining aspect ratio
  • Page Object Ids - An array of page IDs to limit the replacement operation to specific slides. If empty, all slides in the presentation are searched.

How It Works

The Replace Shapes With Image node finds all shapes containing the specified text and replaces them with images from the provided URL. When executed, the node:

  1. Validates the provided inputs (Presentation Id, Text to Replace, Replacement Image Url)
  2. Connects to the specified Google Slides presentation
  3. Searches for all shapes containing the specified text across the presentation or specified pages
  4. Replaces each matching shape with the image from the provided URL
  5. Applies the specified image fitting method to each replacement

Requirements

  • A valid Google Slides presentation ID
  • Valid Google Slides API credentials
  • Text content that identifies the shapes to be replaced
  • A publicly accessible URL for the replacement image
  • Proper permissions to modify the presentation

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid Presentation Id
  • Empty or invalid Text to Replace
  • Empty or invalid Replacement Image Url
  • Google Slides API authentication errors
  • Insufficient permissions to modify the presentation
  • Invalid presentation ID
  • No shapes found containing the specified text
  • Google Slides service errors

Usage Notes

  • The Presentation Id can be found in the URL of the Google Slides presentation
  • The Text to Replace is searched within shape content, not necessarily visible text
  • The Replacement Image Url must be publicly accessible (not behind authentication)
  • When Page Object Ids is specified, only those slides are searched for matching shapes
  • The Image Replace Method determines how the new image fits within each original shape:
    • Center Inside - Ensures the entire replacement image is visible but may leave empty space
    • Center Crop - Fills the entire original shape area but may crop parts of the replacement image
  • This node is particularly useful for template-based presentations where placeholder shapes need to be replaced with actual images
  • The replaced images maintain the position and size of the original shapes
  • Supported image formats include JPG, PNG, GIF, and other web-friendly formats
  • If no matching shapes are found, the node returns an error