diff --git a/docs/courses/level-two/chapter-5/chapter-5.0.md b/docs/courses/level-two/chapter-5/chapter-5.0.md index 664eaf833..790884d0f 100644 --- a/docs/courses/level-two/chapter-5/chapter-5.0.md +++ b/docs/courses/level-two/chapter-5/chapter-5.0.md @@ -31,8 +31,8 @@ n8n provides [core nodes](/integrations/builtin/node-types/#core-nodes) for all To build the workflows, you will need the following: -* An [Airtable](https://airtable.com/){:target="_blank" .external} account and [credentials](/integrations/builtin/credentials/airtable/){:target="_blank" .external}. -* A [Google](https://www.google.com/account/about/){:target="_blank" .external} account and [credentials](/integrations/builtin/credentials/google/){:target="_blank" .external} to access Gmail. +* An [Airtable](https://airtable.com/){:target="_blank" .external-link} account and [credentials](/integrations/builtin/credentials/airtable/). +* A [Google](https://www.google.com/account/about/){:target="_blank" .external-link} account and [credentials](/integrations/builtin/credentials/google/) to access Gmail. * A [Discord](https://discord.com/){:target="_blank" .external-link} account and webhook URL (you receive this using email when you sign up for this course). Next, you will build these three workflows with step-by-step instructions. diff --git a/docs/courses/level-two/chapter-5/chapter-5.1.md b/docs/courses/level-two/chapter-5/chapter-5.1.md index 7341f4d60..f95ca9abf 100644 --- a/docs/courses/level-two/chapter-5/chapter-5.1.md +++ b/docs/courses/level-two/chapter-5/chapter-5.1.md @@ -4,27 +4,27 @@ contentType: tutorial # Workflow 1: Merging data -The company's customer data is stored in Airtable. It contains information about the customers' ID, country, email, and join date, but lacks data about their respective region and subregion. You need to fill in these last two fields in order to create the reports for regional sales. +Nathan's company stores its customer data in Airtable. This data contains information about the customers' ID, country, email, and join date, but lacks data about their respective region and subregion. You need to fill in these last two fields in order to create the reports for regional sales. To accomplish this task, you first need to make a copy of this table in your Airtable account: -Next, build a small workflow that merges data from Airtable and a REST Countries API. +Next, build a small workflow that merges data from Airtable and a REST Countries API: -1. Use the [Airtable node](/integrations/builtin/app-nodes/n8n-nodes-base.airtable/) to list the data in the Airtable table named `customers`. -2. Use the [HTTP Request node](/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/){:target="_blank" .external} to get data from the REST Countries API: `https://restcountries.com/v3.1/all`. This will return data about world countries, split out into separate items. -3. Use the [Merge node](/integrations/builtin/core-nodes/n8n-nodes-base.merge/) to merge data from Airtable and the Countries API by country name, represented as `customerCountry` in Airtable and `name.common` in the Countries API, respectively. +1. Use the [**Airtable node**](/integrations/builtin/app-nodes/n8n-nodes-base.airtable/) to list the data in the Airtable table named `customers`. +2. Use the [**HTTP Request node**](/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/) to get data from the REST Countries API: `https://restcountries.com/v3.1/all`. This will return data about world countries, split out into separate items. +3. Use the [**Merge node**](/integrations/builtin/core-nodes/n8n-nodes-base.merge/) to merge data from Airtable and the Countries API by country name, represented as `customerCountry` in Airtable and `name.common` in the Countries API, respectively. 4. Use another Airtable node to update the fields `region` and `subregion` in Airtable with the data from the Countries API. The workflow should look like this: -
Workflow 1 for merging data from Airtable and the Countries API
+
Workflow 1 for merging data from Airtable and the Countries API
Workflow 1 for merging data from Airtable and the Countries API
/// question | Quiz questions -* How many items does the HTTP Request node return? -* How many items does the Merge node return? +* How many items does the **HTTP Request node** return? +* How many items does the **Merge node** return? * How many unique regions are assigned in the customers table? * What's the subregion assigned to the customerID 10? /// diff --git a/docs/courses/level-two/chapter-5/chapter-5.2.md b/docs/courses/level-two/chapter-5/chapter-5.2.md index 220349cc8..27d7a7499 100644 --- a/docs/courses/level-two/chapter-5/chapter-5.2.md +++ b/docs/courses/level-two/chapter-5/chapter-5.2.md @@ -14,9 +14,9 @@ To make things easier, let's split the workflow into three parts. The first part of the workflow consists of five nodes: -
Workflow 1 – Getting data from different sources
Workflow 1 – Getting data from different sources
+
Workflow 1: Getting data from different sources
Workflow 1: Getting data from different sources
-1. Use the [HTTP Request node](/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/) to get data from the API endpoint that stores company data. Configure the following node parameters: +1. Use the [**HTTP Request node**](/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/) to get data from the API endpoint that stores company data. Configure the following node parameters: - **Method**: Get - **URL**: The **Dataset URL** you received in the email when you signed up for this course. @@ -40,46 +40,47 @@ The first part of the workflow consists of five nodes: ## Part 2: Generating file for regional sales -The second part of the workflow consists of five nodes: +The second part of the workflow consists of four nodes: -
Workflow 2 – Generating file for regional sales
Workflow 2 – Generating file for regional sales
+
Workflow 2: Generating file for regional sales
Workflow 2: Generating file for regional sales
1. Use the [**If node**](/integrations/builtin/core-nodes/n8n-nodes-base.if/) to filter to only display orders from the region `Americas`. 2. Use the [**Convert to File**](/integrations/builtin/core-nodes/n8n-nodes-base.converttofile/) to transform the incoming data from JSON to binary format. Convert each item to a separate file. (Bonus points if you can figure out how to name each report based on the orderID!) 3. Use the [**Gmail node**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/) (or another email node) to send the files using email to an address you have access to. Note that you need to add an attachment with the data property. 4. Use the [**Discord node**](/integrations/builtin/app-nodes/n8n-nodes-base.discord/) to send a message in the n8n Discord channel `#course-level-two`. In the node, configure the following parameters: - * Webhook URL: The webhook URL you received in the email when you signed up for this course. - * Text: "I sent the file using email with the label ID `{label ID}`. My ID: " followed by your ID.
Note that you need to replace the text in curly braces `{}` with expressions that reference the data from the nodes. + * **Webhook URL**: The Discord URL you received in the email when you signed up for this course. + * **Text**: "I sent the file using email with the label ID `{label ID}`. My ID: " followed by your ID.
Note that you need to replace the text in curly braces `{}` with expressions that reference the data from the nodes. /// question | Quiz questions -* How many orders are assigned to the region Americas? -* What's the total price of the orders in the region Americas? -* How many items are returned by the *Write Binary File node*? +* How many orders are assigned to the `Americas` region? +* What's the total price of the orders in the `Americas` region? +* How many items does the **Write Binary File node** return? /// ## Part 3: Generating files for total sales -The third part of the workflow consists of seven nodes: +The third part of the workflow consists of five nodes: -
Workflow 3 – Generating files for total sales
Workflow 3 – Generating files for total sales
+
Workflow 3: Generating files for total sales
Workflow 3: Generating files for total sales
1. Use the [**Loop Over Items node**](/integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches/) to split data from the Item Lists node into batches of 5. 2. Use the [**Set node**](/integrations/builtin/core-nodes/n8n-nodes-base.set/) to set four values, referenced with expressions from the previous node: `customerEmail`, `customerRegion`, `customerSince`, and `orderPrice`. -3. Use the [**Date & Time node**](/integrations/builtin/core-nodes/n8n-nodes-base.datetime/) to change the date format of the field `customerSince` to the format MM/DD/YYYY. Set the 'Include Input Fields' option to keep all the data together. +3. Use the [**Date & Time node**](/integrations/builtin/core-nodes/n8n-nodes-base.datetime/) to change the date format of the field `customerSince` to the format MM/DD/YYYY. + - Set the **Include Input Fields** option to keep all the data together. 4. Use the [**Convert to File node**](/integrations/builtin/core-nodes/n8n-nodes-base.converttofile/) to create a CSV spreadsheet with the file name set as the expression: `{{$runIndex > 0 ? 'file_low_orders':'file_high_orders'}}`. 5. Use the [**Discord node**](/integrations/builtin/app-nodes/n8n-nodes-base.discord/) to send a message in the n8n Discord channel `#course-level-two`. In the node, configure the following parameters: - * Webhook URL: The webhook URL you received in the email when you signed up for this course. - * Text: "I created the spreadsheet `{file name}`. My ID:" followed by your ID.
The `{file name}` should be an expression that references data from the Spreadsheet File node.
+ * **Webhook URL**: The Discord URL you received in the email when you signed up for this course. + * **Text**: "I created the spreadsheet `{file name}`. My ID:" followed by your ID.
Note that you need to replace `{file name}` with an expression that references data from the previous **Convert to File node**.
/// question | Quiz questions * What's the lowest order price in the first batch of items? * What's the formatted date of customer 7? -* How many items are returned by the *Convert to File node*? +* How many items does the **Convert to File node** return? /// ??? note "Show me the solution" - To check the configuration of the nodes, you can copy-paste the JSON code of the workflow: + To check the configuration of the nodes, you can copy the JSON workflow code below and paste it into your Editor UI: ```json {