How to use Functions?
Step 1
Step 2
A basic Weather API call (link here)
async ({ lat, long }) => {
// Use Open-Meteo's public API for fetching weather data
let url = `https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${long}¤t_weather=true`;
let response = await fetch(url);
let data = await response.json();
return { weather: data.current_weather };
};An API call for Serper - a service for google search (link here)
Step 3
Step 4



Last updated
Was this helpful?