Skip to content

OpenWhisk PHP action used to store data from an HTML form into Google Sheets

License

Notifications You must be signed in to change notification settings

akrabat/ow-php-form-to-google-sheets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Form Data to Google Sheets

OpenWhisk serverless PHP action to store data from an HTML form into Google Sheets.

Set up

  1. Install the Serverless Framework

    $ npm install --global serverless serverless-openwhisk
  2. Set up IBM Cloud Functions and log into the correct organisation and space. Ensure you can run:

    $ wsk api list

    (This will ensure that the ~/.wskprops file is up-to-date; it contains the relevant API keys that are used by Serverless when deploying.)

  3. Clone this repo(!)

  4. Run the package manager:

    $ npm install
  5. Set up the Google Sheet as per David McCoy's article

  6. Set the SHEETS_URL environment variable to the URL:

    $ export SHEETS_URL=https://script.google.com/macros/s/{stuff}/exec
  7. Deploy the API using the sls command:

    $ sls deploy
  8. Prove it works:

    $ curl "https://openwhisk.eu-gb.bluemix.net/api/v1/web/YOUR_NAMESPACE/ow-php-form-to-google-sheets/submit.http" \
     -d "firstname=Rob" -d "lastname=Allen" -d "email=rob@example.com"

    There should now be a new row in the Google Sheet.

Reference

About

OpenWhisk PHP action used to store data from an HTML form into Google Sheets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages