> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/build-your-first-workflow.md).

# Build your first workflow

Create your first workflow in n8n and learn some key concepts.

In this quick start, you’ll build a workflow that fetches the weather for Berlin every morning and turns it into a short report anyone can read at a glance. The workflow saves each report to a data table, so you build up a weather log over time.

![8 AM schedule trigger connected to Get Berlin weather, Add weather report, and Save weather log](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-a4ded6e98c65464468ab6d5de15287ad4ba5daab%2Fbuild-your-first-workflow.png?alt=media)

When it runs, your workflow produces a report like this:

```
The temperature in Berlin is 6.8 degrees C and it's currently cloudy.
```

You’ll build it with n8n Assistant, which turns a prompt into a working workflow. That takes less than five minutes. If you’d rather build it node by node, an optional section at the end walks you through the same workflow by hand.

You can also follow along with this video:

{% embed url="<https://www.youtube.com/embed/0BzaIm7Fwyo>" %}

Apart from n8n, you don’t need any coding experience. The weather data comes from Mockingbird, a sample-data service n8n provides for tutorials, so you’ll get similar results to this guide.

## Before you start

You need an n8n instance. Either:

* **n8n Cloud**: [sign up for a free trial](https://go.n8n.io/ekXKXJ), or
* **Self-hosted**: follow the [host n8n](/deploy/host-n8n.md) guide, then [set up n8n Assistant](/deploy/host-n8n/configure-n8n/set-up-n8n-assistant.md) with your own AI provider account

## Build the workflow with n8n Assistant

{% hint style="info" %}
**Feature availability**

n8n Assistant is available on:

* **n8n Cloud:** Starter, Pro
* **Self-hosted:** Community, Registered Community, Business

On n8n Cloud Enterprise and self-hosted Enterprise, contact your Customer Success Manager about preview access.
{% endhint %}

{% hint style="info" %}
**Preview status**

n8n Assistant is in Preview and may change in future releases.

Your results may differ from the screenshots in this guide.
{% endhint %}

n8n Assistant builds workflows from prompts. You describe what you want, approve each step, and end up with a workflow you can open, edit, and publish.

1. Log in to your n8n instance and select **New chat** in the left menu to talk to the n8n Assistant.

   ![New chat selected in the left menu, with the n8n Assistant chat box open](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-e93e6e4805142aca5ebd44f1f296f8678bbca267%2Fbuild-your-first-workflow-assistant-01.png?alt=media)
2. Enter this prompt, or dictate it, and select the send arrow:

   ```
   Build a workflow called Weather Log that runs every day at 8 AM:
   - Get the weather for Berlin from https://mockingbird.n8n.io/v1/weather/berlin
   - Add a report field that contains the city, temperature, and conditions e.g. The temperature in Berlin is 10°C. It's currently overcast.
   - Save the report to a new data table
   ```

   ![The weather workflow prompt entered in the n8n Assistant chat box](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-992ad780653bb1319d5f2664a9c2514d22140ee0%2Fbuild-your-first-workflow-assistant-02.png?alt=media)

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Mockingbird is a sample API with weather for about 40 European cities. Other cities return an error.</p></div>
3. Approve any prompts from n8n Assistant with **Allow once**. As it builds the workflow, you'll see the progress on the canvas to the right of the chat.

   ![n8n Assistant asking the user for permission](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-f301c104b5cd3724a94e85a7535d9e3d00523cb4%2Fbuild-your-first-workflow-assistant-03.png?alt=media)
4. Approve a run if prompted by n8n Assistant. Otherwise, ask n8n Assistant to run a test for you.

   ![n8n Assistant asking to run a live test, with the finished workflow on the canvas](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-586d76136370c83ea062c40743c45236cfcca9ae%2Fbuild-your-first-workflow-assistant-04.png?alt=media)
5. Select **Publish and enable the schedule** if prompted by n8n Assistant, as the workflow only runs at 8 AM every day once you publish it. Otherwise, ask n8n Assistant to publish it for you.

   ![User asking assistant to publish workflow](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-e92833c9556ded8de6476082106adfc26376ec1d%2Fbuild-your-first-workflow-assistant-05.png?alt=media)
6. Select the `weather log` data table at the top of the right-hand pane to check the workflow ran as intended. Otherwise, ask n8n Assistant to show you the data table.

   ![weather log tab selected at the top of the right-hand pane](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-b2143070c5eb31e3ac4b7b7cbdac4bf64e34d3ed%2Fbuild-your-first-workflow-assistant-06.png?alt=media)
7. Select **Personal** in the left menu to see the workflow. n8n Assistant saves all workflows under **Personal**.

   ![weather log listed under Personal, marked as Published](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-e717e2dcfbfb1838ad2e85d35e2c611c97a41ae2%2Fbuild-your-first-workflow-assistant-07.png?alt=media)

## What your workflow does

Open **weather log** on the canvas and you'll see four [nodes](/build/understand-workflows/workflow-components/work-with-nodes.md), each doing one job and passing its result to the next:

| Node                   | What it does                                                                                                                                                                                                                                              |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Every day at 8 AM**  | A [Schedule Trigger](/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger.md) that starts the workflow at 8 AM every day.                                                                                                                      |
| **Get Berlin weather** | An [HTTP Request](/integrations/builtin/core-nodes/n8n-nodes-base.httprequest.md) node that fetches the weather from the Mockingbird API.                                                                                                                 |
| **Add weather report** | An [Edit Fields (Set)](/integrations/builtin/core-nodes/n8n-nodes-base.set.md) node that builds the `report` text, using an [expression](/build/work-with-data/transform-data/expressions-for-data-transformation.md) to pull in the live weather values. |
| **Save weather log**   | A [Data table](/integrations/builtin/core-nodes/n8n-nodes-base.datatable.md) node that inserts the report as a new row in the table.                                                                                                                      |

{% hint style="info" %}
n8n Assistant chooses the node names itself, so yours may differ from the ones above.
{% endhint %}

## Optional: Build the workflow yourself

This section builds the weather log workflow by hand, one node at a time, without n8n Assistant.

You'll end up with a second workflow built from the same four nodes: **Every day at 8 AM**, **Get Berlin weather**, **Add weather report**, and **Save weather log**. You'll also create a new data table in the process.

### 1. Create the workflow

1. Select **Personal** in the left menu followed by **Create workflow**. This opens the canvas, where you’ll build your workflow and spend most of this section.

   ![Personal in the left menu and the create workflow button](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-25137bf3072eaff3007f357a95edde2f41b4f25e%2Fbuild-your-first-workflow-optional-01-01.png?alt=media)
2. Select the workflow’s name and change it to `Weather Log 2` (or something more creative). Select anywhere on the canvas to save the name.

### 2. Run it at 8 AM every day

You’ll use: **Schedule Trigger**

When building a workflow, the first question to answer is: “How should this workflow start?” On a schedule, for example 8 AM every day? When a user submits a form? When an application like Telegram sends a message?

For this build, you'll set it to run at 8 AM every day. While you build, you’ll run the workflow yourself to test it. Once you publish it at the end, the schedule runs it for you:

1. Select **Add first step**, then select **On a schedule**.

   ![On a schedule option](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-cc72b41fb23a0fa86e4ded75b5c3ce3772e02299%2Fbuild-your-first-workflow-optional-02-01.png?alt=media)
2. Select `8am` from the **Trigger at Hour** field in the Node details view. Select the close button in the top right to close the window.

   ![Trigger at Hour set to 8 AM](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-c06ced8528a912bde326efa09e6e3861e104c89c%2Fbuild-your-first-workflow-optional-02-02.png?alt=media)
3. Select the **Schedule Trigger** node and press space bar to open up the rename dialog box. Rename it to `Every day at 8 AM`.

   ![Renamed Schedule Trigger](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-d930e170605d957fcbd17ebc150c18889a8cacba%2Fbuild-your-first-workflow-optional-02-03.png?alt=media)

### 3. Get the weather for Berlin

You’ll use: **HTTP Request**

You’ve got your trigger, so it’s time to fetch the weather. The **HTTP Request** node sends a request to a web address, called an endpoint, and returns the data that address provides. Services that share data this way are APIs.

1. Select **+** after the trigger, type `http` in the **Search nodes** box, and select **HTTP Request**.

   ![HTTP Request in the search results](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-57f66f24a74bae5c39727fae3b95068af1492590%2Fbuild-your-first-workflow-optional-03-01.png?alt=media)
2. Paste `https://mockingbird.n8n.io/v1/weather/berlin` into the **URL** field in the Node details view.

   ![Mockingbird URL in the URL field](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-003dea0a8037113910cb3e0652992498b2d44701%2Fbuild-your-first-workflow-optional-03-02.png?alt=media)

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Mockingbird is a sample API with weather for about 40 European cities. Other cities return an error.</p></div>
3. Press **Execute step**. You should see the weather for Berlin in the output, including the `city`, `temp_c`, and `condition` fields you’ll use in the next step.

   ![Berlin weather output](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-f7f7a69a8d0612a1825e7ce0cbfc6d5d1a3f766c%2Fbuild-your-first-workflow-optional-03-03.png?alt=media)
4. Rename the node to be `Get Berlin weather`.

### 4. Turn the weather into a report

You’ll use: **Edit Fields (Set)**

Next, you’ll turn the weather data into a short report that anyone can read at a glance.

1. Select **+** after **Get Berlin weather**, select **Data transformation**, then select **Edit Fields (Set)**.

   ![Edit Fields (Set) under Data transformation](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-5462d028a677b26be79dd0169cfb496785602620%2Fbuild-your-first-workflow-optional-04-01.png?alt=media)
2. Select **Add Field** in the middle of the Node details view. For **Name**, enter `report`.

   ![Add Field button](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-191e07b87920ea786cf3cf858b458f9bdd17f271%2Fbuild-your-first-workflow-optional-04-02-01.png?alt=media)

   ![Field named report](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-141c12de2737f40150f2c8fe4cb4673bea00999b%2Fbuild-your-first-workflow-optional-04-02-02.png?alt=media)
3. Enter `The temperature in` for **Value**, then drag `city` from the input panel on the left. When you drop a field in, n8n switches **Value** to **Expression** mode, and you see:

   ```
   The temperature in {{ $json.city }}
   ```

   ![city dragged into the Value field](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-db39374ab2fedbb37cf9d2878a495b96ce840a6b%2Fbuild-your-first-workflow-optional-04-03.png?alt=media)

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>What's an expression?</strong></p><p><code>{{ $json.city }}</code> is a placeholder, called an expression. When the workflow runs, n8n swaps it for the real value. The input panel shows the output from <strong>Get Berlin weather</strong>, which becomes the input to this node. You drag fields in rather than typing them, and the preview under the field shows you the finished sentence. To learn more, see <a href="/build/work-with-data/expressions-versus-data-nodes.md#expressions">Expressions</a>.</p></div>
4. Drag `temp_c` in and update the wording to:

   ```
   The temperature in {{ $json.city }} is {{ $json.temp_c }}°C.
   ```

   ![Value with city and temperature](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-05d6b75efbb015408530e3f01aa1803e7f9280a4%2Fbuild-your-first-workflow-optional-04-04-01.png?alt=media)

   Add `It's currently` to the end, then drag `condition` in:

   ```
   The temperature in {{ $json.city }} is {{ $json.temp_c }}°C. It's currently {{ $json.condition }}.
   ```

   ![Value with city, temperature, and condition](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-5f3deb81adbff4aaf4c7ba628a9d53d9fe61a408%2Fbuild-your-first-workflow-optional-04-04-02.png?alt=media)
5. Rename the node to `Add weather report` and select **Execute step**.

### 5. Save the data

You’ll use: **Data table**

You’ve fetched the data and formatted it, so now it’s time to store it. You'll create a data table in the process.

1. Add a **Data table** node after **Add weather report** and select **Insert row** as the action.

   ![Insert row action](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-8ed395442c2b6b202c1f2efce676c7bdcead39e0%2Fbuild-your-first-workflow-optional-05-01.png?alt=media)
2. Open the node, select the drop down under **Data table**, then select **Create new data table**:

   ![Create a new data table](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-3dfb64c5396a6220ad9ede3e7cd4090e8d54f4af%2Fbuild-your-first-workflow-optional-05-02.png?alt=media)

   A new browser tab will open.
3. Enter `weather log 2` for the name of your data table (or something creative!), and select **Create**:

   ![Name the new data table](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-d316e744709e8b7e1af3a32d954cc73709ee6c4f%2Fbuild-your-first-workflow-optional-05-03.png?alt=media)
4. Select **Add Column** on the top right and enter `report` before selecting **Add Column**. This will be the column the data from the `Add weather report` node gets saved to.

   ![Add a column to the new data table](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-0bf66180682f05f0ecfdd49de8a3df80aa02d601%2Fbuild-your-first-workflow-optional-05-04.png?alt=media)

   Navigate back to the workflow tab.
5. Select the data table you just created from the **Data table** list and change **Mapping Column Mode** to **Map Automatically**. The `report` field from **Add weather report** has the same name as the column in the data table, so n8n maps them for you.

   ![Data table node with the data table selected and Map Automatically set](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-3b4cd2cd6b9fda2db4dd37735b2c72f75380822b%2Fbuild-your-first-workflow-optional-05-05.png?alt=media)
6. Rename the node to `Save weather log`.

### 6. Test and publish the workflow

Your workflow is complete. Test it, then publish it so it runs every day at 8 AM.

1. Select **Execute** under the canvas to test it. You should see green check marks on all four nodes:

   ![Successful workflow run after execution](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-10479180cc9280bc28e3632dc8af29610a544a71%2Fbuild-your-first-workflow-optional-06-01.png?alt=media)
2. Navigate to **Personal** > **Data tables** to see the new row.
3. Select **Publish** in the Canvas header and follow the prompts to publish the workflow.

   ![Publish the workflow](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-d969f80e0d19f877a0c3ebfaf06b4242a4aa65d8%2Fbuild-your-first-workflow-optional-06-03.png?alt=media)

## Next steps

* Take [courses at n8n Academy](https://go.n8n.io/gfzWgF).
* Explore more examples in [workflow templates](https://n8n.io/workflows/).

## Related resources

* [n8n Docs](/welcome.md)
* [Choose how to use n8n](/choose-how-to-use-n8n.md)
* [Use n8n Assistant](/build/ways-of-building-workflows/n8n-assistant.md)
* [Learning paths](/learning-paths.md)
* [Key concept glossary](/key-concept-glossary.md)
