This is my function. It simply requests a weather report every 5 minutes from an API and writes the data into a Firestore collection/document:
const functions