Merge branch 'polish/airtbale'

This commit is contained in:
Tanay Pant 2020-12-14 12:42:38 +01:00
commit b9035cf851
7 changed files with 61 additions and 15 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 140 KiB

View File

@ -19,10 +19,9 @@ You can find authentication information for this node [here](../../../credential
- Read data from a table
- Update data in a table
## Example Usage
This workflow allows you to insert and list data from a table in Airtable. You can also find the [workflow](https://n8n.io/workflows/601) on n8n.io. This example usage workflow would use the following nodes.
This workflow allows you to insert and update data from a table in Airtable. You can also find the [workflow](https://n8n.io/workflows/818) on n8n.io. This example usage workflow would use the following nodes.
- [Start](../../core-nodes/Start/README.md)
- [Set](../../core-nodes/Set/README.md)
- [Airtable]()
@ -35,39 +34,86 @@ The final workflow should look like the following image.
The start node exists by default when you create a new workflow.
### 2. Set node
We will use the Set node to set the values for the name and id fields for a new record.
1. Click on the ***Add Value*** button and select 'Number' from the dropdown list.
2. Enter `id` in the ***Name*** field.
3. Click on the ***Add Value*** button and select 'String' from the dropdown list.
4. Enter `name` in the ***Name*** field.
5. Enter the value for the name in the ***Value*** field.
6. Click on ***Execute Node*** to run the node.
2. Enter `ID` in the ***Name*** field.
3. Enter an id in the ***Value*** field.
4. Click on the ***Add Value*** button and select 'String' from the dropdown list.
5. Enter `Name` in the ***Name*** field.
6. Enter a name in the ***Value*** field.
7. Click on ***Execute Node*** to run the node.
In the screenshot below, you will notice that the node sets the value for `ID` and `Name`.
![Using the Set node to set data to be inserted by the Airtable node](./Set_node.png)
### 3. 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/shrN2yLZyKEETq1xj) 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 the 'Append' option from the ***Operation*** dropdown list.
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 the table in the ***Table*** field.
5. Click on ***Execute Node*** to run the workflow.
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)
### 4. Airtable1 node (List)
This node will list all the records with the name `n8n`. If you want to list records with a different name, use that name instead.
::: v-pre
1. Select the credentials that you entered in the previous node.
2. Select the 'List' option from the ***Operation*** dropdown list.
3. Enter the base ID used in the previous node in the ***Base ID*** field.
4. Enter the name of the table used in the previous node in the ***Table*** field.
5. Click on ***Execute Node*** to run the workflow.
3. Click on the gears icon next to the ***Base ID*** field and click on ***Add Expression***.
4. Select the following in the ***Variable Selector*** section: Nodes > Airtable > Parameters > application. You can also add the following expression: `{{$node["Airtable"].parameter["application"]}}`.
5. Click on the gears icon next to the ***Table*** field and click on ***Add Expression***.
6. Select the following in the ***Variable Selector*** section: Nodes > Airtable > Parameters > table. You can also add the following expression: `{{$node["Airtable"].parameter["table"]}}`.
7. Click on ***Add Option*** and select 'Filter By Formula' from the dropdown list.
8. Enter `Name='n8n'` in the ***Filter By Formula*** field.
9. Click on ***Execute Node*** to run the node.
:::
In the screenshot below, you will notice that the node only returns the record with the name `n8n`.
![Using the Airtable node to read data from an Airtable table](./Airtable1_node.png)
### 5. Set1 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` in this node.
1. Click on the ***Add Value*** button and select 'String' from the dropdown list.
2. Enter `Name` in the ***Name*** field.
3. Enter `nodemation` in the ***Value*** field.
4. 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.
5. Click on ***Execute Node*** to run the node.
In the screenshot below, you will notice that the node sets the value of `Name`. 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)
### 6. Airtable2 node (Update)
This node will update the Name field of the record that we received from the previous Airtable node.
::: v-pre
1. Select the credentials that you entered in the previous Airtable node.
2. Select 'Update' from the ***Operation*** dropdown list.
3. Click on the gears icon next to the ***Base ID*** field and click on ***Add Expression***.
4. Select the following in the ***Variable Selector*** section: Nodes > Airtable > Parameters > application. You can also add the following expression: `{{$node["Airtable"].parameter["application"]}}`.
5. Click on the gears icon next to the ***Table*** field and click on ***Add Expression***.
6. Select the following in the ***Variable Selector*** section: Nodes > Airtable > Parameters > table. You can also add the following expression: `{{$node["Airtable"].parameter["table"]}}`.
7. Click on the gears icon next to the ***Id*** field and click on ***Add Expression***.
8. Select the following in the ***Variable Selector*** section: Nodes > Airtable1 > Output Data > JSON > id. You can also add the following expression: `{{$node["Airtable1"].json["id"]}}`.
9. Click on ***Execute Node*** to run the node.
:::
In the screenshot below, you will notice that the node updates the Name field.
![Using the Airtable node to update data of a record](./Airtable2_node.png)
## Further Reading
- [Automating Conference Organization Processes with n8n](https://medium.com/n8n-io/automating-conference-organization-processes-with-n8n-ab8f64a7a520)

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 KiB

After

Width:  |  Height:  |  Size: 134 KiB