Reputation: 21
I need help in Cloud Functions. I previously deployed micro-services written with Python and so, got URL address to execute the script. Now, I would like to execute this URL when a document is written in my Cloud Firestore. If I understood, I need Cloud Functions to do it but someone can help me ?
For example, every time I add a document in "temp" collection, I would like to execute my URL.
Thanks
Upvotes: 0
Views: 48
Reputation: 83058
You should call your URL from the Cloud Function, for example with the Axios library.
You will find a lot of examples on SO: https://stackoverflow.com/search?q=axios+cloud+function
If you encounter any problem, update your question with all the details.
Important (if you are using Cloud Functions for Firebase):
You need to be on the "Blaze" pricing plan.
As a matter of fact, the free "Spark" plan "allows outbound network requests only to Google-owned services". See https://firebase.google.com/pricing/ (hover your mouse on the question mark situated after the "Cloud Functions" title)
Upvotes: 1