ODK Collect now includes native support for Google Drive and Google Sheets. This powerful new feature helps organizations distribute blank forms via Google Drive and send submissions to Google Sheets without needing to use servers like ODK Aggregate.
To use Google Apps for your data collection campaign, you'll need to design an XForm and convert it to an XML form, upload that XML form to Google Drive for ODK Collect to download, and then create a blank Google Sheet that ODK Collect will submit the data to. These steps are detailed below.
A. Design an XLSForm with adjustments for Google Apps
- Ensure no repeats, audio, or video prompts are in the form. Groups, pictures, GPS prompts are perfectly fine.
- Ensure the form has less than 254 variables. Any non-group row (e.g., text, integer, select_one, geopoint, calculate, date) is considered a variable.
- Ensure only alphanumeric characters (123ABCdef) and dashes (-) are in the name column of the survey and choices sheets.
- Ensure the submission_url in the settings sheet is link to a Google Sheet. More on this below.
Need an example to start from? Download the Google Demo XLSForm file.
B. Create a blank Google Sheet to host data submissions from ODK Collect
- On your computer, log into a Google account and create the Google Sheet. Save it as whatever you'd like (e.g., Google Demo Results).
- Share this Google Sheet and give write privileges to any Google accounts in ODK Collect that will be submitting data.
- Copy the URL of the Google Sheet (e.g., https://docs.google.com/spreadsheets/d/1234/edit#gid=0) into the submission_url column of the settings sheet in your XLSForm.
C. Convert XLSForm to XML form and store in Google Drive for download to ODK Collect
- Convert the XLSForm to an XML form. We recommend XLSForm Offline.
- Once you have the XML, upload it to a Google Drive account.
- Share the XML and give view privileges to any Google accounts in ODK Collect that will be downloading the form.
- Your Drive should now have both files, your blank Sheet and the XML of your XLSForm.
D. Configure ODK Collect to work with Google Apps
- In ODK Collect's General Settings, select Drive and Sheets as your platform.
- Select a Google user account in ODK Collect that has view privileges to the XML form in Google Drive and write privileges to the Google Sheet.
- Leave the Google Sheets URL preference blank.
E. In ODK Collect, download form and submit data
- Now, Get Blank Form, download, fill, save, submit. If your device asks for permission to post Sheets, grant the permission.
- Go to your Sheet in your web browser to see your results.
- If the form has pictures, they will be posted to each submitters' Google Photos account and there will be links to the images placed in the sheet.
Upgrade to ODK Collect 1.4.11 to try serverless deployments of ODK using Google Drive and Sheets support. You'll find it works great for demos, trainings, and campaigns with simple forms!