Perplexity AI with Google Sheets

Hello all, I’m planning to build an automation with perplexity and:

  1. search rows in google sheet
  2. define the variable - Country in my example
  3. send the variable to perplexity
  4. obtain the response for the specific country from perplexity and write the response in the corresponding row

I’m having problems to run the query for all rows, Perplexity App is only providing me an answer for the first row in the table. What is wrong in my workflow?

Welcome to the Make Community!

Looks like the module is only returning a single result. Can you provide a screenshot or public share link to the sheet?

Once you’ve fixed the data in Google Sheets, you’ll want to look at aggregating the results.

Combining Bundles Using Aggregators

Every result (item/record) from trigger/iterator/list/search/match modules will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and can apply to many use-cases like building of JSON, CSV, HTML.

You can find out more about the other types of aggregator modules here:

Example

Here is an example of how your scenario could look like:

This is just an example. Your final solution may or may not look like this depending on your requirements and actual data.

For more information, see “Mapping with arrays” in the Help Centre. You should also do the Make Academy, which also covers the use of Iterators & Aggregators.

Hope this helps! Let me know if there are any further questions or issues.

@samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

Thanks, looks like the issue was fixed after trying a few different ways how I have devined the variable. Now it seams to work fine.

1 Like

No problem, glad I could help you with “Perplexity AI with Google Sheets

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 as newer questions are displayed higher on the forum’s “new” page.

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:
Screenshot_2023-10-04_161049

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.

@samliew

Thanks for sharing the solution! Adjusting the variables to process all rows makes a big difference—super helpful for anyone automating Google Sheets with Perplexity AI.