- Convert Code
- Posts
- Revolutionize Your Reports: Unlocking Automation for ActiveCampaign Metrics!
Revolutionize Your Reports: Unlocking Automation for ActiveCampaign Metrics!
Automations & AI For Busy People
Hi, I’m Graeme, for the last 6-7 years I’ve been heads down building automations for a multi-million dollar company. Now I’m sharing a newsletter that will help YOU build automations and tools that don’t require any coding skills.
Revolutionize Your Reports: Unlocking Automation for ActiveCampaign Metrics!
TLDR - “Too Long Didn’t Read” ⏰
📢 A friend wanted to automate the collection of campaign metrics for ActiveCampaign.
📉 Currently, metrics are manually collected and placed in a spreadsheet three days after a campaign.
🤖 Created a test automation for AdSkills.com using Zapier.
🔌 The automation interfaces with the ActiveCampaign API, using Postman tool to verify API responses and ensure proper data retrieval.
🔄 If Zapier doesn't provide a specific feature, the API documentation can be consulted to find a workaround.
🎉 The automation saves time and allows team members to focus on other tasks.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/8a2569b6-8963-41d1-9e87-623515c42628/convertcode_a_black_and_white_cartoon_image_of_an_efficient_rob_2d93ca4a-7aee-42b5-98cb-f79054267324.png)
"Without automated metrics, emails lack 'sent'ience!" - The ConvertCode Bot 📰 🙄
Understanding the Brief
I had a friend reach out to ask for help with automating the collection of campaign metrics for ActiveCampaign. Currently, after three days, a team member collects the metrics for each campaign and drops the relevant metrics into a spreadsheet.
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/62bcf032-a6dc-4e87-9cb8-97f8be3d4501/Screenshot_2023-10-16_at_09.03.52.png)
The idea was that perhaps this could be automated to release that particular team member so they could focus on other things.
So I knocked this together for AdSkills.com, and this is the flow of the automation built inside of Zapier.
Campaign Triggers
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/554aaabc-5cb0-4f5b-a634-c3e35cb6f1c3/Screenshot_2023-10-16_at_09.09.31.png)
When a new campaign is sent, it's looking for new campaigns as they go. So a new campaign sends, and it's tied to a particular list. In this case, it's the AdSkills Edge list. And we hit continue. And I've pulled in a sample, a much older sample data so that we can get the step going. Continue.
Implementing a Timely Response
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/6a76aec4-158f-4daa-a5c8-220c75cee9d3/Screenshot_2023-10-16_at_09.11.12.png)
Because the brief was that the metrics are not to be collected until three days after send, then we just put in a delay by Zapier step.
Integrating with the API
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/6c018a6f-46fa-49c7-a869-bcaeb2332c7c/Screenshot_2023-10-16_at_09.12.07.png)
This step is tied to the API, and it's useful to build out the API options inside of Postman. I won't go too much into how to use Postman in this particular video, but... I get the results that I'm looking for, and then I can port them over into Zapier or Make, or whatever we're using.
So we're going to get data from the API as it relates to the campaign, pulling the data back into Zapier.
Utilizing Postman for API Testing
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/196fe830-040c-4030-b804-1c330ca1c9f2/Screenshot_2023-10-16_at_09.15.22.png)
So if I was to go to Postman, I can find within these folder structures, I can search for the one I'm looking for. So get company by ID and then I would hit send.
Once I'm all set up, updated variables, hit send, and then it shows me that I've got the correct status. So once I know that I've got it working, then I can go back and build it in Zapier.
Finalizing Data Points and Spreadsheet Integration
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/7426d96d-9fed-469f-95fd-459cf8234aa3/Screenshot_2023-10-16_at_09.18.02.png)
And then, for the Google sheet at the end of the automation, I went back to step three and I looked to see what's available to me.
What does the API send back to me? What can I get?
So if I go to the test step and see what they sent back to me, I can scroll all the way down and see the data points.
What do I want to keep? I built that out in just a simple text document.
I decided I want to keep the name of the campaign, the number of people that we sent that particular campaign to, the number of people who opened. So I've just pared it down to the number of data points that I would be interested in.
Bridging Zapier with Google Sheets
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/e3f11809-a064-46e8-84dc-93631900e9cc/Screenshot_2023-10-16_at_09.21.07.png)
So then I take each of these data points even with their own variable names, names, send amount, total amount, opens; and I take that across to the spreadsheet.
I create a column header, each of the columns within the Google Sheet.
And I can go back to the Zap, to step 5, and I can refresh the fields.
And when I hit refresh on the fields, that pulls in each of the column headers from the spreadsheet that I've connected to. And then I can go ahead and start to pull in the data.
Overcoming Challenges with API Documentation
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/e0494b77-edb2-44b2-9a17-76329760a140/Screenshot_2023-10-16_at_09.22.25.png)
So when Zapier tells you that it doesn't have the option available that you require, then that's not the end of the road. You go to the API documentation, and see if you can find what you need from within the documentation.
And if you think you can find it in the API, you can probably tie it to a glue service like Zapier or Make and still get the results that you're looking for.
I can publish at the end. And that gives us our automation so that every time a campaign runs…
We're going to grab the campaign ID.
We're going to wait for three days.
We're going to use that campaign ID after three days to pull the metrics.
And then we're going to send the data into a Google Sheet.
Streamlining Data Management in Google Sheets
And the only other step, once I get into the Google Sheet, is because this particular account would have multiple different newsletters - we would just have to focus on the naming convention so that we could do a simple filter for multiple tabs on the Google Sheet.
Gather the relevant newsletter sends, pull them into their own tab within this Google Sheet. So we've automated the process, saved some time for a team member, allow them to focus on something else.
And we can move on to the next automation to save some more time.
That's how we do it.
“Then Jesus said, “Come to me, all of you who are weary and carry heavy burdens, and I will give you rest.” - Matthew 11:28
❤️