> ## Documentation Index
> Fetch the complete documentation index at: /help/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Sheets

> Start a LinkedIn campaign from new Google Sheets rows with Zapier, Make or Apps Script, and write statuses back.

> [!NOTE]
>
> **Pro plan.** Google Sheets works through trigger URLs and HTTP steps, which are part of Pro and Agency (and the free trial). Anything you already have keeps working on every plan. See [Plans and billing](/help/account/billing.md).

Each new row with a LinkedIn profile URL becomes a contact in your campaign. Google's Sheets API needs a Google sign-in, so the hand-off goes through Zapier, Make or a small Apps Script on the sheet.

> [!NOTE]
>
> **How it connects:** Kerux's trigger URL, fed by Zapier's Google Sheets app, Make, or [Apps Script](https://developers.google.com/apps-script/guides/web) (`UrlFetchApp`).

## Before you start

* **A column with LinkedIn profile URLs.** Rows without one are refused, because Kerux knows people by their LinkedIn profile.
* **For a one-time list**, you don't need any of this: import the sheet as a CSV in **Contacts**, which checks every row before saving.

## Option A: Zapier

**1. Copy the Kerux trigger URL**

In Kerux, open the campaign, click **+ Add** on the **Trigger** half of the start box, choose **Incoming webhook (API)**, click **Add**, then **Copy link**.

**2. Trigger**

**Google Sheets > New Spreadsheet Row**, pick the spreadsheet and worksheet.

**3. Action**

**Webhooks by Zapier > POST** (paid Zapier plans): URL = the trigger URL, Payload Type = json, Data = `linkedin_url`, `first_name`, `last_name`, `email`, `company` from the row's columns.

## Option B: Apps Script, no Zapier

In the sheet, open **Extensions > Apps Script**, paste this, put your trigger URL in `KERUX_TRIGGER_URL` and add an installable trigger **On form submit** or **On change** (or run it on a time trigger) for `sendNewRows`:

```javascript theme={null}
const KERUX_TRIGGER_URL = "https://www.usekerux.com/t/YOUR_TRIGGER_TOKEN";

function sendNewRows() {
  const sheet = SpreadsheetApp.getActiveSheet();
  const rows = sheet.getDataRange().getValues();
  const head = rows.shift();
  const col = (name) => head.indexOf(name);
  rows.forEach((r, i) => {
    if (r[col("sent")] || !r[col("linkedin_url")]) return;
    const res = UrlFetchApp.fetch(KERUX_TRIGGER_URL, {
      method: "post",
      contentType: "application/json",
      payload: JSON.stringify({
        linkedin_url: r[col("linkedin_url")],
        first_name: r[col("first_name")],
        email: r[col("email")],
        company: r[col("company")],
      }),
      muteHttpExceptions: true,
    });
    if (res.getResponseCode() === 202) sheet.getRange(i + 2, col("sent") + 1).setValue(new Date());
  });
}
```

It expects headers `linkedin_url`, `first_name`, `email`, `company` and an empty `sent` column, and marks each row it sent. Kerux answers `202` with `{ "data": { "enrolled": 1, "already_in": 0, "lead_ids": ["..."] } }`; a person already in the campaign is never added twice.

## Write statuses back

In the **When the contact replies** box, add **Send to another campaign** and pick a short campaign whose **Webhook / HTTP** step POSTs `{"linkedin_url": "{{contact.linkedin_url}}", "status": "Replied"}` to a Zapier **Catch Hook** (or a Make **Custom webhook**). The Zap finds the row by LinkedIn URL (**Google Sheets > Lookup Spreadsheet Row**) and updates it (**Update Spreadsheet Row**).

## Test with one contact

Add one row with your own LinkedIn profile and check it appears in the campaign (the Zap's history or the script's log shows Kerux's `202`).

## Common errors

> [accordion] 422 VALIDATION\_FAILED
>
> The row's LinkedIn URL is empty or isn't a profile link.

> [accordion] Apps Script asks for permission
>
> The first run asks you to allow external requests (`UrlFetchApp`). Allow it with the Google account that owns the sheet.

Related: [Trigger URLs and forms](/help/developers/trigger-urls-and-forms.md), [Import contacts](/help/getting-started/import-leads.md), [Airtable](/help/integration-guides/airtable.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.