UiPath Documentation
activities
latest
false

Productivity activities

Insert an image into a Google Sheets cell

Summary: Display an image inside a Google Sheets cell using the Google Sheets IMAGE formula and the Write Cell activity.

Applications: Google Sheets

Description: This example explains how to use the Write Cell activity to write the Google Sheets IMAGE formula into a cell, which displays a publicly accessible image directly inside the cell.

Note:

The Google Sheets API does not support inserting images directly into cells. This tutorial shows a workaround using the IMAGE formula, which references a publicly accessible image URL and renders it inside the cell.

Workflow

  1. Open Studio Web and create a new project.
  2. Add a Write Cell activity to your workflow.
  3. In the activity, configure the following:
    • Set up your Google Sheets connection.
    • In the Spreadsheet field, browse and select the target spreadsheet.
    • In the Sheet/Named range field, select the sheet where you want to insert the image, for example, Sheet1.
    • In the Cell field, enter the target cell, for example, A1.
    • In the What to write field, enter the IMAGE formula with the publicly accessible URL of your image: =IMAGE("https://example.com/your-image.png").
  4. To control how the image fits the cell, add a mode parameter to the formula. The following modes are available:
    • =IMAGE("url", 1) — Resizes the image to fit inside the cell while maintaining the original aspect ratio. This is the default behavior.
    • =IMAGE("url", 2) — Stretches or compresses the image to fill the cell, ignoring the aspect ratio.
    • =IMAGE("url", 3) — Displays the image at its original size. The image may be cropped if it is larger than the cell.
    • =IMAGE("url", 4, height, width) — Displays the image at a custom size. Replace height and width with your desired pixel values, for example: =IMAGE("url", 4, 100, 200).
  5. You're done and ready to run your project!

Limitations

Keep the following limitations in mind when you use this approach:

  • The image URL must be publicly accessible over HTTPS. Images behind authentication or access restrictions are not supported.
  • Google Drive images must be publicly shared (set to Anyone with the link can view) for the IMAGE formula to display them. Private Google Drive file links do not work.
  • The IMAGE formula adds a dynamic reference to the image URL, not a static embedded object. The displayed image updates if the content at the source URL changes.
  • Workflow
  • Limitations

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated