1. Goal Getter Tracking System
We will build a simple yet effective Overall health and Goal tracking system using Google Forms, Sheets, and Looker Studio with automation via tools like Zapier/Make.
A. Design Google Form
Fields to include in your daily form:
Health Metrics:
Current weight
Hours of sleep
Daily water intake
Sugar intake (Yes/No or grams)
Exercise minutes
Diet Tracking:
Calories consumed (estimated)
Meals (breakfast, lunch, dinner, snacks).
Mental Health:
Happiness rating (1-10)
Stress level (1-10)
Business/Work:
Hours worked
Tasks completed
Revenue generated
Other Notes:
- Any observations or symptoms.
B. Google Sheets Integration
Responses from Google Form will auto-populate into a Google Sheet.
Create separate sheets/tabs for each category (health, diet, exercise, work, etc.).
C. Visualization Using Looker Studio
Link the Google Sheet to Looker Studio.
Create charts to visualize:
Weight trends over weeks/months.
Exercise consistency.
Correlation between happiness and work productivity.
Set up a dashboard with key metrics for easy monitoring.
D. Automations with Zapier/Make
Daily Reminders: Use Zapier/Make to send a notification to your phone/email reminding you to fill out the form.
Weekly Reports: Automatically generate a summary email/report of your data with key insights like:
- Average sleep, weight changes, happiness rating, etc.
Alerts: If critical metrics like weight drop too low or stress increases too high, send an urgent notification.
3. Implementation Steps
Step 1: Google Form
Create the form with fields as mentioned above.
Share the form link with yourself for daily access.
Step 2: Google Sheet
Check the responses tab for raw data.
Organize the data into categories and clean unnecessary entries.
Step 3: Looker Studio
Go to Looker Studio (https://datastudio.google.com).
Connect your Google Sheet as a data source.
Create visualizations for your key metrics.
Step 4: Automations
Use Zapier/Make to:
Schedule reminders.
Send weekly summaries via email.
Alert on critical thresholds (e.g., weight below 50 kg).
Yes, I understand exactly what you're asking. You want to set KPIs (Key Performance Indicators) in Looker Studio that visually indicate whether you're meeting your goals, and you also want to set up notifications (e.g., for falling below these goals) to be sent to Discord instead of email. Let me guide you step-by-step:
1. Setting Up KPIs in Looker Studio
In Looker Studio, you can configure KPIs with conditional formatting to visually represent your progress. Here's how:
Steps to Set Up KPIs
Define KPIs:
Sleep: Goal is 8 hours. Anything below shows red, above green.
Revenue: Monthly goal $30,000. Daily goal is approximately $1,000. Progress below target shows red.
Meetings: Goal is 12 qualified meetings/day. Below shows red, above shows green.
Add Conditional Formatting in Looker Studio:
Open your Looker Studio report.
Add a Scorecard visualization for each metric (e.g., Sleep, Revenue, Meetings).
In the Style or Data panel, enable "Conditional Formatting."
Set the conditions:
Example for Sleep:
Condition 1: If sleep hours ≥ 8 → Green.
Condition 2: If sleep hours < 8 → Red.
Example for Revenue:
Condition 1: If daily revenue ≥ $1,000 → Green.
Condition 2: If daily revenue < $1,000 → Red.
Similar setup for Meetings.
Create Trend Visualizations:
- Add a line chart or bar chart to visualize trends over time (e.g., daily revenue, sleep hours).
Progress Bar:
- Use a progress bar to show percentage completion for monthly revenue or meeting goals.
How it Works:
The KPIs will automatically update as new data comes in.
The colors (red/green) will dynamically reflect your progress.
2. Sending Notifications to Discord
You can use Zapier or Make (formerly Integromat) to send notifications to a Discord channel. Here’s how:
A. Set Up a Webhook in Discord
Open your Discord server.
Go to Server Settings > Integrations > Webhooks.
Create a new webhook.
Copy the webhook URL. This will be used in Zapier/Make.
B. Create a Zapier Workflow
Trigger: Choose Google Sheets as the trigger app.
- Trigger when a new row is added (i.e., when you fill out your health tracker).
Condition (Optional): Use a filter to only trigger if a KPI falls below its target.
- Example: "If sleep hours < 8" or "If daily revenue < $1,000."
Action: Choose Webhooks by Zapier.
Method: POST.
URL: Paste the Discord webhook URL.
Payload: Customize the message format.
Example:
{ "content": "🚨 Alert! Your daily sleep was only 6 hours. Aim for 8 hours." }
C. Using Make (Alternative to Zapier)
Create a scenario in Make.
Connect Google Sheets as the data source.
Add a filter to trigger notifications only when specific conditions are met.
Add a webhook module and paste your Discord webhook URL.
Customize the message format.
3. Automating Revenue and Meetings Progress Alerts
In your Google Form or Google Sheet, add columns for:
Revenue Target: Set daily/monthly targets.
Meeting Target: Daily target (e.g., 12 meetings).
Use formulas in the sheet to calculate:
Variance: (Actual - Target).
Status: Add a column to show "On Track" or "Below Target."
Connect this data to Looker Studio for KPI visualization and Zapier/Make for notifications.
Example for Revenue Alert (Discord):
If daily revenue is below $1,000:
- Discord message: "🚨 Daily revenue below target: $800. Goal is $1,000/day."
Example for Meeting Alert (Discord):
If meetings fall below 12:
- Discord message: "⚠️ Only 8 qualified meetings today. Target is 12."
Now Create a Form
questions for your Goal Progress Tracker Form*, based on your requirements:*
Section 1: Personal Health Metrics
What is your current weight?
(Input: Number in kg)How many hours did you sleep last night?
(Input: Number of hours)How many liters of water did you drink today?
(Input: Number in liters)Did you consume any sugar today?
(Options: Yes / No)How many calories did you consume today (approx.)?
(Input: Number in kcal)Did you take your vitamins/supplements today?
(Options: Yes / No / Not Applicable)
Section 2: Diet and Nutrition
What did you eat for breakfast?
(Short text answer)What did you eat for lunch?
(Short text answer)What did you eat for dinner?
(Short text answer)Did you have any snacks? If yes, list them.
(Short text answer)
Section 3: Exercise and Activity
How many minutes did you exercise today?
(Input: Number of minutes)What type of exercise did you do today?
(Options: Bodyweight exercises / Yoga / Cardio / Stretching / Other)Did you go outside today?
(Options: Yes, for fresh air / Yes, for a walk / No)
Section 4: Mental Health and Well-Being
How would you rate your happiness today?
(Scale: 1 - Very Low, 10 - Extremely Happy)How would you rate your stress level today?
(Scale: 1 - No Stress, 10 - Extremely Stressed)How focused were you today?
(Scale: 1 - Distracted, 10 - Highly Focused)
Section 5: Productivity and Business Goals
How many hours did you work today?
(Input: Number of hours)How many outreach messages/emails did you send today?
(Input: Number)How much revenue did you generate today?
(Input: Amount in your currency)How many qualified appointments/meetings did you schedule today?
(Input: Number)How many of those meetings were completed today?
(Input: Number)
Section 6: Notes and Observations
What went well today?
(Short text answer)What could have been better?
(Short text answer)Any additional notes or observations?
(Short text answer)
Section 7: Customizable KPIs (Optional)
Daily Goal Check-In: (Customizable field to track personalized goals)
Example: Did you achieve at least 12 qualified appointments today? (Yes/No)
Example: Did you reach your calorie/protein target today? (Yes/No)
KPIs (Key Performance Indicators) for each question in your Goal Getter Progress Tracker Form, along with suggested targets for health, productivity, and well-being. These KPIs will help you measure progress against goals effectively.
Section 1: Personal Health Metrics
What is your current weight?
- KPI: Target weight should be between 60-70 kg for optimal health, depending on your height. Aim to gain 0.5-1 kg per month.
How many hours did you sleep last night?
- KPI: 7-9 hours per night is essential for physical recovery and mental clarity.
How many liters of water did you drink today?
- KPI: 3-4 liters/day is recommended for adequate hydration, depending on activity level and weather.
Did you consume any sugar today?
- KPI: Limit sugar to 20-30 grams/day (including natural sugars). Aim for 0 processed sugar if possible.
How many calories did you consume today (approx.)?
KPI: 2,500-3,000 calories/day to support weight gain and muscle growth.
Protein: 100-120 grams/day.
Carbs: 250-300 grams/day.
Fats: 60-70 grams/day.
Did you take your vitamins/supplements today?
- KPI: Take a multivitamin daily if recommended by a healthcare provider.
Section 2: Diet and Nutrition
What did you eat for breakfast?
- KPI: Include 20-30 grams of protein, complex carbs (like poha, oats), and healthy fats.
What did you eat for lunch?
- KPI: Balanced meal with 40-50 grams of protein, vegetables, whole grains, and some healthy fats.
What did you eat for dinner?
- KPI: Lighter meal with 30-40 grams of protein and fewer carbs (to prevent excess calories before bed).
Did you have any snacks? If yes, list them.
- KPI: Healthy snacks with 10-15 grams of protein (e.g., nuts, seeds, fruit, or peanut butter toast).
Section 3: Exercise and Activity
How many minutes did you exercise today?
- KPI: 30-45 minutes/day, including bodyweight exercises like push-ups, squats, planks, and stretching.
What type of exercise did you do today?
- KPI: Include strength training 3-4 times a week, cardio/yoga 2-3 times a week, and daily stretching.
Did you go outside today?
- KPI: Spend 15-30 minutes in sunlight daily for Vitamin D and mental health.
Section 4: Mental Health and Well-Being
How would you rate your happiness today?
- KPI: Aim for an average score of 7+ on a 10-point scale.
How would you rate your stress level today?
- KPI: Stress level should ideally stay below 4 on a 10-point scale.
How focused were you today?
- KPI: Aim for a focus score of 7+ on a 10-point scale.
Section 5: Productivity and Business Goals
How many hours did you work today?
- KPI: 6-8 focused hours/day for optimal productivity.
How many outreach messages/emails did you send today?
- KPI: 900 DMs/day for maximum lead generation.
How much revenue did you generate today?
- KPI: $1,000/day or more to meet the $30,000/month target.
How many qualified appointments/meetings did you schedule today?
- KPI: 12 qualified meetings/day to hit revenue goals.
How many of those meetings were completed today?
- KPI: 80-90% completion rate is ideal.
Section 6: Notes and Observations
What went well today?
- KPI: Identify at least 1 positive highlight daily.
What could have been better?
- KPI: Reflect on 1 area for improvement daily.
Any additional notes or observations?
- KPI: Use this to log symptoms, thoughts, or ideas for optimization.
Customizable Metrics for Visualization in Looker Studio
Progress Bars:
Weight progress (e.g., kg gained/month).
Revenue achieved as a percentage of $30,000 goal.
Appointments completed as a percentage of daily target (12 meetings).
Color-Coded Alerts:
Green: On track (e.g., 8+ hours sleep, 900+ outreach).
Yellow: Slightly below target (e.g., 7 hours sleep, 700-899 outreach).
Red: Needs immediate attention (e.g., <6 hours sleep, <700 outreach).
list of formulas and KPI configurations you can add to your Google Sheet to properly track metrics. I will reference the exact column headers and add extra columns where needed.
Formulas for Tracking KPIs
Below is a row-by-row configuration to ensure the KPIs are properly tracked:
Column | Description | New KPI Column | Formula/Logic |
Timestamp | No KPI needed. | - | - |
Date | No KPI needed. | - | - |
What is your current weight? | Monitor weight for trends. | No additional column needed. | Use data directly in Looker Studio. |
How many hours did you sleep last night? | Track if you hit the target of 8 hours. | Sleep KPI | =IF(D2>=8, 1, 0) |
How many liters of water did you drink today? | Track if you drank 3+ liters. | Water KPI | =IF(E2>=3, 1, 0) |
Did you consume any sugar today? | Track sugar intake as Yes/No. | Sugar KPI | =IF(F2="Yes", 1, 0) |
How many calories did you consume today (approx.)? | Track calories to ensure sufficient intake. | Calorie KPI | =IF(G2>=2500, 1, 0) |
Did you take your vitamins/supplements today? | Yes/No for vitamin intake. | Vitamins KPI | =IF(H2="Yes", 1, 0) |
What did you eat for breakfast? | Text-based response. | Healthy Breakfast KPI | Manually categorize in a new column (1=Healthy, 0=Unhealthy). |
What did you eat for lunch? | Text-based response. | Healthy Lunch KPI | Manually categorize in a new column (1=Healthy, 0=Unhealthy). |
What did you eat for dinner? | Text-based response. | Healthy Dinner KPI | Manually categorize in a new column (1=Healthy, 0=Unhealthy). |
Did you have any snacks? If yes, list them. | Text-based response. | Healthy Snacks KPI | Manually categorize in a new column (1=Healthy, 0=Unhealthy). |
How many minutes did you exercise today? | Track if you exercised for 30+ minutes. | Exercise KPI | =IF(L2>=30, 1, 0) |
What type of exercise did you do today? | Text-based response. | Exercise Type Categorization KPI | Use categories in Looker Studio (e.g., Cardio=1). |
Did you go outside today? | Yes/No for outdoor activity. | Outdoor KPI | =IF(N2="Yes", 1, 0) |
How would you rate your happiness today? | Track happiness score (target: 7+). | Happiness KPI | =IF(O2>=7, 1, 0) |
How would you rate your stress level today? | Track stress levels (target: <4). | Stress KPI | =IF(P2<=4, 1, 0) |
How focused were you today? | Track focus levels (target: 7+). | Focus KPI | =IF(Q2>=7, 1, 0) |
How many hours did you work today? | Track if you worked 6+ hours. | Work Hours KPI | =IF(R2>=6, 1, 0) |
How many outreach messages/emails did you send today? | Track if you hit 900 DMs/day. | Outreach KPI | =IF(S2>=900, 1, 0) |
How much revenue opportunity did you generate today? | Track daily revenue goal ($1,000). | Revenue KPI | =IF(T2>=1000, 1, 0) |
How many qualified appointments/meetings did you schedule today? | Track if you scheduled 12 meetings/day. | Appointments Scheduled KPI | =IF(U2>=12, 1, 0) |
How many of those meetings were completed today? | Track completion rate for meetings. | Appointments Completed KPI | =IF(V2>=(U2*0.8), 1, 0) |
Did you talk to someone new today (virtually or physically)? | Track if you met someone new. | New People KPI | =IF(W2="Yes", 1, 0) |
How many new American English words did you learn today? | Track if you learned 4+ words. | English Words KPI | =IF(Y2>=4, 1, 0) |
New KPI Columns to Add to Your Sheet
Based on the above table, here are the new columns you need to add to your Google Sheet (insert these next to the existing columns for better organization):
Sleep KPI
Water KPI
Sugar KPI
Calorie KPI
Vitamins KPI
Healthy Breakfast KPI
Healthy Lunch KPI
Healthy Dinner KPI
Healthy Snacks KPI
Exercise KPI
Outdoor KPI
Happiness KPI
Stress KPI
Focus KPI
Work Hours KPI
Outreach KPI
Revenue KPI
Appointments Scheduled KPI
Appointments Completed KPI
New People KPI
English Words KPI
How to Implement This in Looker Studio
Refresh Data Source:
Once you've added the new KPI columns and saved your Google Sheet, go to Looker Studio.
Refresh the data source to pull in the updated columns.
Use KPI Columns in Charts:
In Looker Studio, use the new numeric KPI columns as metrics in charts or scorecards.
Example:
Sleep KPI as a Scorecard: Shows the percentage of days you slept 8+ hours.
Revenue KPI as a Progress Bar: Tracks progress toward $80,000 monthly goal.
Conditional Formatting for Alerts:
- Add conditional formatting in Looker Studio to highlight low performance (e.g., red for missed KPIs).
Manually categorizing text-based responses (like meals or snacks) means evaluating the content of the answers and assigning a numeric value (1 for Healthy, 0 for Unhealthy) in a new column based on a predefined criteria or rule set. Here's a step-by-step guide to do it:
Step 1: Define "Healthy" and "Unhealthy"
Before you begin categorizing, establish a clear set of rules for what constitutes a "healthy" or "unhealthy" meal/snack.
Healthy: Includes whole, unprocessed foods, adequate protein, healthy fats, and complex carbs.
- Example: Fruits, vegetables, whole grains, dal, roti, paneer, eggs (if applicable), nuts, seeds.
Unhealthy: Includes processed or junk food, excessive sugar, or fried foods.
- Example: Chips, candy, sugary beverages, instant noodles, deep-fried snacks.
Step 2: Add New Columns in Google Sheets
Open your Google Sheet where the form responses are stored.
Add four new columns next to the original meal/snack columns:
Column 1: "Healthy Breakfast KPI"
Column 2: "Healthy Lunch KPI"
Column 3: "Healthy Dinner KPI"
Column 4: "Healthy Snacks KPI"
Step 3: Evaluate Each Response
For each meal/snack response, manually evaluate if the listed foods are healthy or unhealthy based on your defined criteria.
Example of Manual Categorization:
Breakfast:
Response: "Poha with peanuts and fruits" → Healthy = 1.
Response: "Bread and jam with coffee" → Unhealthy = 0.
Lunch:
Response: "Dal, roti, and vegetables" → Healthy = 1.
Response: "Pizza and soda" → Unhealthy = 0.
Dinner:
Response: "Rice with sabzi and curd" → Healthy = 1.
Response: "Burger and fries" → Unhealthy = 0.
Snacks:
Response: "Almonds and tea" → Healthy = 1.
Response: "Packaged chips and coke" → Unhealthy = 0.
Step 4: Input Numeric Values in New Columns
For each response, manually assign 1 for Healthy or 0 for Unhealthy in the corresponding new column.
Example:
What did you eat for breakfast? | Healthy Breakfast KPI | What did you eat for lunch? | Healthy Lunch KPI |
Poha with peanuts and fruits | 1 | Dal, roti, and vegetables | 1 |
Bread and jam with coffee | 0 | Pizza and soda | 0 |
Step 5: Automating Categorization (Optional)
If your meal responses follow consistent patterns, you can use formulas or Google Sheets’ filters to partially automate the categorization process.
Using IF
Formulas:
If responses are consistent (e.g., "Poha" always means healthy), use a formula:
- Example for Breakfast Column:
=IF(A2="Poha with peanuts and fruits", 1, 0)
- Example for Breakfast Column:
Using Find & Replace:
Use Find & Replace (
Ctrl + H
in Google Sheets) to quickly search for specific healthy/unhealthy foods and replace with corresponding numeric values (e.g., replace "Poha" with1
).Manually review and adjust for any inconsistencies.
Step 6: Repeat Daily or Weekly
Continue manually categorizing responses as new data is added.
Alternatively, you can set rules (e.g., define a healthy/unhealthy food list) and use automation tools like scripts or add-ons in Google Sheets to streamline this process.
Step 7: Connect to Looker Studio
Once you’ve added and filled these KPI columns, they can be used in Looker Studio as metrics for scorecards or charts to visualize trends in your eating habits.
To handle the "What type of exercise did you do today?" text-based responses and categorize them into a numeric Exercise Type Categorization KPI, you can follow these steps:
Step 1: Define Categories
Decide the exercise types you want to categorize. Assign each a numeric value for tracking purposes. For example:
Cardio: 1
Strength Training: 2
Yoga/Stretching: 3
Other/None: 0
Step 2: Add a New Column in Google Sheets
Open your Google Sheet where the form responses are stored.
Add a new column named Exercise Type KPI next to the original "What type of exercise did you do today?" column.
Step 3: Assign Numeric Values Based on Responses
Manual Categorization:
Manually read each response in the "What type of exercise did you do today?" column and assign a numeric value based on your predefined categories.
Example:
"Running and walking" → Cardio → 1
"Push-ups and squats" → Strength Training → 2
"Yoga and stretching" → Yoga → 3
"None" → Other → 0
Automated Categorization with Formulas:
If the responses are consistent, you can use an IF
formula to automate the categorization process.
Create a Formula:
In the Exercise Type KPI column, enter the following formula (assuming exercise responses are in Column A):
=IF(A2="Cardio", 1, IF(A2="Strength Training", 2, IF(A2="Yoga", 3, 0)))
Adjust the text (e.g., "Cardio", "Strength Training") to match the actual responses from your form.
Partial Match with
SEARCH
(For more flexibility): If responses include variations (e.g., "Running and walking" or "Strength + Yoga"), useSEARCH
:=IF(SEARCH("Cardio", A2), 1, IF(SEARCH("Strength", A2), 2, IF(SEARCH("Yoga", A2), 3, 0)))
This checks if specific keywords like "Cardio" or "Strength" appear in the response and assigns the corresponding numeric value.
Drag Down the Formula: After applying the formula to the first row, drag it down the column to categorize all responses.
Step 4: Handle Unusual Responses
- For responses that don’t fit predefined categories, assign them a default value (e.g., 0 for "Other"). You can manually review these rows later to refine the categorization.
Step 5: Visualize Categories in Looker Studio
Refresh the Data Source:
- Go to Looker Studio and refresh the Google Sheet data source to include the new Exercise Type KPI column.
Create Charts:
Bar Chart or Pie Chart:
Dimension: "Exercise Type KPI"
Metric: Count of entries or days per category.
Add a custom field in Looker Studio to label the numeric values with their category names (e.g., 1 = "Cardio").
Trend Over Time:
Use a line chart with:
Dimension: Date
Metric: Count of each exercise type.
Step 6: Optional Automation Enhancements
If responses vary too much (e.g., many free-text answers), use tools like:
Google Sheets Add-ons (e.g., Autocrat, Scripts) for automatic text parsing.
Regular Expressions in formulas to handle variations.
Yes, you can use Google Apps Script to automate data cleaning and formatting in your Google Sheet and ensure the data is ready to be consumed by Looker Studio in a single step. This script can process your raw form data, clean it, calculate additional metrics (like KPIs), and output a clean dataset into a new sheet that is directly linked to Looker Studio.
Here’s how you can do it:
Step 1: Goals for the Script
Automate Data Cleaning:
Convert text-based responses into numeric formats (e.g.,
sleep hours
or empty fields into0
).Categorize text responses into numeric KPIs (e.g., Healthy = 1, Unhealthy = 0).
Add Calculated Metrics:
Compute KPIs like
Healthy Meals
,Exercise Type Categorization
, etc.Add averages or summaries for Looker Studio.
Write Cleaned Data to a New Sheet:
- Output a cleaned version of your form responses to a new sheet, e.g.,
Cleaned_Data
.
- Output a cleaned version of your form responses to a new sheet, e.g.,
Schedule Automation:
- Optionally, run this script automatically every day or after form submissions using Google Apps Script triggers.
Step 2: Write the Script
Follow these steps to create and deploy the script:
Open your Google Sheet.
Go to Extensions > Apps Script.
Copy and paste the script below:
function processDataForLooker() {
const sheet = SpreadsheetApp.getActiveSpreadsheet();
const formSheet = sheet.getSheetByName("Form Responses 1"); // Replace with your form response sheet name
const outputSheetName = "Cleaned_Data"; // Name of the output sheet
let outputSheet = sheet.getSheetByName(outputSheetName);
// Create output sheet if it doesn't exist
if (!outputSheet) {
outputSheet = sheet.insertSheet(outputSheetName);
} else {
outputSheet.clear(); // Clear previous data
}
const data = formSheet.getDataRange().getValues();
const headers = data[0];
const output = [];
// Add new headers (for calculated fields)
const newHeaders = [...headers, "Sleep KPI", "Healthy Breakfast KPI", "Healthy Lunch KPI", "Healthy Dinner KPI", "Healthy Snacks KPI", "Exercise KPI"];
output.push(newHeaders);
// Loop through rows and process data
for (let i = 1; i < data.length; i++) {
const row = data[i];
const processedRow = [...row]; // Copy existing row
// Clean "How many hours did you sleep last night?"
const sleepHours = parseFloat(row[3]) || 0; // Assuming sleep data is in column 4
const sleepKPI = sleepHours >= 8 ? 1 : 0; // Set KPI: 1 if >= 8 hours, otherwise 0
processedRow.push(sleepKPI);
// Categorize meals
const breakfast = row[8]?.toLowerCase() || ""; // Column 9: Breakfast
const lunch = row[9]?.toLowerCase() || ""; // Column 10: Lunch
const dinner = row[10]?.toLowerCase() || ""; // Column 11: Dinner
const snacks = row[11]?.toLowerCase() || ""; // Column 12: Snacks
const isHealthyMeal = (meal) => meal.includes("fruit") || meal.includes("salad") || meal.includes("vegetable");
processedRow.push(isHealthyMeal(breakfast) ? 1 : 0); // Breakfast KPI
processedRow.push(isHealthyMeal(lunch) ? 1 : 0); // Lunch KPI
processedRow.push(isHealthyMeal(dinner) ? 1 : 0); // Dinner KPI
processedRow.push(isHealthyMeal(snacks) ? 1 : 0); // Snacks KPI
// Categorize exercise
const exercise = row[13]?.toLowerCase() || ""; // Column 14: Exercise
const exerciseKPI = exercise.includes("cardio") ? 1 : exercise.includes("strength") ? 2 : 0;
processedRow.push(exerciseKPI); // Cardio = 1, Strength = 2, None = 0
output.push(processedRow);
}
// Write processed data to the output sheet
outputSheet.getRange(1, 1, output.length, output[0].length).setValues(output);
}
Step 3: How the Script Works
Reads Raw Data:
- It pulls data from your form response sheet (
Form Responses 1
).
- It pulls data from your form response sheet (
Processes Each Row:
It cleans numeric columns (e.g., sleep hours) and categorizes text columns (e.g., healthy meals, exercise type).
Adds calculated KPI fields to each row.
Writes to a New Sheet:
- The processed data is written into a new sheet called
Cleaned_Data
.
- The processed data is written into a new sheet called
Step 4: Link Cleaned Data to Looker Studio
Connect Looker Studio to the
Cleaned_Data
Sheet:Go to Looker Studio and connect the new sheet as a data source.
Use the new KPIs (e.g., Sleep KPI, Healthy Meals KPI) for your visualizations.
Create Charts:
- Use dimensions like
Date
and metrics likeSleep KPI
to create time-series charts or pie charts.
- Use dimensions like
Step 5: Automate Script Execution (Optional)
In the Apps Script editor, go to Triggers (clock icon in the left sidebar).
Click Add Trigger.
Set the function to
processDataForLooker
, choose Event Source: Time-driven, and set the frequency (e.g., daily).
Advantages of This System:
Fully automated: No manual cleaning or processing.
Scalable: Works with large datasets.
Easy updates: Modify KPIs or formulas directly in the script.
Step 1 in super simple terms:
Open Your Google Sheet
- Go to the spreadsheet where your Google Form responses are being saved.
Open Apps Script
At the top, click on Extensions > Apps Script.
A new tab will open where you can write code.
Copy the Code
- Take the code I gave you and paste it into that Apps Script editor.
Save the Script
Click the disk icon (or hit Ctrl + S) to save.
Name the project something like "Form Data Cleaner".
Run the Script
In the Apps Script editor, click the ▶️ Run button (in the toolbar).
It will process your form responses and create a new sheet called Cleaned_Data in your spreadsheet.
Now, you’ll have a cleaned version of your data in a new sheet (Cleaned_Data). This sheet is what you’ll use in Looker Studio for charts and reports.