Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,22 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
node-version: '24'

- name: Install dependencies
run: 'npm ci'

- name: Run lint
run: 'npm run lint'

- name: Run tests
run: 'npm test'

- name: Run build
run: 'npm run build'

- name: Audit production dependencies
run: 'npm run audit:production'

- name: Verify package contents
run: 'npm pack --dry-run'
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish

on:
release:
types:
- published

permissions:
contents: read
id-token: write

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Validate package
run: npm run check

- name: Publish with provenance
run: npm publish --provenance --access public
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [Unreleased](https://github.com/context-dot-dev/n8n-integration/compare/1.3.0...HEAD)

- Rebrand the node and credentials to Context.dev while preserving saved version 1 workflows.
- Add all 45 current public API operations, including News, parsing, monitoring, batches, webhooks, people enrichment, web search, scraping, and extraction.
- Add strict unit, execution, public OpenAPI contract, packaging, and production dependency checks.
- Add npm provenance publishing for GitHub releases.

#### [1.3.0](https://github.com/brand-dot-dev/n8n-integration/compare/1.2.0...1.3.0)

- Update repository URL in package.json [`72cc1af`](https://github.com/brand-dot-dev/n8n-integration/commit/72cc1afb0becc8a5af231d848cd4f53ff08fd65d)
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Context.dev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
169 changes: 73 additions & 96 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,126 +1,103 @@
# n8n-nodes-branddev
# Context.dev for n8n

This is an n8n community node that lets you interact with the [Brand.dev API](https://brand.dev) in your n8n workflows.
Use the public [Context.dev API](https://context.dev) in n8n workflows to search and scrape the live web, extract structured data, monitor websites, process batches, find company news, parse documents, and enrich brand or person data.

Brand.dev provides comprehensive brand data including logos, colors, fonts, screenshots, styleguides, and company information for millions of brands worldwide.
The npm package remains named `n8n-nodes-branddev` so existing installations and workflows continue to upgrade normally. New nodes use the Context.dev name and the current production API at `https://api.context.dev/v1`.

[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/sustainable-use-license/) workflow automation platform.
## Installation

[Installation](#installation) | [Operations](#operations) | [Credentials](#credentials) | [Compatibility](#compatibility) | [Resources](#resources)
In n8n, open **Settings → Community Nodes**, select **Install**, and enter:

## Installation
```text
n8n-nodes-branddev
```

See n8n's [community node installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) for self-hosted installation options.

## Credentials

Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
1. Create a Context.dev account at [context.dev](https://context.dev).
2. Copy an API key from the [Context.dev dashboard](https://context.dev/home).
3. In n8n, create a **Context.dev API** credential and paste the key.

For the n8n desktop app, go to **Settings** > **Community Nodes** and search for `n8n-nodes-branddev`.
The credential check calls a read-only account-limits endpoint and does not create work or consume web-data credits.

## Operations

This node supports the following resources and operations:

### Brand
- **Retrieve by Domain** - Get brand information by domain name
- Returns logos, colors, fonts, company info, social media, and more
- Supports 50+ languages via `force_language` parameter
- Optional speed optimization for faster responses
- Configurable timeout (1-300,000ms)

- **Retrieve by Company Name** - Search for a company by name and retrieve brand data
- Fuzzy search for company names (3-30 characters)
- Returns comprehensive brand data

- **Retrieve by Email** - Extract domain from email and retrieve brand data
- Excludes free email providers (gmail.com, yahoo.com, etc.)
- Blocks disposable email addresses

- **Retrieve by Stock Ticker** - Look up company by stock ticker symbol
- Supports 30+ global stock exchanges (NASDAQ, NYSE, LSE, JPX, HKSE, etc.)
- Configurable exchange via `ticker_exchange` parameter

- **Retrieve by ISIN** - Look up company by International Securities Identification Number
- Global securities identification
- Returns full brand data

### Industry Classification (NAICS)
- **Classify Brand** - Get NAICS (North American Industry Classification System) codes for any brand
- Accepts domain or company name as input
- Returns 1-10 NAICS codes with confidence scores
- Configurable min/max results
- Supports detailed 6-digit NAICS codes

### Screenshot / Styleguide
- **Take Screenshot** - Capture a viewport or full-page screenshot of any website
- Viewport or full-page screenshots
- Specific page types (login, pricing, careers, contact, blog, etc.)
- Quality vs speed optimization
- Returns high-quality screenshot URL

- **Extract Styleguide** - Extract comprehensive design system including colors, typography, spacing, shadows, and components
- Color palettes with usage statistics
- Typography scales and font information
- Spacing and sizing systems
- Box shadows and border radius values
- Component patterns and styles

- **Extract Fonts** - Get detailed font information including families, usage statistics, and fallbacks
- Font family detection
- Usage statistics (element count, word count)
- Fallback chains
- Font weights and styles
The current node version tracks every operation in the [public API reference](https://docs.context.dev/api-reference).

## Credentials
| Resource | Operations |
| ------------------ | -------------------------------------------------------------------------------------------------------------------- |
| Web Scraping | Scrape Markdown, scrape HTML, scrape images, crawl a sitemap, crawl a website, search the web, and take screenshots |
| Web Extraction | Extract structured data, styleguides, fonts, NAICS/SIC classifications, and one or many products |
| Brand Intelligence | Retrieve a brand by domain, name, email, ticker, direct URL, or transaction; search brands |
| News | Search current company news by name, domain, ticker, or ISIN |
| Parsing | Convert binary PDF, Office, image, text, code, and data files into Markdown |
| People | Enrich a person from email, social profiles, name, company, education, or location clues |
| Monitors | Create, list, retrieve, update, delete, run, and inspect monitors, runs, changes, usage, limits, and webhook secrets |
| Batch | Submit, list, retrieve, cancel, delete, and read results for scrape or crawl batches |
| Webhooks | List, retrieve, inspect attempts for, and retry webhook deliveries |
| Utility | Prefetch brand or styleguide data |

## Using JSON inputs

Current operations accept the same JSON objects documented by the API. Every operation starts with a valid minimal example that can be edited or replaced with an n8n expression.

For example, **News → Search Company News** starts with:

To use this node, you need a Brand.dev API key:
```json
{
"searchBy": {
"type": "entity",
"entity": {
"type": "domain",
"domain": "context.dev"
}
},
"limit": 10
}
```

1. Sign up for a free account at [Brand.dev](https://brand.dev)
2. Go to your [dashboard](https://brand.dev/home) and copy your API key
4. In n8n, create new credentials:
- Go to **Credentials** > **New**
- Search for "Brand.dev API"
- Paste your API key
To get a timestamped YouTube transcript, choose **Web Scraping → Scrape Markdown** and pass the video URL:

The node will automatically test the credentials by making a test request to the Brand.dev API.
```json
{
"url": "https://www.youtube.com/watch?v=VIDEO_ID"
}
```

## Compatibility
For path-based operations, IDs are separate required fields and are URL-encoded automatically. Destructive operations require an explicit confirmation toggle. Batch submission and webhook retry also expose an optional idempotency key.

This node has been tested with:
- n8n version 1.0.0 and above
- Requires n8n-workflow as a peer dependency
## Parsing files

## Usage
The **Parsing → Parse File** operation reads binary data produced by a previous n8n node. Set **Input Binary Field** to that field's name (usually `data`). The node sends the bytes directly, infers the extension from n8n's binary metadata when possible, and enforces the API's 25 MiB limit before upload.

### Example: Get Brand Logos and Colors
## Workflow compatibility

1. Add the Brand.dev node to your workflow
2. Select **Brand** as the resource
3. Choose **Retrieve by Domain** operation
4. Enter a domain (e.g., `stripe.com`)
5. The node returns comprehensive brand data including:
- Logos (SVG, PNG formats with different variations)
- Brand colors (primary, accent, background)
- Company information
- Social media links
- New Context.dev nodes default to version 2 and use only current public endpoints.
- Existing version 1 Brand.dev nodes retain their saved resources, operations, and request shapes.
- The internal node and credential identifiers are unchanged, so upgrading does not orphan saved workflows or credentials.
- All requests use `https://api.context.dev/v1`; the old `api.brand.dev` hostname is no longer emitted.

### Example: Take Website Screenshots
## Development

1. Select **Screenshot / Styleguide** as the resource
2. Choose **Take Screenshot** operation
3. Enter a domain and optionally enable full-page screenshot
4. Get a high-quality screenshot URL
Use Node.js 24 for the current n8n development server.

### Tips
```bash
npm ci
npm run check
npm run dev
```

- Use the **Additional Fields** to customize API requests with optional parameters
- Combine with other n8n nodes to enrich your data pipelines
- The node supports n8n's usable as AI tool feature for AI-powered workflows
`npm run check` runs n8n's strict Cloud-compatible lint rules, unit and execution tests, a live contract comparison against Context.dev's published OpenAPI document, a production build, and a production-dependency audit.

## Resources

- [Context.dev documentation](https://docs.context.dev)
- [Context.dev API reference](https://docs.context.dev/api-reference)
- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
- [Brand.dev API Documentation](https://docs.brand.dev)
- [Brand.dev API Reference](https://docs.brand.dev/api-reference)
- [GitHub Repository](https://github.com/nikhilrado/brand-dev-n8n)
- [Issue tracker](https://github.com/context-dot-dev/n8n-integration/issues)

## License

MIT
[MIT](LICENSE)
17 changes: 7 additions & 10 deletions credentials/BranddevApi.credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import type {
export class BranddevApi implements ICredentialType {
name = 'branddevApi';

displayName = 'Brand.dev API';
displayName = 'Context.dev API';

documentationUrl = 'https://docs.brand.dev/quickstart';
documentationUrl = 'https://docs.context.dev/quickstart';

icon = 'file:branddev.svg' as const;

Expand All @@ -22,8 +22,8 @@ export class BranddevApi implements ICredentialType {
typeOptions: { password: true },
required: true,
default: '',
placeholder: 'brand_...',
description: 'API key from your Brand.dev account',
placeholder: 'ctxt_secret_...',
description: 'API key from your Context.dev account',
},
];

Expand All @@ -32,18 +32,15 @@ export class BranddevApi implements ICredentialType {
properties: {
headers: {
Authorization: '=Bearer {{$credentials.accessToken}}',
'integration_name': 'n8n',
integration_name: 'n8n',
},
},
};

test: ICredentialTestRequest = {
request: {
baseURL: 'https://api.brand.dev/v1',
url: '/brand/retrieve',
qs: {
domain: 'brand.dev',
},
baseURL: 'https://api.context.dev/v1',
url: '/monitors/limits',
},
};
}
Loading
Loading