# Get Weather Information

## Get Weather Information

### What does it do?

The **Get Weather Information** node pulls live or past weather details for a location. Think of it like a weather desk assistant that checks the conditions for you before your workflow sends alerts, plans field work, or builds reports.

#### Smart Features

* **Supports three weather modes**: Get **Current weather**, a future **Forecast**, or **History** for past dates.
* **Works with dynamic values**: You can fill the location and dates from earlier workflow steps using **@**.
* **Accepts several location formats**: Use a city, city and country, coordinates, postal code, IP address, or airport code.
* **Returns detailed weather data**: The output includes location details, conditions, temperatures, and more.
* **Shows service errors clearly**: If the weather service cannot match the location or date, the node returns that message.

> 🖼️ **\[GIF PLACEHOLDER: Dragging the Get Weather Information node from the Built-in tools panel onto the workflow canvas]**

### Real-World Business Value

* Add tomorrow’s forecast to logistics updates before dispatching drivers or field teams.
* Check historical weather during incident reviews, delivery analysis, or insurance reporting.
* Personalize customer messages based on local weather in each contact’s city.

### Step-by-Step Setup

* In the **Type** field, choose **Current weather**, **Forecast**, or **History**.
* In the **Value** field, enter the location you want to check.
* Use a simple format in **Value**, such as `London`, `Paris, France`, `48.8566,2.3522`, or `CDG`.
* If you choose **Forecast**, enter **Day** with a number from `1` to `14`.
* If you want one specific forecast date, enter that date in `YYYY-MM-DD` format.
* If you choose **History**, fill **Start date** and **End date** in `YYYY-MM-DD` format.
* Make sure **End date** is later than **Start date**.
* If your location comes from an earlier step, insert it with **@** instead of typing it manually.
* Run the workflow and review the returned weather details in the output.

> 🖼️ **\[IMAGE PLACEHOLDER: Configuration panel of this node filled with realistic example data]**

### The Transformation: Before & After

**Before**

```
Type: Forecast
Value: Ho Chi Minh City
Day: 3
```

**After**

```json
{
  "location": {
    "name": "Ho Chi Minh City",
    "country": "Vietnam",
    "localtime": "2026-04-14 15:05"
  },
  "current": {
    "temp_c": 34.0,
    "condition": {
      "text": "Sunny"
    }
  },
  "forecast": {
    "forecastday": [
      {
        "date": "2026-04-15",
        "day": {
          "maxtemp_c": 35.2,
          "mintemp_c": 27.1
        }
      }
    ]
  }
}
```

> 🖼️ **\[IMAGE PLACEHOLDER: The Output tab showing the final successful result]**

### Tips &  Warnings for First-Timers

* Use a clear location in **Value**. If the place name is vague, add the country.
* Always enter dates in `YYYY-MM-DD` format. Other date formats can fail.
* For **Forecast**, keep **Day** between `1` and `14`.
* For **History**, fill both **Start date** and **End date**. Leaving one blank can cause errors.
* Do not use an unsupported **Type** value. Stick to **Current weather**, **Forecast**, or **History**.
* Large forecast or history responses can contain a lot of detail. If a later AI step only needs a few fields, filter the result first.
* This node makes a fresh lookup every time. If you run the same workflow often, expect the weather data to refresh each run.
* Slow network responses can delay the workflow. Retry if the weather service is temporarily unavailable.

### Need help?

* Learn the basics in [How a node works](/getting-started/lets-start-with-the-basics/how-a-node-works.md)
* Build the full flow in [Create a workflow](/workflow-builder/create-a-workflow.md)
* Browse related nodes in [Component List](/workflow-builder/component-list.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.diaflow.io/workflow-builder/nodes/built-in-tools/get-weather-information.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
