[400] Invalid requests[0].replaceImage using "Replace an image with a new image" Google doc module

I’m getting a [400] Invalid requests[0].replaceImage error when using “Replace an image with a new image” Google doc module.

Here is the scenario

I get the content from the document in which there’s an image I want to replace to fill in the Image Object ID in the “Replace an image module”. Then I search for the new image in my drive to get a web view Link that I also used in the final module.

I’ve looked into this topic that faced a similar issue: Insert Image Google Doc Module - #3 by Jordi-IA but the mime/type of my new image is correct (image/png)

Can anyone help?

Thanks!

Hi @Bennaim,

Are you OK to share the link to your image?

Also, is the link publicly available to anyone? I.e. can you access it from an incognito window in your browser?

If so, there may be a problem with the configuration of your “Replace an image with another image” module. Specifically, the object ID might not be an image. So maybe it’s trying to replace a text paragraph with an image and that causes the problem.

I’ve never used the module to do that, but that’s where I would start looking.

L

2 Likes

Hi L_Duperval,

This was an issue with the accessibility of the file indeed. I had to change the end of the doc URL with =sharing instead of =drivesdk which is the URL shared publicly when doing it manually.

Many thanks!

1 Like