Currently when we make purchases online, our buyers are saving all invoices as a pdf into our google drive. Our current zap is triggered by a new file in Google drive. When it finds the file name it looks up records with the order # saved as a pdf (a formula we combined order # and pdf). When the order numbers align it updates the record with the attachment of the invoice. We have run into a problem when we purchase multiple items from a single store all with the same order #. Only one record will get updated and the rest of the records do not get updated with an invoice photo. Is there some workaround so that all the records with the same order # all get the same invoice photo? Or any advice on another way to make this happen?
Hi
Good question.
One option is to create a looping Zap that continues to query for matching records until none are found, but that can be Task intensive.
The other more advanced option is to use the Airtable API via a Webhooks - GET action step to query for matching records, then process those each using the Looping app.
I have attempted to mess around with the looping zap and cannot find a way to find all those with the same invoice name to attach the same invoice pdf to all of them. It still is only attaching an invoice with the first record it finds with the matching pdf name.
My current Zap is as follows:
- Trigger
New pdf file in folder in google drive- ex. 222.pdf
- Action
Find record in Airtable- It searches for a field value matching the title of the pdf. Value = 222.pdf
- Action
Update record in Airtable- that invoice pdf links to the Invoice field
So what I’m trying to accomplish is if I have one invoice pdf in google sheets named 222.pdf I want it to update multiple records with the matching field name 222.pdf. I’ve tried adding the looping feature at various points in this zap and no matter where I put it it does not find and update more than one record. I’m not sure I am understanding how this works and there is little information online on how to use this feature. I’m not even sure if what I want it to do is possible since it seems like most examples people use looping for is to create new records and I just want to update mine with the invoices attached from google Drive.
If you still need help after reviewing the below, then consider hiring a Zapier Expert: https://zapier.com/app/get-help
There are 2 similar, but different concepts of “loops”.
LOOPING APP
The Looping app will handle line items and will work with the advanced approach of using the Airtable API to retrieve multiple records.
App APIs can be used with the Webhooks app as an action step in Zaps.
LOOPING ZAP
NOTE: In your use case, you’ll need another Zap that is configured like this:
- Trigger: GDrive - New File in Folder
- Action: POST Webhook
- Uses the Webhook - POST action
- Send the GDrive file as part of the data payload
- Uses the Webhook - POST action
Zap Steps
- Trigger: Webhook - Catch Hook
- Used to trigger this looping Zap
- Action: Airtable - Find Record
- Used to find an existing record
- Create a new View that has Filter conditions where the Attachment field is empty, that way each time the Zap loops it will search for a record that has no PDF attached yet
- Action: Filter
- Used to check if an Airtable record was found in Step 2
- Action: Airtable - Update Record
- Map the Record ID from Step 2
- Update the Attachment field with the PDF from Step 1
- Action: Webhook - POST
- Used to trigger the Zap again
- Send the PDF value thru again
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.