Web page contact-us email integration

Using Google Sheets, now you can send email from your web page contact-us form. Nowadays, we have a lot of open source forms available on the internet. But the advantage of this is simple and secure (Here we're not sharing our contact-us form details to anyone).

Google Docs has always been a secure tool for creating and managing documents over the internet. So here we expose API and record details using Google Sheets script engine.

Follow the below steps to integrate your web page contact-us form.

​Client changes

      • Creating a contact-us form in your web page with required fields (i.e., name, email, subject, message, etc..)

Server changes

      • Create a new blank Google Sheet in your drive.
      • Rename the sheet as responses.
      • create columns based on your contact-us form.
        1. First default column name: Timesheet
        2. Add column names based on the contact form (Note: contact-us form field names and spread sheet column names are same and case sensitive)
      • Select Tools --> Script editor option.
      • Replace the file: code.gs scripts in the editor section.
          • Note: Update email SUBJECT and TO_ADDRESS
      • Select File --> Save option to save the changes.
      • Select File --> Manage versions option to save the changes as new version.
      • Now publish the POST API
      • Select Publish --> Deploy as a web app option to deploy the changes for access.
          • Note
            • Select last created project version.
            • Change the execution access to yourself and accessing to anyone.
      • ​Click update button and copy the Current web app URL

​Client changes

    • Replace the copied URL in file: scripts.js and include the function to your web page contents.

Go ahead and submit the details through your form and view the results in your Google sheet and the configured email.