Weather Mailer is a clean, ready-to-deploy Azure Logic App that takes a city name and an email address, fetches live weather data from OpenWeather, and sends a well-formatted email using Office 365.
-
HTTP trigger receives a JSON payload:
{ "city": "Tel Aviv", "email": "user@example.com" } -
Calls OpenWeather API in metric units (°C).
-
Parses and processes temperature, feels_like, humidity, wind speed, and description.
-
Converts wind speed from m/s to km/h.
-
Sends a formatted email via Office 365.
flowchart LR
A[Client / Caller] -->|HTTP POST city+email| B[Logic App - HTTP Trigger]
B --> C[HTTP action - OpenWeather API]
C -->|JSON weather data| D[Parse JSON]
D --> E[Compose values: temp, feels_like, humidity, wind m/s -> km/h]
E --> F[Office 365 - Send an email]
F --> G[Recipient inbox]
classDef azure fill:#2563eb,stroke:#1e40af,stroke-width:1,color:#fff
classDef svc fill:#0ea5e9,stroke:#0369a1,stroke-width:1,color:#fff
class B,D,E azure
class C,F svc
sequenceDiagram
autonumber
participant Client
participant LogicApp as Logic App
participant OpenWeather as OpenWeather API
participant O365 as Office 365
Client->>LogicApp: HTTP POST city+email
LogicApp->>OpenWeather: GET /data/2.5/weather?q=<city>&units=metric
OpenWeather-->>LogicApp: 200 OK (JSON)
LogicApp->>LogicApp: Parse JSON + convert wind m/s -> km/h
LogicApp->>O365: Send email (HTML body)
O365-->>Client: Email delivered
deploy/
├─ azuredeploy.json # ARM template for Logic App + O365 connection + $connections
├─ azuredeploy.parameters.json # Example parameter file
workflow/
└─ logicapp.definition.json # Full Logic App workflow definition (WDL)
docs/
└─ screenshots / diagrams # Optional
Use the button at the top or the Azure CLI:
$definition = Get-Content -Raw workflow/logicapp.definition.json
az login
az account set --subscription "<YOUR_SUBSCRIPTION_ID>"
az group create -n rg-logicapps-demo -l westeurope
az deployment group create `
-g rg-logicapps-demo `
-f deploy/azuredeploy.json `
-p logicAppName="la-weather-mailer" `
location="westeurope" `
openWeatherKey="<YOUR_OPENWEATHER_KEY>" `
office365ConnectionName="office365" `
workflowDefinition="$definition"- Active Azure subscription with permissions to deploy resources
- OpenWeather API key
- Office 365 account with permission to send email
-
Open your Logic App in Azure Portal.
-
Copy the HTTP POST URL from the HTTP trigger.
-
Send a POST request with:
{ "city": "London", "email": "you@example.com" } -
Check your inbox for the formatted weather email.
| Parameter | Example Value |
|---|---|
| City | Tel Aviv |
| Temperature | 28°C |
| Feels Like | 30°C |
| Humidity | 60% |
| Wind Speed | 14 km/h |
| Description | Clear sky |
Developed by Captain Azure - Ofek Ben Eliezer Microsoft Certified Trainer | Azure Architect | AI & Cloud Expert