Skip to main content

How to Process Records with a Sequential Queue using Webhooks and Zapier Tables

 

Contribution by Troy Tessalone

Premier Certified Zapier Expert at Automation Ace.

 

Alternative: Simple Sequential Queue

Before using the advanced approach below, explore using the native Zap app and action for simple sequential queuing for Zap Runs.

App: Delay

Action: Delay After Queue

Note: This will create sequential queuing, but does not guarantee the entire Zap Run will finish before the next Zap Run continues to process.

Help: https://zapier.com/apps/delay/integrations#help

Other Delay options for Zaps: https://zapier.com/apps/delay/integrations#triggers-and-actions

 

Goal: Advanced Sequential Queue

Used to create an advanced sequential processing queue for records to process in order without a delay between Zap Runs, where one Zap Run finishes before the next Zap Run begins.

Same concept as FIFO (First IN, First OUT), basically “first come, first served”.

You can configure the logic with multiple Zaps using these apps:

 

Zaps

Zap 1

Used to add records to the 2 queues.

  1. Trigger: tAPP] - [event]
    1. UP TO YOU
  2. Action: Zapier Table - Create Record
    1. Table: Queue - Records
    2. Add the core record data you want to process
  3. Action: Zapier Table - Find Record
    1. Table: Queue - Control
    2. Enable the checkbox to Create Record if not found (screenshot)
      1. Search by the same value each time.
        1. Field: XXX
        2. Value: TRUE
    3. A new record will only be created if there are 0 existing records.

 

Zap 2
Used to trigger Zap 3 when there is 1+ new records to process.

  1. Trigger: Zapier Table - New Record
    1. Table: Queue - Control
  2. Action: Webhook - POST
    1. Use the webhook url from Zap 3, Step 1
    2. Include a timestamp parameter
      1. Help: https://zapier.com/help/create/customize/insert-the-time-your-zap-runs-into-a-field

 

Zap 3
Used to cycle thru the existing queue of records to process until no records are found.

  1. Trigger: Webhook - Catch Hook
    1. NOTE: If you ever need to manually trigger this Zap, just fire the webhook URL.
  2. Action: Zapier Table - Find Record
    1. Table: Queue - Records
  3. Action: Paths
    1. Action: Path A
      1. Action: Filter
        1. Continue if Step 2 records count > 0
      2. Action: /APP] - :EVENT]
        1. UP TO YOU
      3. Action: Zapier Table - Delete Record
        1. Table: Queue - Records
      4. Action: Webhook - POST
        1. This will retrigger the same Zap 3
        2. Use the webhook url from Zap 3, Step 1
        3. Include a timestamp parameter
          1. Help: https://zapier.com/help/create/customize/insert-the-time-your-zap-runs-into-a-field
    2. Action: Path B
      1. Action: Filter
        1. Continue if Step 2 records count = 0
      2. Action: Zapier Table - Find Record
        1. Table: Queue - Control
          1. Field: XXX
          2. Value: TRUE
      3. Action: Zapier Table - Delete Record
        1. Table: Queue - Control
        2. Map the Record ID from the previous step
        3. Used to delete the existing record so Zap 1 can add a new record when needed, which will trigger Zap 2 again, and thus fire Zap 3 

 

Sit back and watch your Zaps process records sequentially via the queue!

Thanks so much for sharing this helpful guide, ​@Troy Tessalone! I’m sure plenty of folks in the Community will find it super useful!  🧡 


Reply