mirror of
https://github.com/n8n-io/n8n-docs.git
synced 2025-11-20 17:48:34 +00:00
Update tutorial (#2995)
This commit is contained in:
parent
5d40bb8fd7
commit
66f76b94e4
BIN
docs/_images/try-it-out/tutorial-first.png
Normal file
BIN
docs/_images/try-it-out/tutorial-first.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
@ -1,3 +1,11 @@
|
||||
### THESE REDIRECTS ARE HANDLED BY NETLIFY, SEE DOC FOR DETAILS ###
|
||||
### https://docs.netlify.com/routing/redirects/redirect-options/ ###
|
||||
|
||||
|
||||
## tutorials refresh
|
||||
|
||||
/try-it-out/longer-introduction/ /try-it-out/tutorial-first-workflow/
|
||||
|
||||
## DOC-994
|
||||
/privacy-security/security/ https://n8n.io/legal/#security
|
||||
|
||||
|
||||
@ -1,176 +1,193 @@
|
||||
{
|
||||
"name": "Tutorial Workflow",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "weeks",
|
||||
"triggerAtDay": [
|
||||
1
|
||||
],
|
||||
"triggerAtHour": 9
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"typeVersion": 1.2,
|
||||
"position": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"id": "03a18f7d-33a6-4532-858a-18815e0b9521",
|
||||
"name": "Schedule Trigger"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "donkiSolarFlare",
|
||||
"additionalFields": {
|
||||
"startDate": "={{$today.minus({days: 7}).toFormat('yyyy-MM-dd')}}"
|
||||
}
|
||||
},
|
||||
"type": "n8n-nodes-base.nasa",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
220,
|
||||
0
|
||||
],
|
||||
"id": "f228846f-c269-400d-babd-ebf499ccd5c1",
|
||||
"name": "NASA",
|
||||
"credentials": {
|
||||
"nasaApi": {
|
||||
"id": "OrHOWMTeLsZNIdF4",
|
||||
"name": "NASA account"
|
||||
}
|
||||
"name": "Tutorial-workflow",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "weeks",
|
||||
"triggerAtDay": [
|
||||
1
|
||||
],
|
||||
"triggerAtHour": 9
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict",
|
||||
"version": 2
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "2f469c8e-12b3-4ee5-95fc-ff81508d0b43",
|
||||
"leftValue": "={{ $json.classType }}",
|
||||
"rightValue": "C",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "contains"
|
||||
}
|
||||
}
|
||||
],
|
||||
"combinator": "and"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.if",
|
||||
"typeVersion": 2.2,
|
||||
"position": [
|
||||
440,
|
||||
0
|
||||
],
|
||||
"id": "ba44a3d6-c765-446d-9ad6-58b389c7bc38",
|
||||
"name": "If"
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"typeVersion": 1.2,
|
||||
"position": [
|
||||
-680,
|
||||
100
|
||||
],
|
||||
"id": "ef14445c-2f5f-4c78-96c8-66732feb7a8f",
|
||||
"name": "Schedule Trigger"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "donkiSolarFlare",
|
||||
"additionalFields": {
|
||||
"startDate": "={{ $today.minus(7, 'days') }}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "request",
|
||||
"operation": "send",
|
||||
"binId": "1741914338605-0907339996192",
|
||||
"binContent": "=There was a solar flare of class {{$json[\"classType\"]}}",
|
||||
"requestOptions": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.postBin",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
680,
|
||||
-60
|
||||
],
|
||||
"id": "f677789a-cb79-48f5-a485-9114e2559b84",
|
||||
"name": "PostBin(true)"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "request",
|
||||
"operation": "send",
|
||||
"binId": "1741914338605-0907339996192",
|
||||
"binContent": "=There was a solar flare of class {{$json[\"classType\"]}}",
|
||||
"requestOptions": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.postBin",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
680,
|
||||
120
|
||||
],
|
||||
"id": "53d095c0-2893-4a38-a80d-60c23558ca07",
|
||||
"name": "PostBin(false)"
|
||||
"type": "n8n-nodes-base.nasa",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
-460,
|
||||
100
|
||||
],
|
||||
"id": "52c58b93-c780-4aff-a216-d67b28195a45",
|
||||
"name": "NASA",
|
||||
"credentials": {
|
||||
"nasaApi": {
|
||||
"id": "sSVnxV9AcBmBOYn8",
|
||||
"name": "NASA account"
|
||||
}
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict",
|
||||
"version": 2
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"node": "NASA",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"NASA": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"If": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "PostBin(true)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
"id": "2f469c8e-12b3-4ee5-95fc-ff81508d0b43",
|
||||
"leftValue": "={{ $json.classType }}",
|
||||
"rightValue": "C",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "contains"
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "PostBin(false)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
"combinator": "and"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"PostBin(true)": {
|
||||
"main": [
|
||||
[]
|
||||
"type": "n8n-nodes-base.if",
|
||||
"typeVersion": 2.2,
|
||||
"position": [
|
||||
-240,
|
||||
100
|
||||
],
|
||||
"id": "b54e3289-9ebb-451f-8bac-87edeeeced13",
|
||||
"name": "If"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "request",
|
||||
"operation": "send",
|
||||
"binId": "1741914338605-0907339996192",
|
||||
"binContent": "=There was a solar flare of class {{$json[\"classType\"]}}",
|
||||
"requestOptions": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.postBin",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
-20,
|
||||
0
|
||||
],
|
||||
"id": "a8b602b6-17b1-4274-8d33-73344b6bb8fb",
|
||||
"name": "PostBin(true)"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "request",
|
||||
"operation": "send",
|
||||
"binId": "1741914338605-0907339996192",
|
||||
"binContent": "=There was a solar flare of class {{$json[\"classType\"]}}",
|
||||
"requestOptions": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.postBin",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
-20,
|
||||
200
|
||||
],
|
||||
"id": "09c2c7a4-c229-430d-a5b0-8d7491515d9f",
|
||||
"name": "PostBin(false)"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"content": "## Setup required\n\nYou need to create a NASA account and create credentials, and create a bin with Postbin and enter the ID - see [the documentation](https://docs.n8n.io/try-it-out/longer-introduction/)",
|
||||
"height": 120,
|
||||
"width": 600
|
||||
},
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
-720,
|
||||
-60
|
||||
],
|
||||
"id": "08e0b8f9-c90e-4c9c-a663-01aca805b9be",
|
||||
"name": "Sticky Note"
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "NASA",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"active": false,
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
"NASA": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"versionId": "5e59b35c-ff2f-4006-a09e-a0003c179b73",
|
||||
"meta": {
|
||||
"templateCredsSetupCompleted": true,
|
||||
"instanceId": "1060f46e51fc7902c377ab29d7cbfb87696ddf6b3c5c27cbbb65c3cb36e21baf"
|
||||
},
|
||||
"id": "kubnlHf5by3BHpRl",
|
||||
"tags": []
|
||||
}
|
||||
"If": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "PostBin(true)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "PostBin(false)",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"active": false,
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "37de4877-e4f6-4b9a-b6f0-9b7e7aea0163",
|
||||
"meta": {
|
||||
"templateCredsSetupCompleted": true,
|
||||
"instanceId": "cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7"
|
||||
},
|
||||
"id": "DPzMzTIyDrYohiw4",
|
||||
"tags": [
|
||||
{
|
||||
"createdAt": "2021-06-25T07:47:07.640Z",
|
||||
"updatedAt": "2021-06-25T07:47:07.640Z",
|
||||
"id": "1",
|
||||
"name": "docs"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -19,7 +19,7 @@ This course is for you if you:
|
||||
- Are looking for some extra help creating your first workflow.
|
||||
- Want to automate processes in your personal or working life.
|
||||
|
||||
This course introduces n8n concepts and demonstrates practical workflow building without assuming any prior familiarity with n8n. If you'd like to get a feel for the basics without as much explanation, consult our [quickstart guide](/try-it-out/longer-introduction.md).
|
||||
This course introduces n8n concepts and demonstrates practical workflow building without assuming any prior familiarity with n8n. If you'd like to get a feel for the basics without as much explanation, consult our [quickstart guide](/try-it-out/tutorial-first-workflow.md).
|
||||
|
||||
## What will I learn in this course?
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ If you don't have an account yet, sign up to a [free trial on n8n Cloud](https:/
|
||||
Start with the quickstart guides to help you get up and running with building basic workflows.
|
||||
|
||||
- [A very quick quickstart](/try-it-out/quickstart.md)
|
||||
- [A longer introduction](/try-it-out/longer-introduction.md)
|
||||
- [A longer introduction](/try-it-out/tutorial-first-workflow.md)
|
||||
- [Build an AI workflow in n8n](/advanced-ai/intro-tutorial.md)
|
||||
|
||||
## Structured Courses
|
||||
|
||||
@ -8,6 +8,6 @@ contentType: overview
|
||||
|
||||
The best way to learn n8n is by using our tutorials to get familiar with the user interface and the many different types of nodes and integrations available. Here is a selection of material to get you started:
|
||||
|
||||
- Looking for a quick introduction? Check out the ["First Workflow" tutorial](/try-it-out/longer-introduction.md).
|
||||
- Looking for a quick introduction? Check out the ["First Workflow" tutorial](/try-it-out/tutorial-first-workflow.md).
|
||||
- Interested in what you could do with AI? Find out [how to build an AI chat agent with n8n](/advanced-ai/intro-tutorial.md).
|
||||
- Prefer to work through extensive examples? Maybe the [courses](/courses/index.md) are for you.
|
||||
|
||||
@ -62,7 +62,7 @@ The complete workflow should look like this:
|
||||
|
||||
## Next steps
|
||||
|
||||
* Read n8n's [longer try it out tutorial](/try-it-out/longer-introduction.md) for a more complex workflow, and an introduction to more features and n8n concepts.
|
||||
* Read n8n's [longer try it out tutorial](/try-it-out/tutorial-first-workflow.md) for a more complex workflow, and an introduction to more features and n8n concepts.
|
||||
* Take the [text courses](/courses/index.md) or [video courses](/video-courses.md).
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
#https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
|
||||
description: Quickstart covering key concepts in n8n.
|
||||
description: Create your first workflow in n8n and learn some key concepts.
|
||||
contentType: tutorial
|
||||
---
|
||||
|
||||
@ -16,6 +16,8 @@ This guide will show you how to construct a [workflow](/glossary.md#workflow-n8n
|
||||
* Representing logic in an n8n workflow
|
||||
* Using [expressions](/glossary.md#expression-n8n)
|
||||
|
||||

|
||||
|
||||
This quickstart uses [n8n Cloud](/manage-cloud/overview.md), which is recommended for new users. A free trial is available - if you haven't already done so, [sign up](https://app.n8n.cloud/register) for an account now.
|
||||
|
||||
## Step one: Create a new workflow
|
||||
@ -25,7 +27,6 @@ When you open n8n, you'll see either:
|
||||
* A window with a welcome message and two large buttons: Choose "Start from Scratch" to create a new workflow.
|
||||
* The **Workflows** list on the **Overview** page. Select the <span class="inline-image">{.off-glb}</span> **button** to create a new workflow.
|
||||
|
||||
|
||||
## Step two: Add a trigger node
|
||||
|
||||
n8n provides two ways to start a workflow:
|
||||
@ -36,18 +37,20 @@ n8n provides two ways to start a workflow:
|
||||
For this tutorial, we'll use the [Schedule trigger](/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/index.md). This allows you to run the workflow on a schedule:
|
||||
|
||||
1. Select **Add first step**.
|
||||
2. Search for **Schedule**. n8n shows a list of nodes that match the search.
|
||||
3. Select **Schedule Trigger** to add the node to the canvas. n8n opens the node.
|
||||
4. For **Trigger Interval**, select **Weeks**.
|
||||
5. For **Weeks Between Triggers**, enter `1`.
|
||||
6. Enter a time and day. For this example, select **Monday** in **Trigger on Weekdays**, select **9am** in **Trigger at Hour**, and enter `0` in **Trigger at Minute**.
|
||||
7. Close the node details view to return to the canvas.
|
||||
|
||||
1. Search for **Schedule**. n8n shows a list of nodes that match the search.
|
||||
1. Select **Schedule Trigger** to add the node to the canvas. n8n opens the node.
|
||||
1. For **Trigger Interval**, select **Weeks**.
|
||||
1. For **Weeks Between Triggers**, enter `1`.
|
||||
1. Enter a time and day. For this example, select **Monday** in **Trigger on Weekdays**, select **9am** in **Trigger at Hour**, and enter `0` in **Trigger at Minute**.
|
||||
1. Close the node details view to return to the canvas.
|
||||
|
||||
## Step three: Add the NASA node and set up credentials
|
||||
|
||||
The [NASA node](/integrations/builtin/app-nodes/n8n-nodes-base.nasa.md) interacts with NASA's [public APIs](https://api.nasa.gov/){:target=_blank .external-link} to fetch useful data. We will use the real-time data from the API to find solar events.
|
||||
|
||||
??? explanation "Credentials"
|
||||
Credentials are private pieces of information issued by apps and services to authenticate you as a user and allow you to connect and share information between the app or service and the n8n node. The type of information required varies depending on the app/service concerned. You should be careful about sharing or revealing the credentials outside of n8n.
|
||||
|
||||
1. Select the **Add node** <span class="inline-image">{.off-glb}</span> connector on the Schedule Trigger node.
|
||||
1. Search for **NASA**. n8n shows a list of nodes that match the search.
|
||||
1. Select **NASA** to view a list of operations.
|
||||
@ -59,13 +62,14 @@ The [NASA node](/integrations/builtin/app-nodes/n8n-nodes-base.nasa.md) interact
|
||||
1. Check your email account for the API key. Copy the key, and paste it into **API Key** in n8n.
|
||||
1. Select **Save**.
|
||||
1. Close the credentials screen. n8n returns to the node. The new credentials should be automatically selected in **Credential for NASA API**.
|
||||
|
||||
1. By default, DONKI Solar Flare provides data for the past 30 days. To limit it to just the last week, use **Additional Fields**:
|
||||
1. Select **Add field**.
|
||||
1. Select **Start date**.
|
||||
1. To get a report starting from a week ago, you can use an expression: next to **Start date**, select the **Expression** tab, then select the expand button <span class="inline-image">{.off-glb}</span> to open the full expressions editor.
|
||||
1. In the **Expression** field, enter the following expression:
|
||||
```js
|
||||
{{$today.minus({days: 7}).toFormat('yyyy-MM-dd')}}
|
||||
{{ $today.minus(7, 'days') }}
|
||||
```
|
||||
This generates a date in the correct format, seven days before the current date.
|
||||
|
||||
@ -108,7 +112,7 @@ Add the If node:
|
||||
|
||||
The last step of the workflow is to send the two reports about solar flares. For this example, you'll send data to [Postbin](https://www.toptal.com/developers/postbin/){:target=_blank .external-link}. Postbin is a service that receives data and displays it on a temporary web page.
|
||||
|
||||
1. On the If node, select the **Add node** <span class="inline-image">{.off-glb}</span> connector labeled **true**.
|
||||
1. On the If node, select the **Add node** <span class="inline-image">{.off-glb}</span> connector labeled **true**.
|
||||
1. Search for **PostBin**. n8n shows a list of nodes that match the search.
|
||||
1. Select **PostBin**.
|
||||
1. Select **Send a request**. n8n adds the node to the canvas and opens it.
|
||||
@ -116,8 +120,8 @@ The last step of the workflow is to send the two reports about solar flares. For
|
||||
1. Copy the bin ID. It looks similar to `1651063625300-2016451240051`.
|
||||
1. In n8n, paste your Postbin ID into **Bin ID**.
|
||||
1. Now, configure the data to send to Postbin. Next to **Bin Content**, select the **Expression** tab (you will need to mouse-over the **Bin Content** for the tab to appear), then select the expand button <span class="inline-image">{.off-glb}</span> to open the full expressions editor.
|
||||
1. Select **Current Node** > **Input Data** > **JSON** > **classType**. n8n adds the expression to the **Expression** editor, and displays a sample output.
|
||||
1. The expression is: `{{$json["classType"]}}`. Add a message to it, so that the full expression is:
|
||||
1. You can now click and drag the correct field from the If Node output into the expressions editor to automatically create a reference for this label. In this case the input we want is 'classType'.
|
||||
1. Once dropped into the expressions editor it will transform into this reference: `{{$json["classType"]}}`. Add a message to it, so that the full expression is:
|
||||
|
||||
```js
|
||||
There was a solar flare of class {{$json["classType"]}}
|
||||
@ -129,7 +133,7 @@ The last step of the workflow is to send the two reports about solar flares. For
|
||||
1. Close the Postbin node to return to the canvas.
|
||||
1. Add another Postbin node, to handle the **false** output path from the If node:
|
||||
1. Hover over the Postbin node, then select **Node context menu** <span class="inline-image">{.off-glb}</span> > **Duplicate node** to duplicate the first Postbin node.
|
||||
2. Drag the **false** connector from the If node to the left side of the new Postbin node.
|
||||
1. Drag the **false** connector from the If node to the left side of the new Postbin node.
|
||||
|
||||
## Step six: Test the workflow
|
||||
|
||||
@ -213,7 +213,7 @@ nav:
|
||||
- Quickstarts:
|
||||
- try-it-out/index.md
|
||||
- A very quick quickstart: try-it-out/quickstart.md
|
||||
- A longer introduction: try-it-out/longer-introduction.md
|
||||
- A longer introduction: try-it-out/tutorial-first-workflow.md
|
||||
- Video courses: video-courses.md
|
||||
- Text courses:
|
||||
- courses/index.md
|
||||
|
||||
Loading…
Reference in New Issue
Block a user