What should I use to track my outreach campaign activities?

Hello n8n lads,

I’m trying to understand what should be the easiest way to track all of the activities from my outreach campaign using their API.

Usecase:
This API allows me to set up webhooks for each type of email (sent/opened/bounced/replied) and I would like to pipe the data in a gsheet in order to generate some KPI’s reporting using Google Data studio.

Solution #1:
I tried to use this call api to get the past 100 activities from a campaign using a cron node to refresh data one, two or three time a day according the activity volume of a campaign.

It did worked but obviously, I got some duplicate data and it need some reprocessing in order to be relevant.

My guess was to use vlookup gsheet nodes to filter the data with three variables (creation time, account name, activity type) to check if the data was already in the google sheet.

It was a fail :sweat_smile: due to the fact that the triple check wasn’t simultaneous. It triggered some data from past activities (n.g an opening activity from another prospect or at an other time)

Solution #2:
My second try was then to set up 4 webhook for each campaign, one for each type of event which can occur. Less smooth and heavier to set up at a long term but I wanted my MVP working!

However, an error occured with a red sign in my workflow menu, saying that my workflow couldn’t run. But when I tried to see what was causing it in the workflow, I couldn’t get any details on it.

Questions:

  1. Is there a way to filter out new data that has already passed through the workflow before? (solution #1)

  2. Can a workflow be triggered by more than one webhook? (solution #2)

  3. Would you have a smarter way to deal with this usecase ?

Thanks a lot for reading and for your assistance, this community is really impressive and I love be a part of it.

I hope someday I could be able to give advices or solutions to some newcomers!

Best regards!

1 Like
  1. Is there a way to filter out new data that has already passed through the workflow before? (solution #1)

Yes, by checking with an external data store. I would not recommend this approach as the API has support for webhooks.

Can a workflow be triggered by more than one webhook? (solution #2)

Yes, that is correct. Probably the error is with one of the function nodes. Did you test all possible events in test mode before activating the workflow? If not, you can still figure the error by opening the execution where you saw the red sign and clicking on the orange folder-like icon (Right). Check the image below.

  1. Would you have a smarter way to deal with this usecase ?

You do not have to create a workflow for each campaign you want to track. When you create the hook (in Lemlist), the campaign ID is optional. If not set then Lemlist will notify you when all of those events happen across all campaigns. Meaning you can use just one workflow to track as many campaigns as you want. In case you wanted to filter, you can still do that with an IF node. Also, not sure if it’s really needed one function node after each Webhook. What is that for? Have the feeling that whatever it’s, it can be achieved with just one function node.

1 Like

Hello Ricardo,

Thanks for your lights, it’s true I don’t need to set up a specific webhook for each type :exploding_head:

About the function nodes, It was a try because I thought it could correct the error that occured.

I’m going to try if a single global workflow can do the job !

Thanks again!