Merge branch 'docs/brandfetch'

This commit is contained in:
Tanay Pant 2020-12-21 09:07:11 +01:00
commit 7824fb97e1
8 changed files with 122 additions and 0 deletions

View File

@ -0,0 +1,22 @@
---
permalink: /credentials/brandfetch
description: Learn to configure credentials for the Brandfetch node in n8n
---
# Brandfetch
You can use these credentials to authenticate the following nodes with Brandfetch.
- [Brandfetch](../../nodes-library/nodes/Brandfetch/README.md)
## Prerequisites
Create a [Brandfetch](https://brandfetch.io/account) account.
## Using API Key
1. Access your [Brandfetch dashboard](https://brandfetch.io/dashboard).
2. Click on ***API*** on the left sidebar.
3. Select a plan and click on the ***Get API Key*** button.
4. Use the ***App Key*** with your Brandfetch API credentials in n8n.
![Getting Brandfetch credentials](./using-api.gif)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@ -0,0 +1,100 @@
---
permalink: /nodes/n8n-nodes-base.Brandfetch
description: Learn how to use the Brandfetch node in n8n
---
# Brandfetch
[Brandfetch](https://www.Brandfetch.com/) is a brand search engine that helps you find logos, colors, fonts, images, and more.
::: tip 🔑 Credentials
You can find authentication information for this node [here](../../../credentials/Brandfetch/README.md).
:::
## Basic Operations
- Return a company's colors
- Return a company's data
- Return a company's fonts
- Return a company's industry
- Return a company's logo & icon
## Example Usage
This workflow allows you to get the logo, icon, and information of a company and store it in Airtable. You can also find the [workflow](https://n8n.io/workflows/835) on n8n.io. This example usage workflow would use the following nodes.
- [Start](../../core-nodes/Start/README.md)
- [Brandfetch]()
- [Set](../../core-nodes/Set/README.md)
- [Airtable](../../nodes/Airtable/README.md)
The final workflow should look like the following image.
![A workflow with the Brandfetch node](./workflow.png)
### 1. Start node
The start node exists by default when you create a new workflow.
### 2. Brandfetch node (logo)
This node will fetch the URL of the logo and icon of n8n. If you want the logo and icon of a different company, enter the domain name of that company instead.
1. First of all, you'll have to enter credentials for the Brandfetch node. You can find out how to do that [here](../../../credentials/Brandfetch/README.md).
2. Enter `n8n.io` in the ***Domain*** field.
3. Click on ***Execute Node*** to run the node.
In the screenshot below, you will notice that the node retrieves the URL of n8n's logo and icon.
![Using the Brandfetch node to retrieve the URL of the logo and icon of a comapny](./Brandfetch_node.png)
### 3. Brandfetch1 node (company)
This node will fetch company data about n8n.
::: v-pre
1. Select the credentials that you entered in the previous Brandfetch node.
2. Select 'Company' from the ***Operation*** dropdown list.
3. Click on the gears icon next to the ***Domain*** field and click on ***Add Expression***.
4. Select the following in the ***Variable Selector*** section: Nodes > Brandfetch > Parameters > domain. You can also add the following expression: `{{$node["Brandfetch"].parameter["domain"]}}`.
5. Click on ***Execute Node*** to run the node.
:::
In the screenshot below, you will notice that the node returns company data about n8n.
![Using the Brandfetch node to retrieve the company data](./Brandfetch1_node.png)
### 4. Set node
We will use the Set node to ensure that only the data that we set in this node gets passed on to the next nodes in the workflow. We will set the value of `Name`, `Icon URL`, and `Logo URL`in this node.
::: v-pre
1. Click on the ***Add Value*** button and select 'String' from the dropdown list.
2. Enter `Name` in the ***Name*** field.
3. Click on the gears icon next to the ***Value*** field and click on ***Add Expression***.
4. Select the following in the ***Variable Selector*** section: Nodes > Brandfetch1 > Output Data > JSON > name. You can also add the following expression: `{{$node["Brandfetch1"].json["name"]}}`.
5. Click on the ***Add Value*** button and select 'String' from the dropdown list.
6. Enter `Icon URL` in the ***Name*** field.
7. Click on the gears icon next to the ***Value*** field and click on ***Add Expression***.
8. Select the following in the ***Variable Selector*** section: Nodes > Brandfetch > Output Data > JSON > icon > image. You can also add the following expression: `{{$node["Brandfetch"].json["icon"]["image"]}}`.
9. Click on the ***Add Value*** button and select 'String' from the dropdown list.
10. Enter `Logo URL` in the ***Name*** field.
11. Click on the gears icon next to the ***Value*** field and click on ***Add Expression***.
12. Select the following in the ***Variable Selector*** section: Nodes > Brandfetch > Output Data > JSON > logo > image. You can also add the following expression: `{{$node["Brandfetch"].json["logo"]["image"]}}`.
13. Toggle ***Keep Only Set*** to `true`. We set this option to true to ensure that only the data that we have set in this node get passed on to the next nodes in the workflow.
14. Click on ***Execute Node*** to run the node.
:::
In the screenshot below, you will notice that the node sets the value of `Name`, `Icon URL`, and `Logo URL`. This value is passed to the next node in the workflow.
![Using the Set node to set data to be inserted by the Airtable node](./Set_node.png)
### 5. Airtable node (Append)
This node will append the data that we set in the previous node to a table. Create a table like [this](https://airtable.com/shrPVVaVZuHofrDVw) in your Airtable base.
1. First of all, you'll have to enter credentials for the Airtable node. You can find out how to do that [here](../../../credentials/Airtable/README.md).
2. Select 'Append' from the ***Operation*** dropdown list.
3. Enter the Base ID in the ***Base ID*** field. For obtaining the Base ID, head over to their [API page](https://airtable.com/api) and select the correct base. Youll find the Base ID there.
4. Enter the name of your table in the ***Table*** field.
5. Click on ***Execute Node*** to run the node.
In the screenshot below, you will notice that the node appends the data that we had set in the previous node.
![Using the Airtable node to insert data into an Airtable table](./Airtable_node.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB