Skip to content

Commit 048519c

Browse files
committed
first commit
0 parents  commit 048519c

File tree

23 files changed

+81115
-0
lines changed

23 files changed

+81115
-0
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Use Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '22'
20+
21+
- name: Install dependencies
22+
run: 'npm ci'
23+
24+
- name: Run lint
25+
run: 'npm run lint'
26+
27+
- name: Run build
28+
run: 'npm run build'

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
node_modules
2+
dist
3+
4+
# OS files
5+
.DS_Store
6+
7+
# IDE
8+
.vscode/*
9+
!.vscode/settings.json
10+
!.vscode/tasks.json
11+
!.vscode/launch.json
12+
!.vscode/extensions.json
13+
14+
# Logs
15+
logs
16+
*.log
17+
npm-debug.log*
18+
19+
# Environment
20+
.env
21+
.env.local

.prettierrc.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
module.exports = {
2+
/**
3+
* https://prettier.io/docs/en/options.html#semicolons
4+
*/
5+
semi: true,
6+
7+
/**
8+
* https://prettier.io/docs/en/options.html#trailing-commas
9+
*/
10+
trailingComma: 'all',
11+
12+
/**
13+
* https://prettier.io/docs/en/options.html#bracket-spacing
14+
*/
15+
bracketSpacing: true,
16+
17+
/**
18+
* https://prettier.io/docs/en/options.html#tabs
19+
*/
20+
useTabs: true,
21+
22+
/**
23+
* https://prettier.io/docs/en/options.html#tab-width
24+
*/
25+
tabWidth: 2,
26+
27+
/**
28+
* https://prettier.io/docs/en/options.html#arrow-function-parentheses
29+
*/
30+
arrowParens: 'always',
31+
32+
/**
33+
* https://prettier.io/docs/en/options.html#quotes
34+
*/
35+
singleQuote: true,
36+
37+
/**
38+
* https://prettier.io/docs/en/options.html#quote-props
39+
*/
40+
quoteProps: 'as-needed',
41+
42+
/**
43+
* https://prettier.io/docs/en/options.html#end-of-line
44+
*/
45+
endOfLine: 'lf',
46+
47+
/**
48+
* https://prettier.io/docs/en/options.html#print-width
49+
*/
50+
printWidth: 100,
51+
};

.vscode/launch.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Attach to running n8n",
6+
"processId": "${command:PickProcess}",
7+
"request": "attach",
8+
"skipFiles": ["<node_internals>/**"],
9+
"type": "node"
10+
}
11+
]
12+
}

README.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# n8n-nodes-branddev
2+
3+
This is an n8n community node that lets you interact with the [Brand.dev API](https://brand.dev) in your n8n workflows.
4+
5+
Brand.dev provides comprehensive brand data including logos, colors, fonts, screenshots, styleguides, and company information for millions of brands worldwide.
6+
7+
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/sustainable-use-license/) workflow automation platform.
8+
9+
[Installation](#installation) | [Operations](#operations) | [Credentials](#credentials) | [Compatibility](#compatibility) | [Resources](#resources)
10+
11+
## Installation
12+
13+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
14+
15+
For the n8n desktop app, go to **Settings** > **Community Nodes** and search for `n8n-nodes-branddev`.
16+
17+
## Operations
18+
19+
This node supports the following resources and operations:
20+
21+
### Brand
22+
- **Retrieve by Domain** - Get brand information by domain name
23+
- Returns logos, colors, fonts, company info, social media, and more
24+
- Supports 50+ languages via `force_language` parameter
25+
- Optional speed optimization for faster responses
26+
- Configurable timeout (1-300,000ms)
27+
28+
- **Retrieve by Company Name** - Search for a company by name and retrieve brand data
29+
- Fuzzy search for company names (3-30 characters)
30+
- Returns comprehensive brand data
31+
32+
- **Retrieve by Email** - Extract domain from email and retrieve brand data
33+
- Excludes free email providers (gmail.com, yahoo.com, etc.)
34+
- Blocks disposable email addresses
35+
36+
- **Retrieve by Stock Ticker** - Look up company by stock ticker symbol
37+
- Supports 30+ global stock exchanges (NASDAQ, NYSE, LSE, JPX, HKSE, etc.)
38+
- Configurable exchange via `ticker_exchange` parameter
39+
40+
- **Retrieve by ISIN** - Look up company by International Securities Identification Number
41+
- Global securities identification
42+
- Returns full brand data
43+
44+
### Industry Classification (NAICS)
45+
- **Classify Brand** - Get NAICS (North American Industry Classification System) codes for any brand
46+
- Accepts domain or company name as input
47+
- Returns 1-10 NAICS codes with confidence scores
48+
- Configurable min/max results
49+
- Supports detailed 6-digit NAICS codes
50+
51+
### Screenshot / Styleguide
52+
- **Take Screenshot** - Capture a viewport or full-page screenshot of any website
53+
- Viewport or full-page screenshots
54+
- Specific page types (login, pricing, careers, contact, blog, etc.)
55+
- Quality vs speed optimization
56+
- Returns high-quality screenshot URL
57+
58+
- **Extract Styleguide** - Extract comprehensive design system including colors, typography, spacing, shadows, and components
59+
- Color palettes with usage statistics
60+
- Typography scales and font information
61+
- Spacing and sizing systems
62+
- Box shadows and border radius values
63+
- Component patterns and styles
64+
65+
- **Extract Fonts** - Get detailed font information including families, usage statistics, and fallbacks
66+
- Font family detection
67+
- Usage statistics (element count, word count)
68+
- Fallback chains
69+
- Font weights and styles
70+
71+
## Credentials
72+
73+
To use this node, you need a Brand.dev API key:
74+
75+
1. Sign up for a free account at [Brand.dev](https://brand.dev)
76+
2. Navigate to your [API settings](https://brand.dev/dashboard/settings/api)
77+
3. Generate a new API key (starts with `sk_live_...`)
78+
4. In n8n, create new credentials:
79+
- Go to **Credentials** > **New**
80+
- Search for "Brand.dev API"
81+
- Paste your API key
82+
83+
The node will automatically test the credentials by making a test request to the Brand.dev API.
84+
85+
## Compatibility
86+
87+
This node has been tested with:
88+
- n8n version 1.0.0 and above
89+
- Requires n8n-workflow as a peer dependency
90+
91+
## Usage
92+
93+
### Example: Get Brand Logos and Colors
94+
95+
1. Add the Brand.dev node to your workflow
96+
2. Select **Brand** as the resource
97+
3. Choose **Retrieve by Domain** operation
98+
4. Enter a domain (e.g., `stripe.com`)
99+
5. The node returns comprehensive brand data including:
100+
- Logos (SVG, PNG formats with different variations)
101+
- Brand colors (primary, accent, background)
102+
- Company information
103+
- Social media links
104+
105+
### Example: Take Website Screenshots
106+
107+
1. Select **Screenshot / Styleguide** as the resource
108+
2. Choose **Take Screenshot** operation
109+
3. Enter a domain and optionally enable full-page screenshot
110+
4. Get a high-quality screenshot URL
111+
112+
### Tips
113+
114+
- Use the **Additional Fields** to customize API requests with optional parameters
115+
- Combine with other n8n nodes to enrich your data pipelines
116+
- The node supports n8n's usable as AI tool feature for AI-powered workflows
117+
118+
## Resources
119+
120+
- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
121+
- [Brand.dev API Documentation](https://docs.brand.dev)
122+
- [Brand.dev API Reference](https://docs.brand.dev/api-reference)
123+
- [GitHub Repository](https://github.com/nikhilrado/brand-dev-n8n)
124+
125+
## License
126+
127+
MIT
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import type {
2+
IAuthenticateGeneric,
3+
ICredentialTestRequest,
4+
ICredentialType,
5+
INodeProperties,
6+
} from 'n8n-workflow';
7+
8+
export class BranddevApi implements ICredentialType {
9+
name = 'branddevApi';
10+
11+
displayName = 'Brand.dev API';
12+
13+
documentationUrl = 'https://docs.brand.dev/quickstart';
14+
15+
icon = 'file:branddev.svg' as const;
16+
17+
properties: INodeProperties[] = [
18+
{
19+
displayName: 'API Key',
20+
name: 'accessToken',
21+
type: 'string',
22+
typeOptions: { password: true },
23+
required: true,
24+
default: '',
25+
placeholder: 'sk_live_...',
26+
description: 'API key from your Brand.dev account',
27+
},
28+
];
29+
30+
authenticate: IAuthenticateGeneric = {
31+
type: 'generic',
32+
properties: {
33+
headers: {
34+
Authorization: '=Bearer {{$credentials.accessToken}}',
35+
},
36+
},
37+
};
38+
39+
test: ICredentialTestRequest = {
40+
request: {
41+
baseURL: 'https://api.brand.dev/v1',
42+
url: '/brand/retrieve',
43+
qs: {
44+
domain: 'brand.dev',
45+
},
46+
},
47+
};
48+
}

0 commit comments

Comments
 (0)