Actions24
- FIPE – Preço
- CEP (v1)
- CEP (v2)
- DDD → UF & cidades
- Banco por Código
- Câmbio – Cotação
- CNPJ
- Corretora por CNPJ
- Registro.br – Domínio
- Taxa por Sigla
- Feriados por Ano
- FIPE – Marcas
- FIPE – Veículos por Marca
- IBGE – UF por Código
- IBGE – Municípios
- NCM – Lista
- NCM por Código
- ISBN
- CPTEC – Buscar Cidade
- CPTEC – Clima Aeroporto
- CPTEC – Previsão 1 dia
- CPTEC – Previsão N dias
- CPTEC – Ondas 1 dia
- CPTEC – Ondas N dias
Overview
This node integrates with BrasilAPI, a public API service providing various Brazilian data endpoints. Specifically, the "CPTEC – Previsão 1 dia" operation fetches a one-day weather forecast for a given city identified by its city code from CPTEC (Centro de Previsão de Tempo e Estudos Climáticos).
Use cases include:
- Retrieving daily weather forecasts for Brazilian cities to inform decision-making in logistics, event planning, or agriculture.
- Automating weather data collection for dashboards or reports.
- Integrating weather information into other workflows that depend on current climate conditions.
Example: Given a city code, the node returns detailed weather forecast data for that city for the next day.
Properties
| Name | Meaning |
|---|---|
| City Code | Numeric identifier of the city for which the one-day weather forecast is requested. |
Output
The node outputs JSON data containing the weather forecast for the specified city for one day. The structure includes various meteorological details such as temperature, humidity, wind, precipitation, and other relevant weather parameters provided by CPTEC.
No binary data output is produced by this operation.
Dependencies
- Requires internet access to call the BrasilAPI endpoints.
- No special authentication or API keys are needed as BrasilAPI is a public API.
- The node uses the
gotHTTP client library internally to perform requests. - No additional n8n environment variables or credentials are required for this operation.
Troubleshooting
Common issues:
- Invalid or incorrect city code may result in errors or empty responses.
- Network connectivity problems can cause request timeouts or failures.
- BrasilAPI service downtime or changes in API endpoints could lead to unexpected errors.
Error messages:
Unsupported operation ...— indicates an invalid operation parameter; ensure "CPTEC – Previsão 1 dia" is selected.- Request timeout errors — check network connection and retry.
- API response errors — verify the city code is valid and corresponds to a known city in CPTEC.
Links and References
- BrasilAPI official website: https://brasilapi.com.br/
- CPTEC (INPE) weather forecasts: https://portal.cptec.inpe.br/
- BrasilAPI GitHub repository: https://github.com/BrasilAPI/BrasilAPI