Skip to main content

Hi there, I’m new to Zapier! 😁

We’ve created a zap which collects data (email & newsletter id) via webhook and then does the follwoing:

  1. Checks if a contact exists in Salesforce by matching the email
    a) If not creates a new Contact and then continues with 2. 
    b) If it does exist it continues with 2.
  2. Checks if the newsletter exists in Salesforce by matching the newsletter id
    a) If not creates the new newsletter
    b) If it does exist do nothing 

The zap works fine but what we’re looking for a more efficient way to handle this, i.e. collect the incoming data in a table and then process the collected data i.e. every 15min. in one zap. 

I know that we can use Zapier Tables to collect the data and Delay to schedule it. However, I’m not sure how we can make sure the data is processed correctly and then also pushed out again once it has been processed. 

Does anyone know how we can handle this correctly?

Many thanks

Benjamin

Hello @BenjaminAe, welcome to the Community! 🎉 

I’m a little confused as to how the webhook can send a Salesforce ID for the newsletter before it’s been created by the Salesforce action that searches for it. Is it that the ID for the newsletter is being used as the name or as a secondary unique ID for the newsletter? As presumably the ID for the newsletter object in Salesforce will differ from the ID generated by the different app that’s sending the webhook. Can you tell me a bit more about what app is sending the webhook, is it a website or form of some kind for example?

Changes made in Zapier Tables are pretty instantaneous, if you were to create a Zap that triggers on new data that’s added/updated in the table it would trigger as soon as it received the new/updated data, not every 15 mins. Can you share some further details on the need for the 15 minute delay and what you mean by having the data processed correctly - is it that you’re wanting to manually approve that the data is correct before carrying out subsequent actions?

Sorry for my confusion here, if you can share some further details and screenshots of the current setup of your Zap that will help us some more context so we can better offer suggestions on how to make the current workflow more efficient. Please remove/hide any private information (like names, emails, addresses etc.) from any screenshots before sharing.

Looking forward to hearing from you!


Hi @SamB thanks for your reply. The Newsletter ID we’re collecting is actually the name. I.e.”MA01”.

We then check if the corresponding Newsletter record already exists with the Contact. If not, we create it. 

Regarding the webhook, we’re using a website to send the webhook. And the submission itself works just fine. However, it can be that a person is subscribing for multiple Newsletters and there can be a certain delay until we receive all those requests in. Thats why we wanted to use Zapier tables to first collect the data and wait for lets say 15 min before we actually proceed with the data handling in Zapier in order to make sure its more efficient as we want to be sure we collected all the NL subscriptions per User before proceeding with the data handling. 

Following you find our current setup:

I hope this helps to better understand what we’re trying to achieve : ).

Thank you in advance for your help. 

Best Regards, 
Benjamin


Thanks for getting back to me @BenjaminAe! 🙂 

Hmm, if there are multiple webhooks that are sending the newsletter subscriptions for the same contact separately then perhaps you could add the newsletter IDs into a Digest that’s released after a Delay of 15 mins?

To do that you’d need to set the digest to be manually released and in another Zap, have a trigger that’s delayed for 15 mins followed by a
Release Existing Digest (Digest by Zapier) action. That way whatever newsletters are contained within the digest should be all the ones that the contact has just subscribed to. See Compile data in a digest in Zaps to learn more about how to set up a digest.

 

Here’s an outline of what I’m thinking:

Zap 1 - adds a new record in Zapier Tables and sends newsletter ID to the digest 

  • Trigger: Catch Hook (Webhooks by Zapier) - runs when a new webhook is received.
  • Action: Find Contact (Salesforce) - searches for the contact and creates them if not found.
  • Action: Find Record (Zapier Tables) - creates a record for the contact if one isn’t found - the first webhook would always create a new record with the first newsletter ID and user email address.
  • Action: Append Entry and Schedule Digest (Digest by Zapier) - uses the contacts email address as the name of the digest and Frequency is set to Manual.
  • Action: Only Continue If (Zapier Tables) - only allows next action to run if existing record was found.
  • Action: Update Record (Zapier Tables) - updates the record with the next newsletter IDs.


Zap 2 - triggers when the new record is created and releases the digest after 15 mins

  • Trigger: New Record (Zapier Tables) - runs when a new record is created.
  • Action: Delay For (Delay by Zapier) - set to delay the subsequent actions for 15 mins.
  • Action: Find Digest (Digest by Zapier) - searches for the relevant digest to be released using the table record’s ID. At this point Zap 1 should have added all the newsletter IDs to the digest.
  • Action: Release Existing Digest (Digest by Zapier) - releases the digest found by the previous action, that contains the relevant collected list of newsletter IDs.
  • Action: Create a loop from text (Looping by Zapier) - creates a loop for each newsletter ID in the digest.
    • Action: Find Record (Salesforce) - searches for the newsletter ID record and creates it if not found. 
    • Path A - Newsletter ID - If newsletter is found:
      • Action: Create Record (Salesforce) - creates reactive NL.
    • Path B - Newsletter ID - If newsletter is not found:
      • Action: Find Record (Salesforce) - searches for the NL Catalogue and creates it if not found. 

 

Do you think that sort of approach might work? If I've misunderstood what you're looking to do or you run into any issues in setting that up just let us know. Always happy to help further!


Hi @SamB thanks for your reply and the suggestion. Let me check on my end and then get back to you.