## Introduction
In product management and growth teams, a critical metric is Time-to-Value (TTV) — the time it takes for a new user to realize the value of a product after signing up. Accurately measuring TTV can provide actionable insights for product improvements, onboarding efficacy, and customer success initiatives. However, manually tracking this metric across various tools can be cumbersome and error-prone.
This article walks you through building an automated workflow using **n8n**, the open-source workflow automation tool, to measure Time-to-Value for new users in a scalable, hands-off manner. The automation integrates tools like Google Sheets (or any relational data store), Gmail (or any email tool), and Slack to track user activity, calculate TTV, and notify product and customer success teams.
### Who Benefits?
– Product managers looking to understand and reduce user onboarding time
– Growth teams optimizing activation funnels
– Customer success teams identifying users at risk of churn due to slow activation
– Automation engineers and operations specialists designing user data pipelines
—
## Tools and Services Integrated
– **n8n:** The automation platform orchestrating the workflow
– **CRM or Signup Database:** A data source with new user signups, e.g., Google Sheets, Airtable, or a SQL database
– **Event Tracking System:** A place where user events are logged, e.g., Segment, Mixpanel, or again Google Sheets/Airtable for simplicity
– **Gmail (or Email Service):** For sending notifications or reports
– **Slack:** Optional for team alerts
For the purpose of this tutorial, we will assume user signup data and event data are in Google Sheets for simplicity.
—
## Workflow Overview
1. **Trigger:** Scheduled poll (e.g., daily) to scan new users who signed up in the last 24 hours.
2. **Fetch User Signup Data:** Pull new user records from Google Sheets.
3. **Fetch User Event Data:** For each new user, query event data that signals ‘value delivered’ (e.g., first key action completed).
4. **Calculate TTV:** Compute the difference between signup time and first value event time.
5. **Store or Update Results:** Write TTV results back to a tracking sheet or database.
6. **Notify:** Send Slack message or email report with an overview of new users and their TTV.
—
## Step-by-Step n8n Setup
### Step 1: Create a New Workflow in n8n
– Log into your n8n instance.
– Create a new workflow named “Measure Time-to-Value for New Users.”
### Step 2: Add a Cron Node (Trigger)
– Add a **Cron** node;
– Set frequency to run once daily (e.g., 00:00), or customize per team needs.
### Step 3: Add Google Sheets Node to Fetch New Signups
– Add a **Google Sheets** node.
– Set operation to `Read Rows`.
– Configure credentials and connect to the sheet containing user signups.
– Use filters to only fetch records where `signup_date` is within the last N days (e.g., 1 day).
**Tip:** If Google Sheets API does not support date filtering, consider post-filtering using n8n’s **Function** node.
### Step 4: Iterate Over Each User
– Add a **SplitInBatches** node connected to the Google Sheets node output so that each user is processed individually.
### Step 5: Query Event Data for Each User
– Add another **Google Sheets** (or HTTP Request) node configured to get the user’s event data indicating value delivery.
– For example, read rows from the event logs sheet where `user_id` matches the current user and the event is the ‘activation’ or ‘value’ event.
– Sort event data by timestamp ascending and fetch the earliest value event.
### Step 6: Calculate Time-to-Value
– Add a **Function** node.
– Code example to calculate TTV in hours:
“`javascript
const signupDate = new Date($items(“GoogleSheetsFetchSignups”)[0].json.signup_date);
const valueDate = new Date($items(“GoogleSheetsFetchEvents”)[0].json.event_timestamp);
const ttvHours = (valueDate – signupDate) / (1000 * 60 * 60);
return [{ json: { ttv_hours: ttvHours, user_id: $items(“GoogleSheetsFetchSignups”)[0].json.user_id } }];
“`
**Edge cases:** Handle missing event_date by setting TTV to null or a max threshold.
### Step 7: Update or Append TTV Results
– Use a **Google Sheets** node configured with `Append` or `Update` to write the TTV results into a dedicated sheet.
– Columns: user_id, signup_date, ttv_hours, analyzed_date
### Step 8: Aggregate Results and Notify
– Add a **Aggregate** node or **Function** node to prepare a summary report — e.g., average TTV for that day, list of slow activations.
– Add a **Slack** node or **Gmail** node to send a notification or report to your product team.
—
## Common Errors and Tips
– **API Rate Limits:** Google Sheets APIs have limits; batch requests thoughtfully using SplitInBatches.
– **Timezone Issues:** Ensure all timestamps use consistent time zones (preferably UTC).
– **Missing or Late Events:** Not all users will have activation events immediately. Use timeouts or status fields to handle this.
– **Permission Scopes:** Ensure Google API credentials have permissions for reading and writing sheets.
– **Error Handling:** Use n8n’s error workflow feature to catch and retry or alert on failed calls.
—
## Scaling and Adaptation
– For heavier event data, integrate with databases (Postgres, MongoDB) or analytics platforms (Mixpanel via API) instead of Sheets.
– Expand event criteria to multiple value events to calculate multiple TTV metrics.
– Incorporate user segmentation to track TTV by cohorts or user types.
– Automate feedback loops by triggering onboarding workflows or alerts for slow activators.
—
## Summary and Bonus Tips
By leveraging n8n’s powerful automation capabilities along with simple data stores like Google Sheets, you can routinely measure the Time-to-Value metric with minimal manual work. This empowers product teams to make data-driven decisions and improve new user experiences.
### Bonus Tip:
Set up a dashboard in tools like Google Data Studio or Grafana connected to the TTV data sheet or database to visualize trends and quickly identify areas for improvement.
—
Implementing this automated workflow provides a quantitative lens on onboarding success, turning raw event data into actionable insights with ease and scale.