My outbound tools save me days of work at a time, which is one of the many reasons why I love them.
Unfortunately most of them lack proper reporting features : APIs, integrations, exports ...
It can get very rough getting an simple overview of your outbound channels if you have not invested heavily in an all-in-one soultion.
I have ran into this issue with a super efficient tool for LinkedIn prospecting: ProspectIn.
I run 4 SDR LinkedIn accounts, and the only way for me to get the prospectIn data is to either check the company dashboard :
or read the company report which can be sent daily by email and looks a little something like that:
In an ideal world, i'd be able to gather all the data daily and do queries over time that I could show in a dashboard.
So I made that ideal world happen !
Here's how:
- I setup a Zapier trigger which sends the content of every company report received to a custom webhook (because i avoid at all costs using the Gmail API)
- On reception, the webhook proceeds to scrap the relevant data out of the HTML email and send it to a database (here a Mongo DB)
- To be able to use the data at wish, I created a simple query API
- I used Retool to plug my API and build my little shareable dashboard
Let's get into the nitty gritty:
Creating the webhook and the trigger
The Zapier trigger
First I applied a Gmail filter applying automatically a label to every Prospectin company report received:
That way I can setup a reliable Zapier trigger based on the prospectin-report label:
What we want next is to send the HTML content of the parsed email to our custom webhook.
I explain how to create a webhook 2 minutes in a post here.
A "hello world" POST hook as shown in the article is OK for now, we just need the URL to continue setting up the Zap:
I POST a JSON object in the body of the request with the "html" key containing the email body in HTML, which I'll fetch in the updated script of the webhook.
The webhook
After a bit of crash coding here's how I scraped the email using BeautifulSoup:
What is done here is the following:
- I parse the table
- For every member of the table (every SDR) I scrape the number of actions made based on the one thing that helped me locate it for sure : the action icon URL ! (Thankfully they persist from email to email) For instance the link https://i.ibb.co/R0VPN8M/icon-link.png represent the "Invites sent" action.
- I add a scraping date because I want to be able to query this data based on date
I use pyMongo to store the results afterwards. MongoDB is very flexible for these types of projects and you can get a cluster for free at MongoDb Atlas. (I've used one for more than a year on multiple projects without needing to upgrade)
The query API
The formatting is a little odd so I use the Pandas library to help me out.
What's done here is:
- Parsing of the last_days parameter, if last_days = 7, i'm querying the results up to 7 days from now
- Connection to the mongoDb
- Query of the database based on the last_days parameter
- Calculation of the stats of each SDR based on their name
- Output the result as an array thanks to the to_dict() Pandas method
Once everything is put together and deployed, I can make calls which would look simply like this in Postman:
And the output would look like this !
You can now already have fun with your newly built API !
If you want to replicate this, you can find the whole repo below ready to clone and deploy on AWS.
The Retool Dashboard
Retool helped me personally at Quable since I'm the only one playing around with these kind of data and APIs in our business team.
With Retool's interface, I'm able to create dashboards and tools everybody can understand and use.
So to create our dashboard there, I create a new project from scratch, then I add a header and a table (right nav menu).
These tables are fabulous:
- They are freely resizeable
- They are paginated
- You can move the columns around
- You can sort anyway you'd like
- You can change dynamically based on the queries assigned to them
Let's tell our table to call our API and show our hard earned data.
Right now my table is only showing sample data:
On the right nav menu, when you click on your table, the inspect tab is highlighted and shows that it pulls its data from "query1":
"Query1" should appear in the menu below.
Let's modify it, by clicking on Resource and setting it to RESTQuery. We can then paste the URL we used for our Postman request :
Now let's click on "Save & Run" and see the changes:
And there it is ✨ ! Our custom dashboard is ready to use.
If you made it to the end : I'm really curious, have you ever found yourself in this situation ? With what tools ? How did you cope with the problem ? Let me know on Linkedin or shoot me an email. Don't hesitate to contact me also if you need any more technical details of this post.
I'd also like to thank Toinon from ProspectIn and Waalaxy giving me his blessing to write this article !