I can’t get an image from a Notion page with its URL. I added a Notion “Make an API call” module, which allows me to display the image URL. However, in the next module, “Get a file,” the mapping doesn’t work.
BECAUSE you are using the get function directly, you need to tell it to reference the first result item in the result array.
{{get(1.body.results; "1.image.file.url")}}
The “proper” Make Academy taught way is to use map and get/first, then you do not need to specify “1.”
{{first(map(1.body.results; "image.file.url"))}}
For more information, see the map/get function documentation in the Help Center, and complete the Make Academy as it is explained in further detail there.
Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —
@Harsh, Thank you very much for your suggestion. This solution works well but does not meet the need to duplicate the entire article published on a Notion page (without having to manually interact with Notion).
@Siamliew, Thank you very much for your valuable help. Indeed, this works well. However, it requires knowing the position of the image or images present in the article published on the Notion page. In my case, one of the images is at position 24. I had to manually identify the image’s position in the previous message and then enter its position in the following GET function.
The First or Last function only works if the image is in the first or last element of the ARRAY. Unfortunately, in published articles, images can be located at different levels within the ARRAY.
But maybe the “HTTP Get a file” module is not the right one to use—should I use another one instead?
I tried with Notion’s “List Page Contents,” but this module does not list the images on a page. It only lists the paragraphs of the Notion page. I can’t explain why.
Maybe I forgot something? Thank you very much for your help. I’m open to any advice! Wishing you both a great day.
1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.
2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.
This marks the topic as solved, so that:
others can save time when catching up with the latest activity here, and
allows others to quickly jump to the solution if they come across the same problem
To do this, simply click the checkbox at the bottom of the post that answers your question:
3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!
Hope this helps! Let me know if there are any further questions or issues.