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

# Use Context.dev in Zapier Workflows

> Connect Context.dev's brand data, NAICS classification, transaction enrichment, screenshots, and styleguide endpoints to 8,000+ Zapier apps. No code.

[Zapier](https://zapier.com) connects Context.dev to 8,000+ apps. You bring the trigger (Typeform submission, new HubSpot contact, new Gmail email) and Context.dev provides the enrichment action.

<Card title="Install the Context.dev Zapier app" icon="bolt" href="https://zapier.com/apps/contextdev/integrations">
  Authorize Context.dev inside Zapier and connect your API key.
</Card>

## What you get

Context.dev's Zapier app exposes **five actions**, all backed by the same endpoints used directly via the API:

| Action                         | Input                                    | Output                                                      | Endpoint                                                                            |
| ------------------------------ | ---------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| **Retrieve Brand**             | Name, domain, email, or ticker           | Brand record (logo, colors, description, socials, industry) | `POST /brand/retrieve` (`type`: `by_domain`, `by_name`, `by_email`, or `by_ticker`) |
| **Identify Transaction**       | Descriptor + optional MCC, city, country | Brand record for the merchant                               | `POST /brand/retrieve` with `type: "by_transaction"`                                |
| **Fetch NAICS Classification** | Domain or company name                   | NAICS code(s) with confidence                               | `/web/naics`                                                                        |
| **Fetch Screenshot**           | URL + viewport / full-page               | PNG image URL                                               | `/web/screenshot`                                                                   |
| **Fetch Styleguide**           | URL                                      | Fonts, colors, spacing, shadows                             | `/web/styleguide`                                                                   |

There are no Context.dev-provided triggers: you bring the trigger from another app and chain a Context.dev action after it.

## Common trigger pairings

| Trigger source                      | Typical pairing                                     |
| ----------------------------------- | --------------------------------------------------- |
| Typeform "New Form Entry"           | Enrich the submitted email or domain                |
| HubSpot "New Contact"               | Enrich the contact with logo, industry, and socials |
| Google Sheets "New Spreadsheet Row" | Bulk-enrich a list of domains                       |
| Gmail "New Email" or Email Parser   | Pull the sender's domain and enrich                 |
| Webflow / Tally                     | Capture a domain from a form                        |
| Email by Zapier                     | Quickest manual-trigger setup for testing           |

## Setup walkthrough

Trigger fires, Context.dev resolves a brand, the response flows into the destination app.

### Prerequisites

* A Zapier account (free tier works for testing)
* A [Context.dev](https://context.dev) account and an API key from the [dashboard](https://context.dev/dashboard) (prefix `ctxt_secret_`)
* A Zapier-supported trigger source (for testing, **Email by Zapier** works without external setup)

### 1. Install the Context.dev Zapier app

Open the [Context.dev Zapier listing](https://zapier.com/apps/contextdev/integrations) and click **Connect**.

Zapier prompts for the API key. Paste your `ctxt_secret_*` key from the [Context.dev dashboard](https://context.dev/dashboard), then give the connection a name (e.g. "Context.dev (production)") so you can distinguish it from staging keys later.

You only do this once per Context.dev account. Every Zap that uses Context.dev re-uses the saved connection.

### 2. Add a trigger

Create a new Zap and pick a trigger that fires on the event you care about.

For testing without any other integration, use **Email by Zapier > New Inbound Email**:

1. Pick **Email by Zapier** as the trigger app.
2. Pick **New Inbound Email** as the trigger event.
3. Zapier generates an inbox address like `xyz123@zapiermail.com`. Note it.
4. Click **Test trigger**. Zapier waits for an inbound message.
5. Send an email to the Zapier inbox address from step 3 with a domain in the subject line (e.g. `test stripe.com`). Zapier should detect it.

For production, swap in a real trigger: Typeform "New Submission", HubSpot "New Contact", Google Sheets "New Spreadsheet Row", whatever fires on the event you want to enrich.

### 3. Add the Context.dev action

After the trigger, click **+** and add an action. Search for **Context.dev** and pick the action that matches what you want to extract.

For **Retrieve Brand**, configure:

* **Input Type:** Name, Domain, or Ticker
* **Input Value:** Map the value from the trigger (e.g. the domain parsed from a Typeform submission)

Click **Test step**. Zapier hits Context.dev and shows the parsed response. The first call on a cold domain takes around 7 seconds at the median (and can take up to a minute at p99); subsequent calls return in \~250 ms.

### 4. Test and publish

Click **Test & Review** to run the whole Zap end-to-end. Verify every step turns green, then give the Zap a descriptive name and toggle it **On**.

Watch the first few real runs in **Zap History**: it's the fastest way to spot mapping mistakes before they pile up.

## Sample response

Every brand action returns the standard `brand` envelope. Downstream Zap steps reference fields by path (e.g. `2. Retrieve Brand: Brand Title`):

```json expandable theme={null}
{
  "status": "ok",
  "code": 200,
  "brand": {
    "domain": "loom.com",
    "title": "Loom",
    "description": "Loom is a video messaging platform that enables users to record their screen, camera, or both, to communicate more effectively. Now part of Atlassian.",
    "slogan": "Empowering everyone to communicate more effectively, wherever they are",
    "colors": [
      { "hex": "#040404", "name": "Armor Wash" },
      { "hex": "#655ef3", "name": "Blue Hepatica" }
    ],
    "logos": [
      {
        "url": "https://media.brand.dev/660ae867-d4a1-4c38-a815-6dbc1ceb33d5.svg",
        "mode": "light",
        "type": "logo",
        "resolution": { "width": 150, "height": 48, "aspect_ratio": 3.13 }
      }
    ],
    "socials": [
      { "type": "linkedin", "url": "https://linkedin.com/company/useloom" },
      { "type": "x", "url": "https://x.com/loom" }
    ],
    "industries": {
      "eic": [{ "industry": "Technology", "subindustry": "Software (B2B)" }]
    },
    "links": {
      "blog": "https://loom.com/newsroom",
      "pricing": "https://loom.com/pricing",
      "contact": "https://loom.com/connect/enterprise"
    },
    "address": {
      "street": "140 2nd Street",
      "city": "San Francisco",
      "country_code": "US",
      "postal_code": "94105"
    }
  }
}
```

## Reshape responses with Code by Zapier

Most destination apps want flat fields. Add a **Code by Zapier > Run Python** step between the Context.dev action and the destination action.

### One-shot flatten (most-used)

When you want every common field as a flat output:

```python theme={null}
import json

status = input_data.get("status", "")
brand = json.loads(input_data.get("brand") or "{}")

logos   = brand.get("logos", []) or []
colors  = brand.get("colors", []) or []
socials = brand.get("socials", []) or []
links   = brand.get("links", {}) or {}
stock   = brand.get("stock", {}) or {}
address = brand.get("address", {}) or {}
eic     = brand.get("industries", {}).get("eic", []) or []

socials_by_type = {s.get("type", "").lower(): s.get("url", "") for s in socials}
light_logo = next((l.get("url") for l in logos if l.get("mode") == "light"), None)
icon_logo  = next((l.get("url") for l in logos if l.get("type") == "icon"), None)

output = {
    "company_name":  brand.get("title", ""),
    "domain":        brand.get("domain", ""),
    "description":   brand.get("description", ""),
    "logo_url":      light_logo or (logos[0].get("url") if logos else ""),
    "icon_url":      icon_logo or "",
    "primary_color": colors[0].get("hex", "") if colors else "",
    "linkedin":      socials_by_type.get("linkedin", ""),
    "twitter":       socials_by_type.get("x", ""),
    "industry":      eic[0].get("industry", "") if eic else "",
    "subindustry":   eic[0].get("subindustry", "") if eic else "",
    "ticker":        stock.get("ticker", "") or "",
    "city":          address.get("city", "") or "",
    "country_code":  address.get("country_code", "") or "",
    "pricing_url":   links.get("pricing", "") or "",
}
output["enrichment_ok"] = status == "ok" and bool(brand.get("title"))
```

### Best logo for a given UI

`brand.logos[]` is an array of variants. Pick one by `type` (icon vs. full wordmark) and `mode` (light, dark, opaque):

```python theme={null}
import json

brand = json.loads(input_data.get("brand") or "{}")
logos = brand.get("logos", [])

def find(type_, mode):
    return next((l.get("url") for l in logos
                 if l.get("type") == type_ and l.get("mode") == mode), None)

output = {
    "logo_light": find("logo", "light"),
    "logo_dark":  find("logo", "dark"),
    "icon_light": find("icon", "light"),
    "icon_dark":  find("icon", "dark"),
    "logo_any":   logos[0].get("url") if logos else None,
}
```

| Destination                     | Use                           |
| ------------------------------- | ----------------------------- |
| White-background email template | `logo_light`                  |
| Dark Slack notification         | `logo_dark`                   |
| Round avatar bubble in a CRM    | `icon_light` (or `icon_dark`) |
| Anything else                   | `logo_any`                    |

### Detect a missing or weak response

A no-brand result (HTTP 400, `error_code: "NOT_FOUND"` or `"WEBSITE_ACCESS_ERROR"`) or a server error (HTTP 500) comes back without a usable `brand`. Branch on it before writing to the destination:

```python theme={null}
import json

status = input_data.get("status", "")
brand = json.loads(input_data.get("brand") or "{}")

output = {
    "enrichment_ok": status == "ok" and bool(brand.get("title")),
    "status":        status,
    "has_logo":      bool(brand.get("logos")),
    "has_industry":  bool(brand.get("industries", {}).get("eic")),
    "company_name":  brand.get("title", ""),
}
```

Add a **Filter by Zapier** step after this: "Only continue if `enrichment_ok` is true." The Zap silently skips records that didn't enrich.

## Example automations

### Enrich a new HubSpot contact

1. **Trigger:** HubSpot "New Contact"
2. **Action:** Context.dev "Retrieve Brand" with the email domain
3. **Code by Zapier:** [One-shot flatten](#one-shot-flatten-most-used)
4. **Filter:** Continue only if `enrichment_ok` is true
5. **Action:** HubSpot "Update Contact" with logo, industry, LinkedIn, and address fields

### Slack notification with brand context

1. **Trigger:** Stripe "New Customer"
2. **Action:** Context.dev "Retrieve Brand" by email domain
3. **Code by Zapier:** [Best logo for a given UI](#best-logo-for-a-given-ui) (use `logo_dark` for dark Slack themes)
4. **Action:** Slack "Send Channel Message" with company name in the title, dark logo as icon, industry in attachment text

### Bulk-enrich a Google Sheet

1. **Trigger:** Google Sheets "New Spreadsheet Row" with a `domain` column
2. **Action:** Context.dev "Retrieve Brand"
3. **Code by Zapier:** [One-shot flatten](#one-shot-flatten-most-used)
4. **Action:** Google Sheets "Update Spreadsheet Row" with logo, industry, LinkedIn, and pricing-page columns

### NAICS-tag a CRM lead

1. **Trigger:** Salesforce "New Lead"
2. **Action:** Context.dev "Fetch NAICS Classification" with the lead's domain
3. **Code by Zapier:** Pull `codes[0].code` for the highest-confidence NAICS
4. **Action:** Salesforce "Update Lead" with the NAICS code in a custom field

### Visual transaction enrichment

1. **Trigger:** Plaid webhook
2. **Action:** Context.dev "Identify Transaction" with the raw descriptor + optional MCC
3. **Code by Zapier:** Pull brand name + logo
4. **Action:** Notion "Create Page" with merchant logo, name, and category

## Troubleshooting

* **"Authentication failed."** The API key was rejected. Re-paste it in Zapier's **My Apps > Context.dev** connection settings; confirm the `ctxt_secret_` prefix.
* **Action returns 408 ("timeout").** Cold-hit timeout on a domain Context.dev hadn't crawled before. Re-run; the second hit will be warm.
* **No logo in the response.** A few brands haven't published a logo Context.dev could capture. Use Logo Link as a fallback (`https://logos.context.dev/?publicClientId=brandLL_xxx&domain=...`) for a generated monogram.

## Next steps

<CardGroup cols={2}>
  <Card title="Make integration" icon="diagram-project" href="/nocode/make">
    The Zapier alternative when you need branching logic and built-in error
    handling.
  </Card>

  <Card title="Brand API reference" icon="globe" href="/api-reference/brand-intelligence/retrieve-brand-data-by-domain">
    The underlying endpoints. Useful when reading Zap test responses.
  </Card>

  <Card title="Industry classification" icon="layer-group" href="/guides/classification/overview">
    EIC vs NAICS vs SIC: when each one fits.
  </Card>

  <Card title="Troubleshooting" icon="bug" href="/optimization/troubleshooting">
    HTTP status codes, retry strategies, and common error patterns.
  </Card>
</CardGroup>

<Tip>
  Need help implementing a specific Zap? [Email us](mailto:hello@context.dev)
  and we'll walk through it with you.
</Tip>
