feat(integrations): add brandfetch integration#3402
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR adds a Brandfetch integration with two operations — Get Brand (lookup by domain, ticker, ISIN, or crypto symbol) and Search Brands (lookup by name) — following the established block/tool architecture used by other integrations in the codebase. It includes the block config, both tool implementations, shared TypeScript types, icon components for both apps, documentation, and registry entries.
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant BrandfetchBlock
participant GetBrandTool
participant SearchTool
participant BrandfetchAPI
User->>BrandfetchBlock: Select operation + provide params
alt operation = get_brand
BrandfetchBlock->>GetBrandTool: identifier, apiKey
GetBrandTool->>BrandfetchAPI: GET /v2/brands/{identifier}<br/>Authorization: Bearer {apiKey}
BrandfetchAPI-->>GetBrandTool: { id, name, domain, logos, colors, fonts, company, ... }
GetBrandTool-->>BrandfetchBlock: BrandfetchGetBrandResponse
else operation = search
BrandfetchBlock->>SearchTool: name, apiKey
SearchTool->>BrandfetchAPI: GET /v2/search/{name}<br/>Authorization: Bearer {apiKey}
BrandfetchAPI-->>SearchTool: [ { brandId, name, domain, claimed, icon }, ... ]
SearchTool-->>BrandfetchBlock: BrandfetchSearchResponse
end
BrandfetchBlock-->>User: Output (brand assets or search results)
Last reviewed commit: 9006f1b |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Search Tool Uses Wrong Authentication Method
- Changed authentication from Bearer token in Authorization header to clientId query parameter (?c=) as required by Brandfetch Search API v2.
Or push these changes by commenting:
@cursor push 5ff54bf5ed
Preview (5ff54bf5ed)
diff --git a/apps/sim/tools/brandfetch/search.ts b/apps/sim/tools/brandfetch/search.ts
--- a/apps/sim/tools/brandfetch/search.ts
+++ b/apps/sim/tools/brandfetch/search.ts
@@ -24,10 +24,9 @@
request: {
url: (params) =>
- `https://api.brandfetch.io/v2/search/${encodeURIComponent(params.name.trim())}`,
+ `https://api.brandfetch.io/v2/search/${encodeURIComponent(params.name.trim())}?c=${params.apiKey}`,
method: 'GET',
- headers: (params) => ({
- Authorization: `Bearer ${params.apiKey}`,
+ headers: () => ({
Accept: 'application/json',
}),
},
Collaborator
Author
Collaborator
Author
|
@cursor review |
Collaborator
Author
Collaborator
Author
|
@cursor review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Type of Change
Testing
Tested manually
Checklist