Pulling Data from Google Sheets to map onto Google Docs Template

Hi Make Community! I am trying to pull data from a Google Sheet and map it to {{variables}} in a Google Doc template.

When I use the Search Rows module, I am given bundles that correspond to each row. As I only need data from one column, I then simplified my data into one Array that contains the data from column C (see screenshots).

But when I go to the Google Doc module to map my variables to the Sheet data, I can only see the title of the column. The array does not show my data points that you can see in the output of the array aggregator.

Please help! I am sure there is a simple solution that I am missing - thanks in advance :slight_smile:



Here you are trying to map a field value i.e. companyName to an array, coz of which it is pulling only the array title.
You will need to flatten the array to use the value in a single field. You can use a Text Aggregator for instance.

If you want to create multiple google docs, there is no need to add array aggregator. The search rows bundles will do the job for you.

Let us know your use case to get better clarity.

Thanks for your response! I have data in a Google Sheet that I want to map onto a “Create a Document from a Template” Google Docs module. The attached screenshot shows the data I need. All the necessary data is in column C in the sheet.

I will try to flatten the data with a text aggregator now.

Sorry, are you suggesting I add a text aggregator following the array aggregator I already utilized?

When I tried this I just got a string of text with all the data in one line.

Okay, so all the values to setup are in C column.
You can fetch respective elements to map to google doc fields

Array Aggregator (as you mentioned)

Set Variables (to get text values of C column)


Set Google doc values (using get() function)

This should help in creating the doc.

A better solution will be to transpose the C column in a different sheet in Google Sheets.
That way, you can just search the new sheet rows and populate in the Google Doc.

Let me know how it works out.