4

I need to invoke an AWS Lambda function from within a Google Sheet following any changes to the spreadsheet. I have a Google App Script that executes when any changes are made to the spreadsheet but need an http request to trigger a Lambda function.

The Lambda function will be NodeJS and contain a gsjson package (that converts a Google Sheet to JSON) and then move the newly created JSON file to S3 using either S3Cmd or trigger another S3 Lambda function that can move files to S3 buckets:

Google Sheet->Google App Script->Trigger AWS API Gateway?

Lambda function(NodeJS)->gsjson npm module->Create JSON file->Move JSON file to S3 bucket

What action/trigger can be used to invoke a Lambda function/AWS Gateway API from inside a Google App Script?

1 Answer 1

4

What action/trigger can be used to invoke a Lambda function/AWS Gateway API from inside a Google App Script?

An HTTP request to an AWS API Gateway endpoint (aka GET/POST/etc. some URL) would work. API Gateway can be configured to trigger a Lambda function whenever that endpoint is invoked.

Take a look at the docs.

Here is a relevant AWS Tutorial series to complement.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks Raphael. Any syntax ideas for the HTTP request in the Google App Script? Is it just a case of pointing to the webhook URL within the Google App Script?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.