Daily decision maker roster from target accounts

By General Input

Every weekday at 6am, refresh a sheet of VPs, Directors, and Heads at your target accounts so your reps wake up to a current contact list.

Integrations

  • Coresignal
  • Google Sheets

Type

Deterministic Code

Categories

  • Sales

Build a code workflow that runs on a cron trigger every weekday at 6am local time and refreshes a decision maker roster in a Google Sheets spreadsheet.

Inputs the workflow should accept: the Google Sheets spreadsheet ID, the name of the source tab (default "Accounts") with two columns (company name in column A, website domain in column B), the name of the output tab (default "Decision Makers"), and a hard cap on employees per company (default 7, allowed range 5 to 10).

Step 1. Use Google Sheets Get Values to read the Accounts tab range (for example Accounts!A2:B). Each row gives a company name and a website domain.

Step 2. For each account row, call Coresignal Enrich Company by Website (Multi-source) with the website domain to resolve the company to a Coresignal company ID. If the enrich call returns no match, skip the row and continue.

Step 3. For each resolved company ID, call Coresignal Search Employees (ES DSL) (Multi-source) with a fixed Elasticsearch DSL query held verbatim in the node. The query is a bool with a must clause that term-filters on the company ID (active employment) and a should clause that regex-matches the current job title against the patterns VP, Director, Head, Chief, and Founder (case insensitive). Set items_per_page to the configured cap. Sort by score so the most relevant titles come first.

Step 4. Take the top N employee IDs from the search result (N = the configured cap, default 7). For each ID, call Coresignal Collect Employee by ID (Multi-source) to pull the full profile. Extract: full name, current job title, location, and the professional-network shorthand URL.

Step 5. Build one output row per person with these columns in this order: source_company, source_website, full_name, current_title, location, profile_url, fetched_on (today's date in ISO format), and dedupe_key. The dedupe_key is the source company slug concatenated with the profile shorthand (for example "acme-corp::jane-doe"). This is the stable key used to dedupe across reruns.

Step 6. Before appending, read the existing Decision Makers tab and collect the set of dedupe_keys already present. Drop any new row whose dedupe_key already exists, so reruns do not create duplicates. Then call Google Sheets Append Values on the Decision Makers tab with the remaining new rows.

Keep the pipeline deterministic. The ES DSL query template is fixed text in the workflow, not generated at runtime. The per-company cap is a hard ceiling so Coresignal credit spend scales predictably with the number of accounts in the sheet. Handle Coresignal 404 (company or employee not found) and 402 (insufficient credits) gracefully: log and skip the row, do not fail the whole run.

Use Google Sheets as the integration for both the read and the append, and Coresignal as the integration for company enrich, employee search, and employee collect.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seatsBuild audience segments from product usage and push to LoopsTurn the people who engage with your posts into Pipedrive leads