Search values in Google Sheet and conditionally map variables and values

Hello Make friends –

I’d REALLY appreciate any help with this. Fairly new to this, so there may be a simple solution.

I’m using Make to import CMS items from Webflow to Google Sheet, with the idea of using Google Sheet as a content database/repository.

Some premises:

  • In Webflow, content items are (manually) categorized.
  • Each category is in itself a “Webflow CMS item”, each associated with a unique Webflow-assigned ID-number.
  • When Webflow data is imported to GS with Make, the category data comes in the shape of the ID-number, NOT as the category name.

Thus, I need a way to map the category ID-number of each new content item to the corresponding category name.

To do that I keep a static list of categories and their associated Webflow ID-numbers in a separate GS worksheet.

I then thought I could get the value returned when mapping the id-numbers to the names, and then print it to the GS row of the content item in question.

The problem is I can’t figure out how to map category names to category ID numers.

In my scenario I’m using the Google Sheet module “Get range values” to look through the list of categories described above. Then I was hoping I could use a “switch” function (or similar) in the subsequent module to map the category ID of a new content item to the corresponding category name.

It turns out, however, that even though the “get range values”-module indeed finds my category names and category id numbers, the subsequent module does not allow me to separate nor dynamically chose among the values returned. It only shows me the labels. Because of this I can’t apply any logic to find the right category.

I could of course “hard code” this as there won’t be that many categories in use, but I also want to use tags which will make a static solution very messy.

Is there something I’m doing wrong here, or is there even a better/smarter way to get to the same hoped for result?

Many thanks,
Jacob

Hi @Jacob1
you can implement your solution by these steps:
list categories from webflow hold it as array then on the spreadsheet instead of insert the category-id
use map() function to get the relevant group name by the group id
get(map({{category-array}};category-name;category-id;{{actual category-id}});1)
you can share here the blueprint if you need extra help

2 Likes

Hi @Dorian_Ben_Haim – and many thanks for taking your time to reply. I’m afraid I don’t understand though.

More specifically:

  • Do I still begin with the Google Sheet module “Get range values”?
  • When you say “list categories […] insert the category-id”, what do you mean? Or rather, what module do I use?

Thanks a lot,
Jacob

Send me the scenario blue print with mock data so i can better understand how can i assist

2 Likes

Hi again,

Here’s the blueprint.

blueprint.json (81.5 KB)

Please note:
I use separate scenarios to sync Webflow items to Google Sheet. This scenario triggers when a new row is created in the main database. The idea with the scenario is to 1) update the new row with a unique identifier (step 2), and then create a new row in the content database (in which I keep more detailed data of each content item).

@Dorian_Ben_Haim KINDLY helped me solve this outside this forum.

The solution was simple: just use the Google Sheet module “Search rows” to search the list of categories. The module has a filter function, with which you can pin down the right variable and its corresponding value.

@Dorian_Ben_Haim is such a helpful guy and knows Make inside and out. Thanks again.

3 Likes

Hey @Jacob1 welcome to the community :wave:

It’s so great to hear that @Dorian_Ben_Haim was such a great guide in resolving this! :star2:

Thank you very much for remembering to share your final solution with the rest of us. This is super valuable and could be incredibly helpful to many others who are searching for similar information. :pray:

1 Like