> 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, Format Weather Message, and Save Weather Report](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-3e3553a50a6bcd4a9cfd1b315b9cf039e5d96625%2Fbuild-your-first-workflow.png?alt=media)

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

```
The temperature in berlin is 7.4°C. It's currently overcast.
```

The build takes about 15 minutes. Apart from n8n, you don’t need any accounts, API keys, or 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

## 1. Create the workflow

Log in to your n8n instance, then:

1. Select **Personal** in the left menu. This is where your workflows live.

   ![Personal in the left menu](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-85c3edcf10180966c40f0f826da0a4ab7679beec%2Fbuild-your-first-workflow-create-workflow-01.png?alt=media)
2. Select **Create workflow** at the top right. This opens the canvas, where you’ll build your workflow and spend most of this tutorial.

   ![Create workflow button](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-55758edc996be986a974008c1ead88254fb638ab%2Fbuild-your-first-workflow-create-workflow-02.png?alt=media)
3. Select the workflow’s name and change it to `Weather Log`. 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 first 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-db32a1a9d08b479307fee1ae22bee73bfea707ab%2Fbuild-your-first-workflow-schedule-01.png?alt=media)
2. In the Node details view, select `8am` from the **Trigger at Hour** field.

   ![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-e6289e358a060588fe74a9f891890d664749254e%2Fbuild-your-first-workflow-schedule-02.png?alt=media)
3. Select **Schedule Trigger** at the top left and rename it to `Every day at 8am`.

   ![Renamed Schedule Trigger](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-a726fca721b5f51a5d028a380638bb3b5139ced0%2Fbuild-your-first-workflow-schedule-03.png?alt=media)
4. Select the **x** at the top right to close the Node details view and return to the canvas.

## 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-dbff1108a1e96b30be91c2064f47f3fce4547972%2Fbuild-your-first-workflow-get-weather-01.png?alt=media)
2. In the Node details view, paste `https://mockingbird.n8n.io/v1/weather/berlin` into the **URL** field.

   ![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-dfd8b6c447ae4234cfd7055e754fc6071133807f%2Fbuild-your-first-workflow-get-weather-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. Select the node’s name at the top left and rename it to `Get Berlin Weather`, then select **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-3a20c5d051a86ed2683538f0e49e55844559ced9%2Fbuild-your-first-workflow-get-weather-03.png?alt=media)

## 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-c53c0359ccfdc43e61d3bb8cf84be9692091503c%2Fbuild-your-first-workflow-report-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-8fc806bef9f6c5e0b136831b4a5e36fc928cb1f5%2Fbuild-your-first-workflow-report-02.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-a1523afe781822ad3a89e085c19db914c2a1a3e0%2Fbuild-your-first-workflow-report-03.png?alt=media)
3. For **Value**, enter `The temperature in`, 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-9a1dd63851210c02e888c7bfd173ad4620537197%2Fbuild-your-first-workflow-report-04.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-a946b896d2f0002dc643c4bab00d5e562f131f3b%2Fbuild-your-first-workflow-report-05.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-a91f40acf4e03eb6a63b3504a6e6ec3e447e5132%2Fbuild-your-first-workflow-report-06.png?alt=media)
5. Rename the node to `Format Weather Message` and select **Execute step**. You should see output like:

   ```
   The temperature in berlin is 7.4°C. It's currently overcast.
   ```

   ![Finished weather report output](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-37aca0f9c68733a81d296ec954f160b6daa54d3e%2Fbuild-your-first-workflow-report-07.png?alt=media)

## 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. For this, you’ll use n8n’s [data tables](/build/work-with-data/data-tables.md).

1. Select **Personal** in the left menu, then select **Data tables**.

   ![Data tables tab](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-e660228d53104e41ad8b920aa8e200993da2e280%2Fbuild-your-first-workflow-save-data-01.png?alt=media)
2. Select **Create data table**, name it `weather_data`, and select **Create**.

   ![New, empty data table](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-3f6616340ff863600c830f548a8be3dcadd99ce5%2Fbuild-your-first-workflow-save-data-02.png?alt=media)
3. Select **Add Column**, enter `report` for **Name**, then select **Add Column** again. This gives you a column to store the weather report in.

   ![report column in the new data table](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-58619b8d0cfd7559ab0529189517a0292e445f97%2Fbuild-your-first-workflow-save-data-03.png?alt=media)
4. Open your **Weather Log** workflow (**Personal** > **Weather Log**). Add a **Data table** node after **Format Weather Message** 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-35cc54ebabca312e4319d1047aa887b942ff0b4e%2Fbuild-your-first-workflow-save-data-04.png?alt=media)
5. Rename the node to `Save Weather Report`.
6. Select `weather_data` from the **Data table** list and change **Mapping Column Mode** to **Map Automatically**. The `report` field from **Format Weather Message** has the same name as the column in the data table, so n8n maps them for you.

   ![Save Weather Report 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-df49c194eda35f0d1e212a603e60d3a392b909c3%2Fbuild-your-first-workflow-save-data-05.png?alt=media)

## 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 workflow** to test it, then open the `weather_data` table to check that n8n inserted a row.

   ![Successful workflow run](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-53cf4f42dad3bc60799e8098a0ce3fe787988663%2Fbuild-your-first-workflow-test-and-publish-01.png?alt=media)

   ![New row in the data table](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-e57ea288225db8034eb9604a54593352b443ca67%2Fbuild-your-first-workflow-test-and-publish-02.png?alt=media)
2. Select **Publish** in the Canvas header and follow the prompts to publish the workflow.

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

## What you learned

Congratulations, your workflow now runs at 8 AM every day. Along the way, you’ve learned how to:

* **Start a workflow with a trigger.** Yours runs on a schedule. [Schedule Trigger](/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger.md)
* **Add and connect nodes.** Each node does one job and passes its result to the next. [Work with nodes](/build/understand-workflows/workflow-components/work-with-nodes.md)
* **Fetch data from an API.** You used the HTTP Request node to get weather data from a web address. [HTTP Request](/integrations/builtin/core-nodes/n8n-nodes-base.httprequest.md)
* **Work with data between nodes.** The output of one node becomes the input of the next. [Understand n8n's data structure](/build/work-with-data/understand-n8ns-data-structure.md)
* **Use expressions.** Dragging fields in builds an expression for you, so you can use live data without writing code. [Expressions for data transformation](/build/work-with-data/transform-data/expressions-for-data-transformation.md)
* **Store data.** Each run saves a new row to your data table, so you keep every report after the workflow finishes. [Data tables](/build/work-with-data/data-tables.md)

## Optional: Build with n8n Assistant

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

n8n Assistant is in Preview and may change in future releases. See [Use the n8n Assistant](/build/ways-of-building-workflows/n8n-assistant.md) page for availability.
{% endhint %}

n8n Assistant is another way to build workflows, using prompts. Now that you’ve built **Weather Log** yourself, you’ll understand what n8n Assistant creates.

1. Open your **Weather Log** workflow, select **Published** at the top right, and select **Unpublish**. Otherwise your workflow and the one n8n Assistant creates both run at 8 AM.

   ![Unpublish option](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-2af858a635ef8e2c3b1d0cc15a7bd35ec5220ef1%2Fbuild-your-first-workflow-assistant-01.png?alt=media)
2. Select **n8n Assistant** in the left menu.

   ![n8n Assistant in the left menu](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-1c04671444ce81d21bafe3e9910a2807ce324251%2Fbuild-your-first-workflow-assistant-02.png?alt=media)
3. Enter this prompt:

   ```
   Every day at 8am:
   - Get the weather for Berlin from https://mockingbird.n8n.io/v1/weather/berlin
   - Add a report field that contains the city, temperature, and conditions
   - Save the report to a data table called weather_data
   ```

   ![Prompt entered in n8n Assistant](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-1504f55cc2ac2cdf74dd63036d4956b7c61afa45%2Fbuild-your-first-workflow-assistant-03.png?alt=media)

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>n8n Assistant may detect your existing <strong>Weather Log</strong> workflow. Ask it to “build a fresh, separate copy”.</p></div>
4. Approve each step when n8n Assistant asks. When it finishes, you should see a workflow like this:

   ![Workflow built by n8n Assistant](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-4f7071d43ae23de9b7ad18cfc9a92fa7305f3882%2Fbuild-your-first-workflow-assistant-04.png?alt=media)
5. Select **Execute workflow**, then check the data table for a new row:

   ![Successful run of the copied workflow](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-b7e8e57c17f481caf58e38f1e8875a1b5c2f1c70%2Fbuild-your-first-workflow-assistant-05.png?alt=media)

   ![Second row in the data table](https://2446198290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCxSeOtVxqqhfxMSac0AV%2Fuploads%2Fgit-blob-67ddea35a114e2b3759c57a6cd848745affef6a2%2Fbuild-your-first-workflow-assistant-06.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)
* [Learning paths](/learning-paths.md)
* [Key concept glossary](/key-concept-glossary.md)
