In this article, we will cover how to get send Google Forms confirmations based on each response. Simply follow the steps below:
Google Forms offers a built-in feature for this task. Follow these steps:
Google Sheets does not have native email notification functionality so we will use Lido to send our emails. You can create a free account at: www.lido.app/go/signup
Create a new file in Lido. Click Connect Data, then select Google Sheets. Paste in the URL of the Google Sheet from Step 1 that contains your Google Form submissions. You will be prompted to login to a Google account that has access to the Google Sheet.
Then, select which columns to import to Lido. Each column should correspond to a Google Form question. You should select all of the columns that you wish to include in your email notifications.
Click Add Data. This will create a table in Lido of your Google Form submissions.
Next, we will customize our email notification content, including which information from the Google Form to include in the email confirmation.
Create your confirmation email templates in a new worksheet. You can reference different columns as variables with [@Column]. This will allow you to send the contents of new Google Form submissions directly in the body of your email notifications.
Now we need to link our newly created templates to our form submissions. Go back to your table and create a new computed column for “Email subject”.
In the new column, enter the formula:
```=STRINGTEMPLATE(Sheet1!$B$1)```
Make sure to replace this with the actual cell location of your email notification subject from the previous step.
Create another computed column and do the same thing for email body:
```=STRINGTEMPLATE(Sheet1!$B$2)```
You should now have a table that looks like this. Notice how the variables referenced with [@Column] are now replaced with the actual values from the form response for that row.
We will use Lido’s proprietary SENDGMAIL formula to send our email notifications. The formula is:
```=SENDGMAIL(<sender-credential>, "recipient", "subject", "body", H2)```
Here's what each parameter represents:
Sender-credential: The email address from which the email will be sent. You will need to log in to this email account the first time you set up this formula.
Recipient: The email address where the email will be delivered
Subject: The subject line of your email
Body: The content or message of the email
Status: The location of a spreadsheet cell that will be updated with the status of whether the email was successfully sent
Create another computed column. Then enter this formula in row 2:
```=SENDGMAIL(<sender-credential>, C2, E2, F2, H2)```
If you are copying and pasting the formula, make sure you replace the cell references as follows:
E2: the location of your subject column
F2: the location of your body column
H2: the location of an empty cell to the immediate right of this new computed column
This should return a column of SENDGMAIL Action formulas. To trigger an action, right click on the formula and select Run action.
You will be asked to login to the sender email address the first time you run this action. Make sure that it is a Google mail account, and that you log into the same email address that you’ve specified in the formula.
After the email successfully sends, you will see a “success” message flash in the cell. The cell you selected as the status cell will also now say “success”.
We need to add some logic to ensure that only one notification is sent per form submission.
First, add a Linked Column to your table to keep track of status. You will be prompted to choose an ID column. We recommend choosing Timestamp, since it will almost always be unique. If you did not connect the timestamp column, you can click Edit data and go back to the data browser to add it.
Make sure that the location of your status column is the same as the location specified in the status_cell for your SENDGMAIL formula. In this example, it is column H. If they are not the same, then update the SENDGMAIL formula to account for this.
Now we need to add an IF statement to our SENDGMAIL formula so that it only displays if an email notification has not already been sent (e.g., if Status does not equal “success”).
```=IF(H2<>”success”,SENDGMAIL(<sender-credential>, “recipient@email.com”, E2, F2, H2))```
As you can see, the SENDGMAIL formula now only displays if an email has not already been successfully sent.
The last step is to automate running all of the SENDGMAIL formulas in the column. Click on the column header and select Run column on a schedule.
This will open the automation panel. Select how frequently you want to check for updates. On each automation interval, Lido will pull in your latest form submissions and send notifications. In this example we will select 15 minutes.
Click Save. Then you are all set!
The automation starts running immediately, and you will start receiving notifications as soon as new Google Form submissions arrive.
We hope this article has helped you in setting up Google Forms confirmations that are personalized with data from the response. To optimize your workflow better, we recommend reading our guide on configuring Google Forms for building approval workflows.