Skip to main content

Hi there,

We are running a project where we need to include in our zap a web search of city images.

For example, if London is the target city of the report, we want to find a way to have AI or an agent? to search the internet and retrieve a couple of images for this particular city, so we that we can add them to our pdf report.

ChatGPT with Zappier only gives us text results.

How can we set this up?

Thank you!

Hi ​@Dionysis X,

 

Welcome to the Community.

To automate adding city images to your Zapier workflow, use an image search API like Bing or Google Custom search. With Zapier's Webhooks app, you can send the city name as a parameter to the API and retrieve image URLs. Then, use Zapier to download the images and include them in a PDF report using tools like PDF.co or Crafmypdf. Test the workflow to ensure images are correctly retrieved and embedded. This setup lets you dynamically generate image-rich reports with minimal manual effort.

Feel free to ask if you need further help or have additional questions. We're here to assist you.


Hi ​@JammerS,

 

Thank you for your reply.

 

OK, we most definitely need further assistance on setting this up.

 

So, we did create our custom Google Image Search Engine and we did receive a public link and an API Key.

 

Back in Zapier, we selected Webhooks by Zapier and GET as an action.

 

Moving on to the Configure Tab, we entered the provided url in the url field and that is as far as we can go.

 

From a previous step, we have a field mapped as in Destination City.

 

How do we ask for the API to find images for this particular city?

 

After this step, can we filter results to copyright or commercial free images and setup an image dimension filter as well?

Thank you!


Hi there ​@Dionysis X 👋

Hope you doing mind me hopping in to lend a hand in setting up the webhook. I had a quick look at the API documentation for Google’s Custom Search JSON API here and it looks like the q query parameter is where you’d want to map the Destination City field field to. To filter results by copyright type I’d suggest using the rights parameter. Also, be sure to set the searchType parameter to image to ensure it runs an image search:

0f4ec1ca449cdf3274be3c3e6ceb5f0c.png

 

I’d recommend checking out our Send webhooks in Zaps guide to learn more about using Webhooks in a Zap.

If you’re still stuck after that, can you share some screenshots of the setup of the Webhooks action and any errors you might run into? Make sure to blur/remove any personal info (names, emails etc.) before sharing—you can use a tool like Zappy for that.

Hope that helps to get you pointed in the right direction. If you run into any issues or have further questions just let us know! 🙂


Hi ​@SamB,

 

Thank you for your input!

 

So here are a couple of images, one for data in and data out.

 

 

In this section Basic Auth and Headers were left empty.

We only want to use copyright free images as discussed earlier on.

https://cse.google.com/cse?cx=c561d0895e99741d2

And this is the search engine we created.

The result we received is this.

So, how do we use this text to download the images?

Or is that the search engine we created needs more tweaking?

Thank you!


Thanks for sharing those screenshots ​@Dionysis X 🙂

I think you’d need to update the URL field to match what’s mentioned in Google's API documentation here:

704be8cebd72d2b67e0f9a51be36b6e7.png
 

Also, it looks like Google requires the search engine ID and API Key to be included in the query parameters:

1cd2c2bdbfc15a8389af4daf838ec4c6.png

So seems like you’d need to add those as well, like you’ve done for the other parameters (q, searchType etc.)

Can you give that a try and keep us posted on how it goes?


Reply