This does seem unnecessarily complex (spent the morning trying to figure this out!).
The key part of my automation is using ‘HTTP: Get a File’ which grabs an image created by OpenAI’s ‘Generate an image’, it then gets passed into a google drive using ‘Upload a File’ (so far so good!).
The last module is then ‘Google Docs: Create a Document from a Template’. And this is where things become unstuck.
In my template I’ve tried putting {{image}} the text, I’ve tried putting a place holder with ‘Alt Text’ in - but no matter what I do I can’t get the image from the google drive to be added to the document! (it’s throwing errors such as 'Invalid URL parameter, or it just writes the actual file name in text!).
Worst though, is that the ‘values’ which appear in the google doc don’t seem to have the image alt text for me to map the google drive file to - instead something called ‘Body: Image No.1’ appears in the options… and I just don’t know what value from the google drive I’m actually supposed to put in.
I’ve tried ‘File ID’ - but there appears to be a baffling array of possible values from the Google drive that I just don’t know where to start.
Can anyone provide with any tips? This seems like it should be the easiest thing in the world - but I’m completely at a loss as to how to do something that is seemingly simple.
Any help anyone could provide would be greatfully received! I’ve tried everything before coming on here, and I’m just not going to be able to solve this on my own.
Moving forward - I also added a ‘Download A file’ module - but again, what is the URL of that file so I can insert it into my Google doc?
…but the Google Doc throws a ‘bundle validation error’ (invalid URL) when I try and pass data from the ‘Download a File’ module.
Exactly what value from the ‘download a file’ module am I supposed to add into the Image URL in the Google doc module?
I’ve tried ‘Data’… failed.
I’ve tried ‘File ID’ … failed.
Which value do I need to add into my Google doc?
I will be eternally grateful if anyone could point me in the right direction. Thanks in advance.
Hello @Jayson_Freshton,
If you’re replacing an image in a Google Doc you need to supply a publicly-accessible direct URL to that image. Google Drive makes this difficult because like you said there are so many URL variations and they’re not even public unless you’ve shared the file or the file inherits sharing from its parent folder.
You can follow Google Drive Upload a File module with Google Drive Get a Share Link then map the Web Content Link as the URL for the Body Image in Google Docs module.
Hope that makes sense and hope it helps!
You can remove this because you don’t want the file itself (which you already have from HTTP module 28).
Donald, you life saver.
Ok, so I’ve here’s my configuration from the ‘Share Link’ module…
…and here’s my set up in the (create new document from template) google doc…
…but I’m getting this error in my Google docs module (“Access to the provided image is forbidden”)
Here’s the key part of my automation now…
For Get a Share Link you need to set Type to Anyone which makes it public.
Cheers Donald - getting closer - unfortunately I’m still getting this error. See screenshots in case I’ve configured it wrongly!
Does your image meet all the requirements?
It’s a 3.1mb image (PNG format) created by DallE2 in one of the prior modules. I believe it should be ok(?).
Interesting… I test earlier and worked fine for me though it was a jpg.
Looking at the output bundle from the ‘Get a share link’…
…give me two options:
Which isn’t really a direct link to a URL as far as I can tell (it’s wrapped around Google image viewer)…
,…and ‘web content’ this link…
…which appears to automatically download the image when pasted into a browser.
If I ‘strip’ away the ‘&export=download’ part it gives me a direct link to the image: https://drive.google.com/uc?id=1jRXj5nZlPTUz8fHJi3mJ8eAHBa7ABCsd
…I’m wondering if I ‘parsed’ out that text (or something) if that would work(?)… but it does all seem quite a ‘dance’ for getting an image output into an automation.
Is there other approach you think I could take? (I dunno - another module type, not using Google drive or something).
Can’t help but feel I’m missing something fundamental here, never thought passing an image into an automation would require so many hacks and fudges.
I’ve even added a ‘Convert to JPEG’ module in, in case it was PNG that was causing an issue, but nope - the word doc just can’t find the image!
Is this a bug with Make.com when trying to push an image into a google doc that’s created from a template? (or a Google issue) - or - have I just got something completely wrong. Baffling!
Thanks for any suggestions…
Progress!
So, reloaded my scenario, and in the ‘image’ field I added the ‘Web Content Link’ - and, now it seems to be working!
My next ‘challange’ is trying the same - but - not on a Google Doc - but a Google Slide. The problem I’m having is that I can’t seem to find HOW to target the image I want to replace - I’ve tried changing the alt tag in the google slide - but it simply doesn’t show in the ‘values’ area of Google slides… I’ll make a new post unless anyone has an answer…
Anyway, thanks for pointing me in the right direction @Donald_Mitchell - I got there in the end. Really appreciate your help.
4 Likes