Skip to main content

I built a working zap that will look up a google sheet row with today’s date and crate a ticket in hubspot, filling in ticket properties from fields in that row.

If there is more than one row with today’s date, I just get the first row. How do I make it look for all rows with that date and make a ticket for each?

I see the “find many spreadsheet rows” action but it won’t make individual tickets, the data is then treated more like an array, and it’s trying to make one ticket instead of multiple (one for each row).

Help? Thanks!

Hi @carnold 

Good question.

Try using the Looping app to handle array line items in Zaps: https://zapier.com/apps/looping/integrations#triggers-and-actions


Thank you @Troy Tessalone 

I’m trying to build this now. The old zap was:

  • trigger every day
  • find row
  • create ticket in hubspot

Where does the loop go? Before or after hubspot ticket creation?

  • trigger every day
  • find many rows
  • here?
  • create ticket in hubspot
  • or here?

@carnold 

How many rows max could be returned for 1 Date?

 

Some things to be aware of…

GSheets has 2 different actions with different limitations on the number of records and the format of those records.

 

The Looping app would be added after the array of items is found and before the desired action steps.

  • find many rows
  • HERE
  • create ticket in hubspot

 

###

 

I’d recommend using Airtable instead of GSheets.

  • Airtable has Views.
  • Views can have Filters. (e.g. Date = Today)
  • Airtable has APIs.
  • Airtable APIs can be used in Zaps with the Webhooks app as an action step to retrieve up to 100 records per page from a View.

@Troy Tessalone  thank you!

At most, we are looking at 5 rows with the same date. We are automating a renewal process which is often just one a day.

The zap looks at a sheet of data with the date I want a ticket created, and the line includes renewal date, customer name, price, all the usual info and puts that in the ticket too.

In the loop, what values am I looping? I tried date but I’m not sure if that’s the hangup or not.

It seems to work when i test it….

But then it’s still trying to make one ticket with an array of values….

 

 

A move to Airtable isn’t in the cards now but I’ll look into it and think about it in the future, especially if this keep being too difficult haha 


@carnold

You need to loop every array value you want to use in the HubSpot step.

Map the GSheet step data to the Looping step.

Map Looping step to the HubSpot step.


@Troy Tessalone I think I have the loop mapped right, I like what the test shows, but I still can’t get multiple hubspot tickets.

The next step is to create a hubspot ticket based on each loop. Best I can do it get it to make one ticket on a loop. I don’t understand how I tell it to make a ticket for each loop.

I’m missing something because I can pick something that starts with “preview loop values” and it publishes the array in the ticket, but if I pick “Name: C33” I just get one ticket with one name, not 3 tickets with the 3 different names needed.

I’m getting closer! Greatly appreciate your help and patience.

 


@carnold 

Try turning the Zap ON and testing.

Per the Looping help article: https://zapier.com/help/create/other-functions/loop-your-zap-actions

When you test this action, the Zap will only create the first loop.

It will NOT create any other loops during the test.

 


***Edit to add** It worked!! Thank you so so much!

 

@Troy Tessalone  I did, it still just made one ticket when I was expecting three. I got an email highlighting an error that I’m going to try and fix, may be the problem, I’ll see if it’s fixed at 4pm.