Export Contacts to Google Sheet

Last updated December 22, 2022

Automatically import User Data from your Dashboard and User Export CSV file into one Google Sheets spreadsheet.

You do not see “User Export” in your Dashboard?

This means that you have not activated email collection via Skin Match Technology. If you would like to add the feature please contact questions@skin-match.com or your personal contact at Skin Match Technology to get it set up.

Get your CSV link from your Dashboard

  1. Login at getskinmatch.com with your given login credentials. Go to Administration > Edit Questionnaire > User Export

  2. Click on “Export all users” on the right side of your mouse so the window with the following options opens. Select “Copy Link Address”.

Import your CSV Link to a Google spreadsheet

Click the following link and follow the instructions form Google: https://developers.google.com/apps-script/samples/automations/import-csv-sheets

Coding level: Intermediate
Duration: 15 minutes
Project type: Automation with a

The script runs daily on a time-driven trigger. It iterates through CSV files in a designated folder and adds the data from each file to a spreadsheet. By default, the script removes the header row of each CSV dataset before adding the data to the last row of the sheet. The script sends a summary email listing the files that were imported and moves the files to a different folder to prevent duplicate processing.

The script also includes functions that set up sample CSV files to demo this solution.

Apps Script services

This solution uses the following services:

  • Script service–Creates the time-driven trigger.

  • Drive service–Gets the folders that the script uses to store processed and unprocessed CSV files and creates them if they don't exist. Gets the Apps Script project URL to include in the summary email.

  • Spreadsheet service–Gets the spreadsheet where the script adds the data from each CSV file.

  • Base service–Uses the Session class to get the user's email address and the script's time zone.

    • The user is based on who runs the script. Since the script runs on a time-driven trigger, the user is defined as the person that created the trigger.

    • The script uses the time zone to add the date and time that the script ran to the summary email.

  • Utilities service–Parses each CSV file into an array. Formats the date that the script adds to the summary email.

  • Mail service–Sends the summary email after data from CSV files are imported into the spreadsheet.

Prerequisites

To use this sample, you need the following prerequisites:

  • A Google Account (Google Workspace accounts might require administrator approval).

  • A web browser with access to the internet.

Related Topics