# Make blueprints for Cornersight

**Not tested in Make.** Nobody has imported these files into a Make account yet. Read "Tested / Not tested" below before you rely on them.

These three files do the same jobs as the n8n files in `../n8n/`. Same fields, same filters, same sheet columns, same Slack message.

| File | What it does |
|---|---|
| 01_cornersight_lead_log_google_sheets.blueprint.json | Every Cornersight lead becomes a row in a Google Sheet. No duplicates (it checks `leadId` first). |
| 02_cornersight_hot_lead_slack_alert.blueprint.json | When an ICP lead **comments**, you get a Slack message. |
| 03_cornersight_content_brain_google_sheets.blueprint.json | One row per LinkedIn post your keywords and creators surface. Feed for your AI writing tool. |

## Before you start

You need:
- A Make account.
- A Google account (files 01 and 03).
- A Slack workspace where you can add apps (file 02).
- A Cornersight source where you can paste a webhook URL.

Make the Google Sheet first. Put the header row in row 1, starting at A1, in this exact order.

- File 01: a tab called **Leads** with: leadId, detectedAt, name, jobTitle, company, companyDomain, companyIndustry, companyStaffRange, country, linkedinUrl, email, isIcp, engagementType, commentText, postUrl, source
- File 03: a tab called **Content Brain** with: postUrl, postedAt, keywordOrCreator, author, authorTitle, authorLinkedin, postText, lastSeen

Column A is the key. Don't move it.

## How to import (all three files)

1. In Make, click **Create scenario** (or **Create a new scenario**).
2. Click the three dots (**...**) at the top right of the editor.
3. Click **Import Blueprint**.
4. Click **Choose File**. Pick one of the `.blueprint.json` files.
5. Click **Save**.
6. Click the first module (**Webhooks**). Next to **Webhook**, click **Add**. Give it a name. Click **Save**.
7. Copy the webhook URL Make shows you.
8. Paste that URL into Cornersight: your source, then webhook settings. Use one webhook URL per scenario.
9. Back in Make, click **Run once**.
10. Send a test lead from Cornersight. Make reads it and learns the fields. This is the "Redetermine data structure" step. In newer Make versions the button is called **Detect new values**.
11. Connect your accounts in the other modules (see the next section).
12. Click **Save**. Turn the scenario **on**.

Do step 10 before you check the mappings. Until Make has seen one real lead, the mapped fields show as plain text, not as fields.

## What you must connect

Connections are empty in these files on purpose. Nothing in them points at a real account, sheet or channel.

**File 01 (lead log)**
- **Google Sheets - Search Rows**: connect Google. Pick your Sheet. Tab: Leads.
- **Google Sheets - Add a Row**: same Google connection. Pick the same Sheet and tab.

**File 02 (Slack alert)**
- **Slack - Create a Message**: connect Slack. Set your channel. It says `#hot-leads` now. Change it, or pick your channel from the list.

**File 03 (content brain)**
- **Google Sheets - Search Rows**, two **Update a Row** modules and two **Add a Row** modules: connect Google in all five. Pick the same Sheet and the **Content Brain** tab in each.

If a Google module asks again for the column mapping after you pick the Sheet, check that each value sits next to the column with the same name.

## How each one works

**01. Lead log**
Webhook -> Search Rows (column A = `leadId`) -> Array aggregator -> Add a Row.
The Add a Row filter only lets the lead through if the search found nothing. So retries never make a second row.
The aggregator is there because Search Rows can give nothing back when there is no match. The aggregator always gives back one bundle, so the filter can check "found 0 rows".
`email` is only filled if you connect your own email finder in Cornersight.

**02. Hot lead alert**
Webhook -> filter "ICP comment?" -> Slack.
The filter needs both: `isIcp` is true, and `engagementType` is `Comment`.
Want likes too? Delete the second condition in the filter.
The message:
```
:fire: *Name* (Job title at Company) commented:
> comment text
Post: post URL
Profile: LinkedIn URL
```

**03. Content brain**
Webhook -> Search Rows (column A = `postUrl`) -> Array aggregator -> Router with 4 routes:
1. Post already in sheet + this lead is the Author: update the whole row.
2. Post already in sheet + a like or comment: update the post columns and `lastSeen`. Author columns are not touched.
3. New post + Author: add a row with author details.
4. New post + like or comment: add a row without author details.
Leads with no post text are skipped. So 50 people liking one post = one row.

## Optional: check the signature

Cornersight signs each delivery (`X-Cornersight-Signature` header). These blueprints do not check it. If you want to, you can read the header in Make and compare it with the signing secret shown in the app.

## Tested / Not tested

**Tested (on our side, without Make):**
- All three files open as valid JSON (`python3 -m json.tool`).
- Each file has `name`, `flow` and `metadata` at the top, like files exported from Make.
- Every webhook field the files use exists in the real Cornersight payload (`data.leadId`, `data.postUrl`, `timestamp` and so on). Checked against both sample leads.
- File 01 uses the same 16 columns, in the same order, as the n8n file.
- No real account, sheet, channel, webhook or person is in the files.

**Not tested:**
- **Import into Make has NOT been tested.** We have no Make account.
- No run with a real Google Sheet or Slack workspace.
- Empty connections: the files set each connection to `null` and the webhook to `null`. We think Make will ask you to pick them after import. Not confirmed.
- The ICP filter compares `isIcp` with the text `true`. We think Make turns the true/false value into text for this check. Not confirmed. If ICP leads don't come through, change the condition to Make's Boolean operator "Equal to" `true`.
- The row number in file 03 is read with `first(map(3.array; "__ROW_NUMBER__"))`. These are standard Make functions, but this exact formula has not been run.
- `isIcp` goes into the sheet as `true` / `false`. Google may show it as TRUE / FALSE.

**One small difference from n8n file 01:** n8n updates the row if the `leadId` is already there. This Make version skips it. The data is the same on a retry, so the result is the same.

## Where the module names come from

We did not guess the module names. Each one appears in real blueprints exported from Make and shared in public:

| Module in the file | Make name | Seen in |
|---|---|---|
| `gateway:CustomWebHook` v1 | Webhooks - Custom webhook | https://github.com/Sahilingale45/make-webhook-google-sheets (`Add webhook data to a Google Sheet.blueprint.json`), https://github.com/rish404/make-blueprints (`Calendar Availability Check.json`), https://github.com/AscendRyan/make_automations (`Automated_ContentGEN.json`) |
| `google-sheets:filterRows` v2 | Google Sheets - Search Rows | https://github.com/AscendRyan/make_automations (`Form_Analys_to_Slack.json`), https://github.com/rish404/make-blueprints (`Vapi Cold Caller Blueprint.json`), https://gist.github.com/Kushal6070/4fdbe8f6fbd1da1ff0c91b2123631bb2 |
| `google-sheets:addRow` v2 | Google Sheets - Add a Row | https://github.com/Sahilingale45/make-webhook-google-sheets, https://github.com/rish404/make-blueprints (`Vapi EndofCall Report.json`), https://github.com/AscendRyan/make_automations (`Database_Consolidation.json`) |
| `google-sheets:updateRow` v2 | Google Sheets - Update a Row | https://github.com/AscendRyan/make_automations (`Form_Analys_to_Slack.json`), https://gist.github.com/helLf1nGer/ac8c7351411c65e660f700b575629947 |
| `slack:CreateMessage` v4 | Slack - Create a Message | https://gist.github.com/srz-zumix/a7b739529debd8f173d8e71a102ae8ea, https://github.com/AscendRyan/make_automations (`Form_Analys_to_Slack.json`) |
| `builtin:BasicAggregator` v1 | Array aggregator | https://github.com/rish404/make-blueprints (`Vapi Cold Caller Blueprint.json`: Search Rows -> Array aggregator) |
| `builtin:BasicRouter` v1 | Router (routes with filters) | https://github.com/rish404/make-blueprints (`Calendar Availability Check.json`), https://gist.github.com/helLf1nGer/ac8c7351411c65e660f700b575629947 |
| Filters (`text:equal`, `number:equal`, `number:greater`, `exist`) | Filter between modules | Same files. Filters sit on the module after the link. |
| Filter `text:notequal` (file 03, "not Author") | Text "Not equal to" | **Not confirmed.** We did not find it in a public file. We saw `number:notequal` and `text:notcontain`, so we expect it to work. If Make flags it, change it to "Does not contain" `Author`. |

Other sources:
- Import / export steps: https://help.make.com/blueprints
- Aggregator still outputs one bundle when nothing reaches it (unless "Stop processing after an empty aggregation" is on): https://help.make.com/aggregator
- Webhook setup, "Detect new values": https://apps.make.com/gateway
- Search Rows with no match, community thread: https://community.make.com/t/google-sheets-search-rows-returns-0-bundles-router-cannot-route-new-member-path/114041

The module versions above match these public files. They were exported at different times (some are a few years old). Make may have newer versions now. Not confirmed.
