How to two-way sync your form with Google Sheets
Google Sheets help you organize your forms’ data easily. Let’s see how you can two-way sync your online form with Google Sheets in a few steps.
Two-way sync of forms with Google Sheets helps you automatically update data in two systems – your form and your sheet – in real-time. This way, any data submitted through a form is automatically added to a Google Sheet, and any changes made to the sheet are automatically reflected in the form’s rows.
This two-way sync eliminates the need for manual data entry and ensures that all data is accurate and up-to-date.
With Formaloo, you can easily sync all your forms’ data with Google Sheets in a few clicks. It helps you manage your data in Google Sheets while your Formaloo form is live and users are submitting it.
With the new two-way sync feature, you can also update your forms in Formaloo to ensure all changes in the sheet are automatically reflected in your form.
Steps to two-way syncing your form with Google Sheets
To start, open your Formaloo dashboard, and follow these steps to continue:
Sync your form with the Google Sheet
Click on the profile button and select "App Store". Now click on "Google Sheets" and choose your base form that you want to sync with Google Sheets.
Then enable the “Two-way Formaloo – Google Sheet sync” option on the same pop-up window.
Add the "Sheet title" and "Sheet URL" and click the "Connect" button.
Add a trigger on Google sheet
Now you should set a script on the connected google sheet and add a trigger for it.
Open your sheet, and on the menu under the “Extensions” menu item, choose the “Apps Script” option.
Then, delete everything from the opened editor and paste the following script instead:
function formalooSyncOnEdit(e) {
var range = e.range;
var spreadSheet = e.source;
var column = range.getColumn();
var row = range.getRow();
const url = "https://api.formaloo.net/v3/sync-with-gsheet/"
const headers = {
"x-api-key": "e2afd323b824a38e10a07d86ad5c527c2c007c0d"
};
const formData = {
"row": row,
"column": column,
"sheet_id": spreadSheet.getId()
};
const options = {
'method': 'post',
'contentType': 'application/json',
'payload': JSON.stringify(formData),
'headers': headers
};
UrlFetchApp.fetch(url, options);
}
Save changes from the save icon on the menu above the editor. After saving the function, go to the triggers part, and add a new trigger.
On the opened pop-up, change the “Select event type” field to “On edit”. Also, change the “Failure notification settings” field’s value to “Notify me immediately”. Then save the trigger.
After saving, it asks you to give access to the trigger so it can implement the updates. Give the access, and you’re done!
Once two-way sync is enabled, any changes made to the Google Sheet will be reflected in the form. For example, if a row is deleted from the sheet, the corresponding response will be removed from the form. Similarly, if a value is changed in the sheet, the corresponding value in the form will be updated.
Important note to have in mind when two-way syncing
When two-way syncing your form with Google Sheets, it’s important to note that it syncs the data, not the fields.
The two-way sync only applies to the data. If you add a new column to Google Sheets, it won’t automatically add a new field to your form. Therefore, changing the format of your Google Sheet or the form, will affect the two-way sync’s performance.
So whenever you add a new column to your Sheet, ensure it’s added to your form as well. Also, if you add a new field to your form, make sure it exists on your Google Sheets as well. Read on to learn how you can do it.
How to add a new column/field in two-way sync
If you decide to add a new column to your Google Sheet or add a new field to your form, in order for your two-way sync to work, you should make sure it is applied to both parties.
First, create the field on your form and save the changes. Then create a new column in your Google Sheet and put the slug of the Formaloo field in front of the field’s name in parantheses.
How to best use the forms’ two-way sync with Google Sheets
There are many benefits to using two-way sync to manage form data. First, it saves time and eliminates the risk of human error associated with manual data entry. It also ensures that all data is accurate and up-to-date, which is crucial for making informed decisions. And finally, it simplifies the data management process, making it easier to analyze and share data with others.
Last but not least, two-way sync between forms and Google Sheets is a powerful tool for managing data. By automating the process of data entry and ensuring that all data is accurate and up-to-date, two-way sync simplifies the data management process and makes it easier to analyze and share data.
Whether you’re running a small business or managing a large organization, two-way sync can help you streamline your data management process and make better decisions based on accurate data.
In this article, we went through the steps to sync your Google Sheets with your form in both directions. If you’re looking for an easy-to-use and customizable online form builder to sync with Google Sheets, we recommend giving Formaloo a try.
Sign up for free and follow us on our Youtube channel for more information.