Count the Leads and Send an Alert | Community
Skip to main content
New Participant
May 1, 2024
Question

Count the Leads and Send an Alert

  • May 1, 2024
  • 1 reply
  • 1014 views

If any one can help with below requiremnet

 

Data Limit of 2000 leads per day – each day and if threshold meet then alert will send on particular email.

Additional email if over 10K – each day

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
New Participant
May 1, 2024

Only with the use of a separate app. There’s no internal trigger/filter for the overall number of records.

ReetuDe1Author
New Participant
May 2, 2024

Thanks @sanfordwhiteman 

 

Could you please provide the app name or we can achieve this with API 

 

Thanks

SanfordWhiteman
New Participant
May 3, 2024

You can use the Get Lead Changes API endpoint to see people created since a given timestamp (i.e. check the leads for that day). While that endpoint is quite simple, obviously you’d need some dev experience plus a reliable way to run the code on a schedule.

 

If you want to avoid using the API entirely, you can log new leads to a Google Sheet using a Marketo webhook. See my old blog post to learn how that’s done.

 

Then using a 2nd Marketo webhook, compare the count of rows in the Google Sheet where <created_date_column> = <todays_date>. As a hint, the VQL to accomplish that is:

 

select true where E = date '{{system.datetime}}' LIMIT 1 OFFSET 2000

 

 

If that returns any row with the value "true", that means there are more than 2000 rows matching the query.