Skip to the page
WISE Lensby AI WISE
Start free trial
All guides

All connections

Google Sheets

One row per day, AI and question in a Google Sheet, refreshed each day — the same rows as the daily file.

What you need

Plan
Every plan
Who
An Owner or a Member of your team. A Viewer reads only.
You need
A Google Sheet you can edit, and an API key.

Set it up

  1. In WISE Lens, open Connections › API keys › Create a key. Type what the key is for, then choose Make a key. Copy it now: it is shown once.
  2. In the sheet, open Extensions › Apps Script, replace what is there with the script below, and put your key between the quotes in KEY.
  3. Save, choose Run and allow it when Google asks. A sheet named WISE Lens fills.
  4. Open Triggers (the clock on the left) › Add trigger: wiseLensDaily, Time-driven, Day timer.
Apps Script
const KEY = "wl_…your key…";
function wiseLensDaily() {
  const res = UrlFetchApp.fetch("https://aiseo.aiwise.sg/api/lens/v1/daily?format=csv", { headers: { Authorization: "Bearer " + KEY } });
  const rows = Utilities.parseCsv(res.getContentText().replace(/^\uFEFF/, ""));
  const sheet = SpreadsheetApp.getActive().getSheetByName("WISE Lens") || SpreadsheetApp.getActive().insertSheet("WISE Lens");
  sheet.clearContents();
  sheet.getRange(1, 1, rows.length, rows[0].length).setValues(rows);
}

When it works

The WISE Lens sheet holds yesterday's rows the next morning.

If it does not work

“Request failed … returned code 401”
Put the key between the quotes in KEY and run again; a revoked key needs a new one.
Google says it has not verified the app
It is your own script: choose Advanced, then Go to the project, then Allow.
The sheet stopped filling
Open Triggers and check wiseLensDaily still runs each day.

Need help? Write to support@aiwise.sg and say which connection.

Turn it off

Delete the trigger in Apps Script, then revoke the key.

Questions: support@aiwise.sg