Adding Image to Cell from gdrive URL automatically using Python & Smartsheet API

Hi All,

I am currently trying to automatically adding image into a cell in smartsheet using Smartsheet API  and Python.

So, we have two column :

  • Column A containing image URL
  • Column B where we want to add the image from gdrive URL

I have hundred rows, meaning we have hundreds cell on column B to add image from column A.

I have successfully download the image. But have problem on adding it to the cell of Column B.

Here is the execution result:

Is there anyone have experienced adding Adding Image to Cell from gdrive URL automatically using Python & Smartsheet API?

Is this even possible to do in smartsheet?

Your support will be very helpful.


Thank you.

Answers

  • marc4
    marc4 ✭✭✭✭

    You have to send the API the binary image data so you can't just give the API a URL. If you have google drive desktop you can point to the image file as if it were a local file and send the binary data.

    Otherwise you will have to retrieve the image data and then POST it to the API either by writing it directly to the API or writing it to a local file and pointing to that.

    /marc