Add Image
Adds an image to 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 the image will be added.
- Image Object Id - A unique identifier for the image object in the presentation.
- Image Url - The URL of the image to be inserted into the slide.
- Slide Page Index - The zero-based index of the slide where the image will be placed.
Options
- Height - The height of the image in points (PT). This defines how tall the image will be on the slide.
- Width - The width of the image in points (PT). This value determines how wide the image will appear on the slide.
- Translate X - The horizontal position where the image will be placed on the slide. A higher value moves the image further to the right. The default slide width is 960.0. Example center calculation: (960.0 - imageWidth) / 2.
- Translate Y - The vertical position of the image on the slide. Increasing this value moves the image lower down on the slide. The default slide height is 540.0. Example center calculation: (540.0 - imageHeight) / 2.
- Scale X - The horizontal scaling factor for the image. A value of 1.0 means the image's width is not altered.
- Scale Y - The vertical scaling factor. A value of 1.0 keeps the original height.
How It Works
The Add Image node integrates with Google Slides to insert an image into a specific slide of a presentation. When executed, the node:
- Validates the provided inputs (Presentation Id, Image Object Id, Image Url, Slide Page Index)
- Connects to the specified Google Slides presentation
- Retrieves the target slide based on the Slide Page Index
- Creates an image element with the specified properties (size, position, scaling)
- Inserts the image from the provided URL into the target slide
Requirements
- A valid Google Slides presentation ID
- Valid Google Slides API credentials
- A publicly accessible image URL
- Valid Google Slides permissions to modify the presentation
- A unique Image Object Id for the image element
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Presentation Id
- Empty or invalid Image Object Id
- Empty or invalid Image Url
- Invalid Slide Page Index (must be greater than or equal to zero)
- Invalid Translate X or Translate Y values (must be greater than or equal to zero)
- Invalid Scale X or Scale Y values (must be greater than zero)
- Invalid Height or Width values (must be greater than zero)
- Google Slides service errors
- Insufficient permissions to modify the presentation
Usage Notes
- The Presentation Id can be found in the URL of the Google Slides presentation
- The Image Url must be publicly accessible (not behind authentication)
- The Slide Page Index is zero-based, so the first slide is index 0, second is index 1, etc.
- The Image Object Id must be unique within the presentation
- For positioning the image at the center of the slide, calculate the appropriate Translate X and Translate Y values
- The default slide dimensions are 960.0 (width) by 540.0 (height) points
- Supported image formats include JPG, PNG, GIF, and other web-friendly formats
- The image will be added to the specified slide at the specified position and size