Create Spreadsheet ( gsheets)
One script reply has been approved by the moderators Verified

Created by rossmccrann 246 days ago Viewed 55 times 1 Point

No comments yet

Login to be able to comment
Points: 0
deno
One script reply has been approved by the moderators
Ap­pro­ved
import * as wmill from "https://deno.land/x/windmill@v1.70.1/mod.ts";

export async function main(gsheets_auth: wmill.Resource<"gsheets">) {
    
  const CREATE_URL = `https://sheets.googleapis.com/v4/spreadsheets`;

  const token = gsheets_auth["token"];

  const response = await fetch(CREATE_URL, {
    method: "POST",
    headers: {
      Authorization: "Bearer " + token,
      "Content-Type": "application/json",
    },
  });

  const result = await response.json();

  return { result: result };
}

Submitted by rossmccrann 246 days ago

Edited 29 days ago

No comments yet

Login to be able to comment