Skip to main content

Hi There,

I have a table on a Webflow site that contains a list of companies and has columns with different data relating to each company. I want this table to auto update. Each day the new data I need the table to have is published on a publicly available CSV doc.

The company names on this list don’t change, ie no companies are added or removed from day to day.

Ho do I use Zapier to update the Webflow CMS collection?

In Zapier I can schedule an import of that day’s CSV using a Zap with these actions:

  1. Trigger set to fire daily at set time
  2. Date/Time to format the current date to insert into the URL of that day’s CSV.
  3. Format>Utilities>import CSV file from the URL

But then, how am I going to use this to update the items in the CMS collection?

I can’t create a step 4 Webflow>Update Live Item because the required ‘Item’ field requires the item ID.

I can get the IDs into a Google Sheet by using Made by Marius’ two tab /2 Zap solution here 1

Ie. I would add a step 4 to above GSheets>Create New Spreadsheet Row(s).

Then another Zap triggers on GSheets > New or Updated Spreadsheet Row, then has action 2: Webflow>Create Live Item, and action 3: Create Spreadsheet Row in a second tab on the GSheet.

Now, then after doing the process once , I would have the company list on the GSheets’ first tab without IDs and on the second tab with a column of item IDs, and (if I’d deleted the CMS collection items before) then I would have a matching set companies in my CMS Collection.

But now what?

I can’t repeat this the next day as the Create New Spreadsheet Row(s) step at the end of the first Zap means I get all the companies listed twice on both the GSheets table and in the CMS collection. I only want to have the same companies once in the CMS collection.

Apart from the thread above, Ive also read with interest these other conversations on the forum including this one 1

but I can’t figure out how I can apply this in my case. Could anyone help me out?

Many thanks!

Hi @P111x 

You may have to leverage the Webflow CMS API to search for the Item to then Update.

Webflow CMS API: https://developers.webflow.com

App APIs can be used in Zaps with the Webhooks action step: https://zapier.com/apps/webhook/integrations#triggers-and-actions


@P111x 

If you can create a lookup table in GSheets or Airtable with the Webflow CMS Item IDs, then you can use one of these action steps in the Zap for each CSV row.

GSheets - Lookup Row

OR

Airtable - Find Record


Hi Troy and thanks again for your help!

Would you be willing to elaborate slightly to give me an idea of the Zaps i’d need to set up for this workflow? 

 

 

 


@P111x 

For which approach?


For all of it. Sorry!

I want to be able to understand the steps I need to take after I import the CSV. Would it be that a step 4 on the first Zap would be a Webhooks step that gets the ID from the api. And then after that ? 

Thanks for your patience. 

 

 


@P111x 

The webhook approach is advanced and going to be technical.

The Webflow CMS API has an endpoint for Get All Items for a Collection: https://developers.webflow.com/#get-all-items-for-a-collection

However, there are no additional parameters available to filter the returned results.

There’s also a page limit of 100 results, so pagination may have to be involved.

Then you’d have to use a custom Code step to filter the returned results to find the desired Collection Item.


So is there a way that is less advanced to do this? Is the look up Webflow in Airtable an alternative ?

 

 


@P111x 

A different possible solution would involved creating a Lookup Table.

If you can create a lookup table in GSheets or Airtable with the Webflow CMS Item IDs, then you can use one of these action steps in the Zap for each CSV row.

GSheets - Lookup Row

OR

Airtable - Find Record


Ok great - this is a good alternative. 

 


So Troy, could you try to put into very simple terms the rest of the steps and zaps and actions I would need to do to get this working! I’ve been working with Zapier to try to get this up and running for days so I’m quite familiar with the process of setting up Zaps. Just need a little more help getting my head around it from an expert!

 

 

 


Ok, so I managed to figure it out !

 

First I ran a Zap to populate the lookup table and CMS collection:

  1. Schedule by Zapier: Every Day
  2. Formatter by Zapier: Utilities
  3. Looping by Zapier: Create Loop From Line Items
  4. Webflow: Create Live Item
  5. Google Sheets: Create Spreadsheet Row.

then turned that off and will run this which triggers daily:

  1. Schedule by Zapier:Every Day
  2. Formatter by Zapier: Date / Time
  3. Formatter by Zapier: Utilities
  4. Looping by Zapier: Create Loop From Line Items
  5. Google Sheets: Lookup Spreadsheet Row
  6. Webflow: Update Live Item

This should work to update all the companies info.

 

The problem I have as a beginner in Zapier is it can be hard to work stuff out for yourself since there’s not much info around explaining how Actions function , so you end up with having to rely on Zapier’s own explanatory articles which, I personally found quite difficult to make sense of - I guess they have to be written in a general way so they apply to the millions of different scenarios you can have with Zapier.

For me, the way the API Course from Zapier (https://zapier.com/learn/apis/) was written was perfect because the writers used great real-world metaphor to explain basic programming logic. 


Hey @P111x!

Great job figuring that out! You’re right that it’s difficult for us to write help docs and articles specific enough for use cases like yours, while still trying to be general enough that it can apply to many other users.

Thanks for the feedback about that API guide! I’ve passed it along to the person who wrote that (in 2014, and he’s still at Zapier!).