Bit of a complicated problem here. I work at an advertising company that manages a lot of campaigns.
The Problem:
We want to know when campaigns go live so we can tell the client. The problem is that it’s a time suck to sit and wait around for a couple hours checking in to see if a campaign is live or not.
How I’ve Started To Solve The Problem:
I get an automated email every hour on the hour. The email contains a standard CSV with all placements and number of impressions each placement has received.
Is there a way for me to have Zapier recognize when the standard CSV (1) adds a new line item, and (2) that line item has more than 100 impressions attached to it? I think digests might accomplish what I’m trying to do but I can’t make it work in my head. Another solution I can think of would involve setting up a Google Sheet where I have one Zap that adds line items to the Google Sheet if they don’t exist already, and sending out a Slack message whenever it adds a line item to that Google Sheet.
Thanks!
Best answer by Chris Verrill
Yes! For anyone in the future with a similar problem who finds their way here, my solution looks similar to Troy’s:
Trigger: New Attachment in Gmail looking at a specific label--I set up a filter in my inbox to direct all reports to that label.
Formatter utilities -- to import .csv with type “text”
Code to remove first 8 lines of .csv (code below)
Formatter utilities -- to import .csv with type “default” from the Code step
Loop values to loop: all fields in .csv
filter: only continue if impressions is greater than 100
lookup spreadsheet rows by lookup value “placement”
filter: only continue if “Zap Search Found Status” exactly matches “false”
create spreadsheet row in Google Sheet
And then a zap looking at the Google Sheet and sending a Slack message any time a new spreadsheet is loaded.
Here’s the code--found a bunch of people looking for something similar on this forum but couldn’t find the code itself. For code newbies--it’s in Javascript. Again, this is code that will remove the first row of a spreadsheet in Zapier. (Actually, here it removes 8 rows. If you want to only remove 1 row, change “i > 7” to “i !== 0”.)
@Troy Tessalone Thanks a ton for your help! One question:
Can you elaborate what the “Looping” step should do? How do I prevent placements from being added to the GSheet that have already been added? Do I need a filter between steps 3 and 4 in Zap 1?
Yes! For anyone in the future with a similar problem who finds their way here, my solution looks similar to Troy’s:
Trigger: New Attachment in Gmail looking at a specific label--I set up a filter in my inbox to direct all reports to that label.
Formatter utilities -- to import .csv with type “text”
Code to remove first 8 lines of .csv (code below)
Formatter utilities -- to import .csv with type “default” from the Code step
Loop values to loop: all fields in .csv
filter: only continue if impressions is greater than 100
lookup spreadsheet rows by lookup value “placement”
filter: only continue if “Zap Search Found Status” exactly matches “false”
create spreadsheet row in Google Sheet
And then a zap looking at the Google Sheet and sending a Slack message any time a new spreadsheet is loaded.
Here’s the code--found a bunch of people looking for something similar on this forum but couldn’t find the code itself. For code newbies--it’s in Javascript. Again, this is code that will remove the first row of a spreadsheet in Zapier. (Actually, here it removes 8 rows. If you want to only remove 1 row, change “i > 7” to “i !== 0”.)