How to Extract Data from LinkedIn Job Application Emails

| | 3 min read

Posting Jobs on Linkedin is easy; the results are perfect for us. For the Digital Marketing Executive position, we got around 769 applications in 7 days. The only problem is its limitation in managing job applications with in Linkdin.

Linkedin Job
  1. There is no option to delegate the filtering of candidates who applied for the position. - This feature might be there with the dedicated Linkedin Recruiter account, but the standard job feature does not have anything fancy.
  2. There is no option to filter candidates by experience, current job role, location etc.

Manually reviewing the 769 applications is challenging. Adding your custom job application page to the job post can solve this, but that will affect the smooth user experience, and you can lose good candidates applying for the job you posted.

If you choose Linkedin to receive the applications, you will get an email with some details of the candidates. It will give you the following information:

  • Name of the candidate
  • Current Linkedin title
  • Location
  • Experience
  • Education
  • Responses to 2 required screening questions
  • Responses to 2 optional screening questions
Linkedin Email - Plain Text

If you carefully put the questions, you can collect more information to filter the candidate.

Once you have the email in your inbox, you have some control over the data. I use Gmail to receive emails. The first step was to create a filter that meets the following conditions:

from [email protected]
Subject include: New application: <Your job post title>

You can then connect Gmail to your favourite email client. I use Evolution. You can also use Thunderbird or any other email client to export the emails to Mbox format. The email client needs to be set up to fetch emails from Gmail via IMAP.

It will show all your filters as folders, and you can select the folder from which you want to download the emails.
You can now select all the emails and save them as a Mbox file. Once you have the Mbox file, you can use a simple python script to extract the "plain text" part from the email and use that to extract the details you need.

I use the following script to extract the email body in text/plain part from each email and store it in a text file. The mailbox Python module comes in handy here.

import mailbox

def get_plain_email(email):
    body = ''
    if email.is_multipart():
        for part in email.walk():
            # Find the text/plain section and get the body
            if part.is_multipart():
                for spart in part.walk():
                    if spart.get_content_type() == 'text/plain':
                        # Get the message body
                        body = spart.get_payload(decode=True)
                        body = body.decode("UTF-8")
    return body


mbox = 'filename.mbox'
#file to store the body part of each emails
f = open("output.txt", "w")
for email in mailbox.mbox(mbox):
    body = get_plain_email(email)
    f.writelines(body)
    f.write('\n')
    f.write('~END-OF-EMAIL~\n')
f.close()

Now you have the text file to extract the required data. I have used another Python script to go through the file line by line, read the relevant data and store it in a dictionary data structure.

{
  'name':
  'linkedIn-title':
  'location':
  'past-experience':
  'education':
  'phone':
  'ans1':
  'ans2':
  'ans3':
  'ans4':
}

The csv module comes with the DictWriter method to create a csv from dictionaries.

If you are interested in the code I have written to extract the above details from the intermediate file, please checkout our github repository

Now my CSV is ready with 769 applicants' information to be processed in a spreadsheet. I've used that to do the initial filtering and pass the data to my team for further processing.

For us, MarTech is all about automation. We use that internally to optimize what we have and our customers to run their digital marketing machine.

Update: I have posted the 2nd article in this series, "How to extract email addresses from resumes."

Let's talk about how we can support your Marketing team in solving their technical problems.

If you are interested in working with Zyxware Technologies, Engineering, QA or Marketing Technology departments, checkout our careers page.

You can also connect with me on Linkedin if you have any questions related to this article.