Questions tagged [google-cloud-functions]

Google Cloud Functions is a lightweight, event-based, asynchronous compute solution that allows you to create small, single-purpose functions written in Node.js, Python or Go that respond to cloud events without the need to manage a server or a runtime environment.

Google Cloud Functions is a lightweight, event-based, asynchronous compute solution that allows you to create small, single-purpose functions written in or that respond to cloud events without the need to manage a server or a runtime environment.

Related tags:

12970 questions
3
votes
3 answers

List files changed after a particular timestamp in Google Cloud Storage Bucket

I want to list the files that have changed/added in a Google Cloud Storage Bucket after a particular timestamp in node.js. I was going through documentation https://cloud.google.com/storage/docs/how-to but did not find any mechanism for it. const…
3
votes
3 answers

Set stackdriver alerts for specific error messages

Cannot find a clean way to set Stackdriver alert notifications on errors in cloud functions I am using a cloud function to process data to cloud data store. There are 2 types of errors that I want to be alerted on: Technical exceptions which might…
3
votes
1 answer

Firebase Cloud Functions Call : error : Object message : "Bad Request" status : "INVALID_ARGUMENT"

first of all i am working with react-native i wanted to use Custom Claims on my project since it seems to fit the role distribution i expect to use on my app. after setting my app following the documentation i succeed on creating some…
3
votes
1 answer

How to send a file from cloud storage using response.sendFile in cloud functions?

I'm trying to send a response back to a client using an http trigger from firebase cloud functions. When I sent the response using the file location from Cloud Storage, the sendFile method throws this error: "path must be absolute or specify root to…
Dyan
  • 1,263
  • 3
  • 16
  • 23
3
votes
1 answer

How to add a new field to all current documents in my database?

So I'm trying to implement a new cloud function for my application but it requires a little adjustment to my existing database data model. Each user in my database has a field that I am trying to update each week. I don't want this function to run…
3
votes
2 answers

uploading raw data to a firebase storage bucket in a Google Cloud function?

I have a Google Cloud Function and I'm trying to save some data into Firebase storage. I'm using the firebase-admin package to interact with Firebase. I'm reading through the documentation…
Diskdrive
  • 15,875
  • 25
  • 87
  • 148
3
votes
1 answer

How to send request from iOS (Swift) to Dialogflow V2 API without Cloud Functions?

Is it possible (and how) to call Dialogflow V2 API directly for intent detection from iOS app (Swift) or do I need to use Cloud Functions as suggested here Dialogflow integration of enterprise edition v2 into the ios and andriod app ? I have some…
wmatt
  • 475
  • 5
  • 16
3
votes
1 answer

How to implement GeoFirestore in Firebase Cloud-Functions the right way?

I try to implement GeoFirestore to my Firebase Cloud-Functions. When I try to deploy my code this error occur "TypeError: GeoFire is not a constructor". I use the index.js file for my functions. I tried to implement the GeoFire reference in my…
Scholte47
  • 35
  • 2
3
votes
2 answers

How to use modules replace functionality in cloud functions

I have a google cloud function that is a subdirectory in a repository. It uses the "Directory with source code" option in the settings menu. I keep getting this error on deploy: Deployment failure: Build failed: go: parsing /utils/pubsub/go.mod:…
Dean Galvin
  • 160
  • 1
  • 10
3
votes
2 answers

Opening/Reading CSV file from Cloud Storage to Cloud Functions

Is there a way to read and print the data in Cloud Functions from a csv file in Google Cloud Storage? The Cloud Function API document only says things about downloading the object to your local machine. I'm creating a fulfillment on dialogflow that…
3
votes
1 answer

Is firebase sevices.json needed for admin SDK on cloud functions

I am trying to write a function that writes to a different database when a user writes to the default database , I did my research and i am a little bit confused I saw this on firebase var admin = require('firebase-admin'); var serviceAccount =…
Sammy
  • 53
  • 1
  • 5
3
votes
1 answer

Google Cloud Function Node JS SFTP To Cloud Storage Transfer File Error

I'm trying to run the following code using node library ssh2-sftp but I don't get any error from GCP Console. What i'm trying to do here is to pipe the data that I receive from the SFTP into an output file on GCS. Here is the code: /** * Generic…
Nir
  • 1,204
  • 5
  • 19
  • 35
3
votes
3 answers

How to load local assets within a GCP cloud function?

I'm building a tiny GCP cloud function in Golang that returns a generated PNG file when calling it via HTTP. I deployed my code via ZIP-Upload in the Google Cloud Console. Currently it gets called properly and the code gets compiled etc. But in my…
3
votes
0 answers

Firebase Hosting redirect to Function + Angular Web App

I have an Angular app deployed to Firebase Hosting, now I am writing a function with express.js and deploying to Firebase Functions. The problem is the rewrite section of the firebase.json doensn't work as I expect it to after deploying. Relevant…
PsyGik
  • 2,033
  • 1
  • 20
  • 35
3
votes
1 answer

How to fetch a URL with Google Cloud functions? request?

I used Google Apps Script with var response = UrlFetchApp.fetch(url, params); to get a response from an api. Sadly its too many request and too many data i need to be handled with Google Apps Script in Drive My idea was now to switch to Google…
Tobi
  • 1,122
  • 1
  • 11
  • 27