MCPcopy Index your code
hub / github.com/simstudioai/sim / getDriveFileModifiedTime

Function getDriveFileModifiedTime

apps/sim/lib/webhooks/polling/google-sheets.ts:271–287  ·  view source on GitHub ↗
(
  accessToken: string,
  fileId: string,
  logger: Logger
)

Source from the content-addressed store, hash-verified

269}
270
271async function getDriveFileModifiedTime(
272 accessToken: string,
273 fileId: string,
274 logger: Logger
275): Promise<string | undefined> {
276 try {
277 const response = await fetch(
278 `https://www.googleapis.com/drive/v3/files/${fileId}?fields=modifiedTime`,
279 { headers: { Authorization: `Bearer ${accessToken}` } }
280 )
281 if (!response.ok) return undefined
282 const data = await response.json()
283 return data.modifiedTime as string | undefined
284 } catch {
285 return undefined
286 }
287}
288
289/**
290 * Fetches the sheet (A:Z) and returns the row count, auto-detected headers,

Callers 1

isDriveFileUnchangedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected