Automatically Find Decision Makers from Company Names & URLs

With this workflow automation, you can automatically find decision makers' names and LinkedIn profile URLs from a list of company names and domains
⭐⭐⭐⭐⭐ 374+ Lead Gen founders are going to next level with us.

How this workflow automation works?

Google Sheet

We use Google Sheet to store our data

App Script

We use App Script to run a custom script

Expandi

You can use Expandi to reach out to people on LinkedIn

Let's break it down

This workflow automation will automatically find you decision-makers (first Name, last Name, and LinkedIn profile URL) from a list of companies.

For this automation to work, you must have a Google sheet with company domains and names and one column containing the job title you’re looking for (i.e., CEO, marketing manager, head of sales, etc.).

So, let’s see it in practice.

How do you easily find decision-makers?

  1. Open a Google sheet containing the company name and company domain
  2. Go to Extensions > App Script

  1. Delete everything you have so it remains blank:

  1. Copy & paste the code below:
/**
* Find a LinkedIn profile from company name and job title
*
* @param {string} companyName company where your prospect is working
* @param {string} [jobTitle] job you are targeting, default value is "CEO"
* @return if found the LinkedIn URL and name of the prospect
* @customfunction
*/

function getPerson(companyName, jobTitle = "CEO") {

// Get a Custom Search API Key

// Follow this link to get it https://developers.google.com/custom-search/v1/overview
var key = "YOUR API";

// Create a Programmable Search Engine

// Follow this link to create it -> https://programmablesearchengine.google.com/
let searchEngineId = "YOUR KEY";

// Save your project and it's ready to use
let search = "site:linkedin.com/in intitle:" + jobTitle + " " + companyName;

// Call Google Custom Search API
var options = {
method: "get",
contentType: "application/json",
};
var response = UrlFetchApp.fetch(
"https://www.googleapis.com/customsearch/v1?key=" +
key +
"&q=" +
search +
"&cx=" +
searchEngineId,
options
);

// Parse LinkedIn URL and name
var url = JSON.parse(response).items[0].formattedUrl;
var title = JSON.parse(response).items[0].title.split("-")[0];

// Return the results in a 2D array
return [[title, url]];
}

When entered, your App Scrip dashboard should look like this:

Now it’s time to find your API and KEY so we can run this script.

Leave this tab open. Now, let's find your key:

  • Go to the “Basic” on the left side, and copy the Search Engine ID. That’s your “key”.

  • Now, update the code in App Script with your API and KEY, the same as in image below:

  • Now we’re done with setting up our script. It’s time to run it. Go back to your Google Sheet, and add the formula “=getPerson(NAME OF THE COMPANY)” in the first cell in the first free column on the right side. 
  • Paste the formula in other rows as well.

As a result, you’ll get decision-makers for the majority of the companies, as well as their LinkedIn profiles:

And that’s it! In 5 minutes you have a list of hundreds of LinkedIn profiles and decision makers.

If you do your outreach on LinkedIn, you have everything you need. But if you need emails, you can always quickly upload this sheet to Apollo or Snov.io, and you’re ready to go.

Let’s go hustling.

P.S.

If you didn’t already, subscribe to our exclusive newsletter where we share real-life and expert insights on how to grow your Lead Gen Agency to over $240k/yr in less than 60 days.

You can subscribe here.

Join 374+ other LGA founders in our exclusive newsletter

Every week you get a new mind-blowing insights on how to run, grow & operate your LGA.
⭐⭐⭐⭐⭐ 374+ Lead Gen founders are going to next level with us.
By subscribing you agree to our Privacy Policy.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.