how to mirror cloud phone uptime into Google Sheets
how to mirror cloud phone uptime into Google Sheets
a cloud phone Google Sheets uptime mirror is the simplest, cheapest, most universally accessible way to give stakeholders visibility into fleet health. nobody learns a new tool. everyone already has Google Sheets. you can hand the link to a customer, an investor, or a non-technical co-founder and they instantly understand what they’re looking at.
this guide walks through wiring cloudf.one uptime data into Google Sheets with three real reporting recipes.
what cloudf.one and Google Sheets bring together
cloudf.one’s data sources for uptime tracking:
- public stats API: fleet-level uptime, active device count
- per-device stats API: individual device uptime, session history
- webhook events: real-time device.online and device.offline events
Google Sheets matching capabilities:
- Apps Script (server-side JavaScript runtime triggered by HTTP requests, time-based schedules, or sheet edits)
- IMPORTDATA, IMPORTJSON formulas (pull data from URLs)
- conditional formatting, sparklines, charts (visualize uptime over time)
- public sharing with view-only access (give stakeholders read-only links)
the result is a live-updating uptime sheet anyone can bookmark.
for the broader case why integration matters for cloud phone ops, see cloud phone CI/CD integration.
step 1: get a cloudf.one API token
generate a token from the dashboard. for the Sheets use case, you can use a read-only scoped token to limit blast radius if the sheet is shared.
Authorization: Bearer cf_live_readonly_xxxxxxxxxxxxxxxxxxxx
step 2: create the Google Sheet
create a new sheet called Cloud Phone Fleet Uptime. add four tabs:
- Live Status (current state of each device)
- Daily Uptime (one row per device per day)
- Hourly Events (raw event log for the last 7 days)
- Dashboard (charts and summary stats)
step 3: configure Apps Script to pull stats
open the sheet, go to Extensions -> Apps Script. paste this code:
const CLOUDFONE_TOKEN = 'cf_live_readonly_xxxxxxxxxxxxxxxxxxxx';
const SHEET_LIVE = 'Live Status';
const SHEET_DAILY = 'Daily Uptime';
function refreshLiveStatus() {
const response = UrlFetchApp.fetch('https://api.cloudf.one/v1/devices', {
headers: {Authorization: `Bearer ${CLOUDFONE_TOKEN}`}
});
const devices = JSON.parse(response.getContentText());
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(SHEET_LIVE);
sheet.clearContents();
sheet.appendRow(['Device ID', 'Model', 'Region', 'Status', 'Last Seen', 'Uptime 24h']);
devices.data.forEach(device => {
sheet.appendRow([
device.id,
device.model,
device.region,
device.status,
new Date(device.last_seen),
device.uptime_24h_percent
]);
});
Logger.log(`Refreshed ${devices.data.length} devices`);
}
function recordDailyUptime() {
const response = UrlFetchApp.fetch('https://api.cloudf.one/v1/devices/stats/daily', {
headers: {Authorization: `Bearer ${CLOUDFONE_TOKEN}`}
});
const stats = JSON.parse(response.getContentText());
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(SHEET_DAILY);
const today = Utilities.formatDate(new Date(), 'GMT+8', 'yyyy-MM-dd');
stats.data.forEach(deviceStats => {
sheet.appendRow([
today,
deviceStats.device_id,
deviceStats.uptime_percent,
deviceStats.total_sessions,
deviceStats.failed_installs
]);
});
}
set up triggers. in Apps Script, click the clock icon (Triggers) and add:
- refreshLiveStatus -> Time-driven -> Every 5 minutes
- recordDailyUptime -> Time-driven -> Every day at 23:55 SGT
now Live Status updates every 5 minutes and Daily Uptime appends one row per device per day at end of day.
recipe 1: real-time fleet status dashboard
on the Dashboard tab, build a simple summary using formulas:
A1: Total devices =COUNTA('Live Status'!A2:A)
A2: Online =COUNTIF('Live Status'!D2:D, "online")
A3: Offline =COUNTIF('Live Status'!D2:D, "offline")
A4: Avg 24h uptime =AVERAGE('Live Status'!F2:F)
A5: Last refresh =NOW()
add conditional formatting on the Live Status status column: green for “online,” red for “offline,” yellow for “maintenance.” the sheet now visually highlights problem devices.
recipe 2: 30-day uptime trend per device
on the Daily Uptime tab, you have one row per device per day. add a sparkline column to visualize the trend:
G2: =SPARKLINE(FILTER('Daily Uptime'!C:C, 'Daily Uptime'!B:B = B2), {"charttype","line";"color1","green"})
each device in the Live Status tab now shows a 30-day uptime sparkline next to its current status. instant visual signal of which devices have been getting worse over time.
recipe 3: ingest webhook events for real-time event log
the Hourly Events tab needs a different approach. instead of pulling on a schedule, set up an Apps Script doPost handler that receives cloudf.one webhooks and appends rows.
function doPost(e) {
const event = JSON.parse(e.postData.contents);
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Hourly Events');
sheet.appendRow([
new Date(event.timestamp),
event.event,
event.device.id,
event.device.model,
event.device.region,
event.session?.id || '',
event.error?.message || ''
]);
// keep only the last 7 days of events
const sevenDaysAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000);
const data = sheet.getDataRange().getValues();
for (let i = data.length - 1; i > 0; i--) {
if (data[i][0] < sevenDaysAgo) {
sheet.deleteRow(i + 1);
}
}
return ContentService.createTextOutput('OK');
}
deploy as a web app: in Apps Script, click Deploy -> New deployment -> Web app, set “Execute as: me” and “Who has access: anyone.” copy the URL.
paste this URL into cloudf.one’s webhook configuration. now every event appends a row in real time, with auto-rotation to keep only the last 7 days.
similar event ingestion logic is also covered in cloud phone Notion event logging and cloud phone Airtable tracking.
sharing the sheet with stakeholders
share the sheet with view-only access. options:
- internal team: share with specific Google Workspace users (read-only)
- external stakeholders: share with “anyone with the link can view”
- public dashboard: publish to the web (File -> Share -> Publish to web), embed in Notion or Confluence
investors love this. a one-click link to a live-updating uptime dashboard signals operational maturity.
authoritative reference on Apps Script’s web app deployment is the Apps Script web app guide.
scaling considerations
Apps Script has a 6-minute execution limit per trigger. for fleets above 1,000 devices, the refreshLiveStatus function may time out. solutions:
- paginate the API call across multiple triggers
- use BigQuery as the intermediate store and pull aggregates into Sheets
- run the heavy aggregation in a Cloud Function and write summarized data to Sheets
for fleets under 500 devices, the basic Apps Script setup runs comfortably within limits.
try cloud phone Google Sheets uptime mirror on a real Singapore device
if you want to give stakeholders a live, simple, free uptime view of your cloud phone fleet, start a trial, generate an API token, and configure your first Apps Script trigger in 20 minutes.
frequently asked questions
do I need a paid Google Workspace account for this?
no. Apps Script works on free Google accounts with the same execution limits and capabilities.
what’s the refresh latency for the live status?
every 5 minutes by default (the trigger interval). for tighter latency, change the trigger to every 1 minute. Apps Script supports down to 1-minute intervals.
can I add charts to the Sheet?
yes. select your data range, Insert -> Chart, and Sheets builds the chart. for uptime trends, line charts on the Daily Uptime tab work well.
how do I handle Apps Script errors silently?
wrap the API calls in try/catch and log errors to a separate Errors sheet. the trigger keeps running even if individual refreshes fail.
can I send the sheet as an email digest?
yes. add a daily trigger that runs MailApp.sendEmail with a summary of the day’s stats. the Sheet doubles as a daily digest source.