{"id":1265,"date":"2024-12-30T13:09:23","date_gmt":"2024-12-30T09:09:23","guid":{"rendered":"https:\/\/www.buildingtheitguy.com\/?p=1265"},"modified":"2024-12-30T14:13:50","modified_gmt":"2024-12-30T10:13:50","slug":"google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide","status":"publish","type":"post","link":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/","title":{"rendered":"Google Workspace Audit Logs to Google Sheets Automation \u2013 Complete 2025 Guide"},"content":{"rendered":"\n<p><strong>Scenario:<\/strong><br>As a Google Workspace Admin, you want to automate the process of exporting audit logs to Google Sheets for real-time monitoring, data analysis, and compliance reporting\u2014without manual intervention.<\/p>\n\n\n\n<p>You can automatically send <strong>Google Workspace Reporting, Audit, and Investigation logs<\/strong> to <strong>Google Sheets<\/strong> using <strong>Google Apps Script<\/strong> and <strong>Google Admin SDK Reports API<\/strong>. Here&#8217;s a step-by-step guide<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Enable APIs<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <a href=\"https:\/\/console.cloud.google.com\/\">Google Cloud Console<\/a>.<\/li>\n\n\n\n<li>Select your <strong>project<\/strong>. (If not Create New)<\/li>\n\n\n\n<li>Navigate to <strong>APIs &amp; Services &gt; Enabled APIs &amp; Services<\/strong>.<\/li>\n\n\n\n<li>Enable the following APIs:\n<ul class=\"wp-block-list\">\n<li><strong>Admin SDK API<\/strong>.<\/li>\n\n\n\n<li><strong>Google Sheets API<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"681\" src=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_OI9nrEhegk-1024x681.png\" alt=\"\" class=\"wp-image-1267\" srcset=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_OI9nrEhegk-1024x681.png 1024w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_OI9nrEhegk-300x199.png 300w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_OI9nrEhegk-768x510.png 768w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_OI9nrEhegk-1536x1021.png 1536w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_OI9nrEhegk.png 1616w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"876\" height=\"521\" src=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Enable-Admin-SDK-API.png\" alt=\"\" class=\"wp-image-1268\" srcset=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Enable-Admin-SDK-API.png 876w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Enable-Admin-SDK-API-300x178.png 300w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Enable-Admin-SDK-API-768x457.png 768w\" sizes=\"(max-width: 876px) 100vw, 876px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Generate OAuth 2.0 Credentials<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <strong>APIs &amp; Services &gt; Credentials<\/strong>.<\/li>\n\n\n\n<li>Click <strong>+ CREATE CREDENTIALS<\/strong> &gt; <strong>OAuth Client ID<\/strong>.<\/li>\n\n\n\n<li>Choose <strong>Web Application<\/strong> as the application type.<\/li>\n\n\n\n<li>Add the following in <strong>Authorized Redirect URIs<\/strong><\/li>\n<\/ol>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nhttps:\/\/developers.google.com\/oauthplayground\n\n<\/pre><\/div>\n\n\n<p>    5. Click Create and download the Client ID JSON file<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"446\" src=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_edyfrIbmg7-1024x446.png\" alt=\"\" class=\"wp-image-1269\" srcset=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_edyfrIbmg7-1024x446.png 1024w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_edyfrIbmg7-300x131.png 300w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_edyfrIbmg7-768x335.png 768w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_edyfrIbmg7-1536x670.png 1536w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_edyfrIbmg7.png 1693w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"987\" src=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_CLKwRLXWDi-1024x987.png\" alt=\"\" class=\"wp-image-1270\" srcset=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_CLKwRLXWDi-1024x987.png 1024w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_CLKwRLXWDi-300x289.png 300w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_CLKwRLXWDi-768x740.png 768w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_CLKwRLXWDi.png 1305w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Get Access and Refresh Tokens<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open <a href=\"https:\/\/developers.google.com\/oauthplayground\/\">OAuth 2.0 Playground<\/a>.<\/li>\n\n\n\n<li>Click the <strong>Settings (gear icon)<\/strong> in the top-right corner.<\/li>\n\n\n\n<li>Enable <strong>Use your own OAuth credentials<\/strong>.<\/li>\n\n\n\n<li>Enter your Client ID and Secret.<\/li>\n\n\n\n<li>Select the required scopes:<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/www.googleapis.com\/auth\/admin.reports.audit.readonly\nhttps:\/\/www.googleapis.com\/auth\/spreadsheets\n<\/pre><\/div>\n\n\n<p>6. Click <strong>Authorize APIs<\/strong> and allow permissions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"715\" src=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/OAuth-2.0-Playground-guide-1024x715.png\" alt=\"\" class=\"wp-image-1272\" srcset=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/OAuth-2.0-Playground-guide-1024x715.png 1024w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/OAuth-2.0-Playground-guide-300x210.png 300w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/OAuth-2.0-Playground-guide-768x536.png 768w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/OAuth-2.0-Playground-guide.png 1423w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>7. Copy the <strong>Access Token<\/strong> and <strong>Refresh Token<\/strong>.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4: Write the Script<\/strong> <strong>in Google Sheets<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the Google Sheet.<\/li>\n\n\n\n<li>Go to <strong>Extensions &gt; Apps Script<\/strong>.<\/li>\n\n\n\n<li>Store Tokens in Script Properties<\/li>\n\n\n\n<li>Go to <strong>Project Settings<\/strong> &gt; <strong>Script Properties<\/strong> &gt; <strong>Add a Property<\/strong>.<\/li>\n\n\n\n<li>Add the following key-value pairs<\/li>\n\n\n\n<li>Save the properties<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nACCESS_TOKEN = &lt;Your Access Token&gt;\nREFRESH_TOKEN = &lt;Your Refresh Token&gt;\nCLIENT_ID = &lt;Your Client ID&gt;\nCLIENT_SECRET = &lt;Your Client Secret&gt;\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"574\" height=\"769\" src=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Adding-script-properties-guide.png\" alt=\"\" class=\"wp-image-1277\" srcset=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Adding-script-properties-guide.png 574w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Adding-script-properties-guide-224x300.png 224w\" sizes=\"(max-width: 574px) 100vw, 574px\" \/><\/figure>\n\n\n\n<p>Add the following code to your Apps Script<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nconst CLIENT_ID = PropertiesService.getScriptProperties().getProperty('CLIENT_ID');\nconst CLIENT_SECRET = PropertiesService.getScriptProperties().getProperty('CLIENT_SECRET');\nconst REFRESH_TOKEN = PropertiesService.getScriptProperties().getProperty('REFRESH_TOKEN');\n\n\/\/ Function to refresh access token\nfunction refreshAccessToken() {\n  const tokenUrl = 'https:\/\/oauth2.googleapis.com\/token';\n\n  const payload = {\n    client_id: CLIENT_ID,\n    client_secret: CLIENT_SECRET,\n    refresh_token: REFRESH_TOKEN,\n    grant_type: 'refresh_token'\n  };\n\n  const options = {\n    method: 'post',\n    contentType: 'application\/x-www-form-urlencoded',\n    payload: payload\n  };\n\n  const response = UrlFetchApp.fetch(tokenUrl, options);\n  const result = JSON.parse(response.getContentText());\n\n  if (result.access_token) {\n    PropertiesService.getScriptProperties().setProperty('ACCESS_TOKEN', result.access_token);\n    Logger.log('New Access Token: ' + result.access_token);\n  } else {\n    Logger.log('Failed to refresh token: ' + result.error);\n  }\n}\n\n<\/pre><\/div>\n\n\n<p>Update the access token with the dynamic property<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nfunction fetchAuditLogs() {\n  const ACCESS_TOKEN = PropertiesService.getScriptProperties().getProperty('ACCESS_TOKEN');\n  const SHEET_ID = 'YOUR_GOOGLE_SHEET_ID'; \/\/ Replace with your Sheet ID\n\n  const url = 'https:\/\/admin.googleapis.com\/admin\/reports\/v1\/activity\/users\/all\/applications\/admin';\n\n  const options = {\n    method: 'get',\n    headers: {\n      Authorization: 'Bearer ' + ACCESS_TOKEN\n    },\n    muteHttpExceptions: true\n  };\n\n  try {\n    const response = UrlFetchApp.fetch(url, options);\n    const data = JSON.parse(response.getContentText());\n\n    const sheet = SpreadsheetApp.openById(SHEET_ID).getActiveSheet();\n\n    \/\/ Add headers if sheet is empty\n    if (sheet.getLastRow() === 0) {\n      sheet.appendRow(&#x5B;'Actor Email', 'Event Name', 'Date', 'Description']);\n    }\n\n    data.items.forEach(item =&gt; {\n      const actor = item.actor.email || 'N\/A';\n      const date = item.id.time || 'N\/A';\n      const eventName = item.events&#x5B;0].name || 'N\/A';\n\n      \/\/ Extracting the event description\n      let description = '';\n      const params = item.events&#x5B;0].parameters || &#x5B;];\n\n      params.forEach(param =&gt; {\n        description += `${param.name}: ${param.value}\\n`; \/\/ Combine all parameters\n      });\n\n      \/\/ Append row to sheet\n      sheet.appendRow(&#x5B;actor, eventName, date, description]);\n    });\n\n    Logger.log('Audit logs with descriptions added successfully!');\n  } catch (error) {\n    Logger.log('Error: ' + error.message);\n\n    \/\/ Refresh access token if 401 error occurs\n    if (error.message.includes('401')) {\n      refreshAccessToken();\n    }\n  }\n}\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"518\" src=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_VPcTN0rbPi-1024x518.png\" alt=\"\" class=\"wp-image-1276\" srcset=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_VPcTN0rbPi-1024x518.png 1024w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_VPcTN0rbPi-300x152.png 300w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_VPcTN0rbPi-768x388.png 768w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/msedge_VPcTN0rbPi.png 1203w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Click Run to test your script and check google sheets data are added.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 5: Set Triggers for Automation<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Schedule Automated Updates<\/strong> (Optional):<\/li>\n\n\n\n<li>Go to <strong>Edit &gt; Triggers<\/strong>.<\/li>\n\n\n\n<li>Create a trigger to run this script <strong>daily<\/strong> or <strong>hourly<\/strong>.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading has-text-align-center\"><strong>Final Outputs:<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Automatically creates headers (<strong>Actor Email, Date, Event Name, Description<\/strong>) if the sheet is empty.<\/li>\n\n\n\n<li>Combine (<code>name<\/code> and <code>value<\/code>) from each event and appends them in the <strong>Description<\/strong> column.<\/li>\n\n\n\n<li>Automatically attempts to <strong>refresh tokens<\/strong> if a <strong>401 error<\/strong> occurs.<\/li>\n\n\n\n<li>Useful for compliance and IT Audit reports.<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"476\" src=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Google-automate-script-output-1024x476.png\" alt=\"\" class=\"wp-image-1278\" srcset=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Google-automate-script-output-1024x476.png 1024w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Google-automate-script-output-300x139.png 300w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Google-automate-script-output-768x357.png 768w, https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Google-automate-script-output.png 1353w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>My Recommendation<\/strong><\/h2>\n\n\n\n<p>After pulling the whole Audit logs, you can alter the query to collect last 24 hours and set the trigger every day on your preferred time.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Filter by Date <\/strong>\n<ul class=\"wp-block-list\">\n<li>Add query parameters to the URL, e.g., fetch logs from the past 24 hours<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nconst url = 'https:\/\/admin.googleapis.com\/admin\/reports\/v1\/activity\/users\/all\/applications\/admin?startTime=' + new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString();\n\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Scenario:As a Google Workspace Admin, you want to automate the process of exporting audit logs to Google Sheets for real-time monitoring, data analysis, and compliance reporting\u2014without manual intervention. You can automatically send Google Workspace Reporting, Audit, and Investigation logs to Google Sheets using Google Apps Script and Google Admin SDK Reports API. Here&#8217;s a step-by-step [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1283,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,102],"tags":[122,121,119,120],"class_list":["post-1265","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-cloud-gcp","category-it-infrastructure","tag-2025-google-workspace-guide","tag-export-logs-to-sheets-automatically","tag-google-apps-script-automation","tag-google-workspace-automation"],"featured_image_src":"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Google-Audit-Automation-1.png","author_info":{"display_name":"Mohamed Asath","author_link":"https:\/\/www.buildingtheitguy.com\/index.php\/author\/asathwebtieradmin\/"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Google Workspace Audit Logs to Google Sheets Automation \u2013 Complete 2025 Guide - Building THE IT GUY<\/title>\n<meta name=\"description\" content=\"Automate your Google Workspace audit logs export to Google Sheets. Track activities, enhance security visibility, and simplify compliance reporting with this 2025 step-by-step tutorial\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Google Workspace Audit Logs to Google Sheets Automation \u2013 Complete 2025 Guide - Building THE IT GUY\" \/>\n<meta property=\"og:description\" content=\"Automate your Google Workspace audit logs export to Google Sheets. Track activities, enhance security visibility, and simplify compliance reporting with this 2025 step-by-step tutorial\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/\" \/>\n<meta property=\"og:site_name\" content=\"Building THE IT GUY\" \/>\n<meta property=\"article:published_time\" content=\"2024-12-30T09:09:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-30T10:13:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Google-Audit-Automation-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mohamed Asath\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mohamed Asath\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\\\/cloud\\\/google-cloud-gcp\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\\\/cloud\\\/google-cloud-gcp\\\/\"},\"author\":{\"name\":\"Mohamed Asath\",\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/#\\\/schema\\\/person\\\/cce03fcda4c40ccf57ab3844ca707561\"},\"headline\":\"Google Workspace Audit Logs to Google Sheets Automation \u2013 Complete 2025 Guide\",\"datePublished\":\"2024-12-30T09:09:23+00:00\",\"dateModified\":\"2024-12-30T10:13:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\\\/cloud\\\/google-cloud-gcp\\\/\"},\"wordCount\":373,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\\\/cloud\\\/google-cloud-gcp\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/Google-Audit-Automation-1.png\",\"keywords\":[\"2025 Google Workspace Guide\",\"Export Logs to Sheets Automatically\",\"Google Apps Script Automation\",\"Google Workspace Automation\"],\"articleSection\":[\"Google GCP\",\"IT Infrastructure\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\\\/cloud\\\/google-cloud-gcp\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\\\/cloud\\\/google-cloud-gcp\\\/\",\"url\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\\\/cloud\\\/google-cloud-gcp\\\/\",\"name\":\"Google Workspace Audit Logs to Google Sheets Automation \u2013 Complete 2025 Guide - Building THE IT GUY\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\\\/cloud\\\/google-cloud-gcp\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\\\/cloud\\\/google-cloud-gcp\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/Google-Audit-Automation-1.png\",\"datePublished\":\"2024-12-30T09:09:23+00:00\",\"dateModified\":\"2024-12-30T10:13:50+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/#\\\/schema\\\/person\\\/cce03fcda4c40ccf57ab3844ca707561\"},\"description\":\"Automate your Google Workspace audit logs export to Google Sheets. Track activities, enhance security visibility, and simplify compliance reporting with this 2025 step-by-step tutorial\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\\\/cloud\\\/google-cloud-gcp\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\\\/cloud\\\/google-cloud-gcp\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\\\/cloud\\\/google-cloud-gcp\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/Google-Audit-Automation-1.png\",\"contentUrl\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/Google-Audit-Automation-1.png\",\"width\":1200,\"height\":628,\"caption\":\"Google Workspace Audit Logs to Google Sheets Automation \u2013 Complete 2025 Guide\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\\\/cloud\\\/google-cloud-gcp\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Google Workspace Audit Logs to Google Sheets Automation \u2013 Complete 2025 Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/#website\",\"url\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/\",\"name\":\"Building THE IT GUY\",\"description\":\"Making Everyone&#039;s Life Easier\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/#\\\/schema\\\/person\\\/cce03fcda4c40ccf57ab3844ca707561\",\"name\":\"Mohamed Asath\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab17cc6285a5051affe4181f53011c89cc055de9416bcc44b3e2771be318d870?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab17cc6285a5051affe4181f53011c89cc055de9416bcc44b3e2771be318d870?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab17cc6285a5051affe4181f53011c89cc055de9416bcc44b3e2771be318d870?s=96&r=g\",\"caption\":\"Mohamed Asath\"},\"description\":\"Turning IT Challenges into Opportunities\",\"sameAs\":[\"https:\\\/\\\/www.buildingtheitguy.com\"],\"url\":\"https:\\\/\\\/www.buildingtheitguy.com\\\/index.php\\\/author\\\/asathwebtieradmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Google Workspace Audit Logs to Google Sheets Automation \u2013 Complete 2025 Guide - Building THE IT GUY","description":"Automate your Google Workspace audit logs export to Google Sheets. Track activities, enhance security visibility, and simplify compliance reporting with this 2025 step-by-step tutorial","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/","og_locale":"en_US","og_type":"article","og_title":"Google Workspace Audit Logs to Google Sheets Automation \u2013 Complete 2025 Guide - Building THE IT GUY","og_description":"Automate your Google Workspace audit logs export to Google Sheets. Track activities, enhance security visibility, and simplify compliance reporting with this 2025 step-by-step tutorial","og_url":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/","og_site_name":"Building THE IT GUY","article_published_time":"2024-12-30T09:09:23+00:00","article_modified_time":"2024-12-30T10:13:50+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Google-Audit-Automation-1.png","type":"image\/png"}],"author":"Mohamed Asath","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mohamed Asath","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/#article","isPartOf":{"@id":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/"},"author":{"name":"Mohamed Asath","@id":"https:\/\/www.buildingtheitguy.com\/#\/schema\/person\/cce03fcda4c40ccf57ab3844ca707561"},"headline":"Google Workspace Audit Logs to Google Sheets Automation \u2013 Complete 2025 Guide","datePublished":"2024-12-30T09:09:23+00:00","dateModified":"2024-12-30T10:13:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/"},"wordCount":373,"commentCount":0,"image":{"@id":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/#primaryimage"},"thumbnailUrl":"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Google-Audit-Automation-1.png","keywords":["2025 Google Workspace Guide","Export Logs to Sheets Automatically","Google Apps Script Automation","Google Workspace Automation"],"articleSection":["Google GCP","IT Infrastructure"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/","url":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/","name":"Google Workspace Audit Logs to Google Sheets Automation \u2013 Complete 2025 Guide - Building THE IT GUY","isPartOf":{"@id":"https:\/\/www.buildingtheitguy.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/#primaryimage"},"image":{"@id":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/#primaryimage"},"thumbnailUrl":"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Google-Audit-Automation-1.png","datePublished":"2024-12-30T09:09:23+00:00","dateModified":"2024-12-30T10:13:50+00:00","author":{"@id":"https:\/\/www.buildingtheitguy.com\/#\/schema\/person\/cce03fcda4c40ccf57ab3844ca707561"},"description":"Automate your Google Workspace audit logs export to Google Sheets. Track activities, enhance security visibility, and simplify compliance reporting with this 2025 step-by-step tutorial","breadcrumb":{"@id":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/#primaryimage","url":"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Google-Audit-Automation-1.png","contentUrl":"https:\/\/www.buildingtheitguy.com\/wp-content\/uploads\/2024\/12\/Google-Audit-Automation-1.png","width":1200,"height":628,"caption":"Google Workspace Audit Logs to Google Sheets Automation \u2013 Complete 2025 Guide"},{"@type":"BreadcrumbList","@id":"https:\/\/www.buildingtheitguy.com\/index.php\/google-workspace-audit-logs-to-google-sheets-automation-complete-2025-guide\/cloud\/google-cloud-gcp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.buildingtheitguy.com\/"},{"@type":"ListItem","position":2,"name":"Google Workspace Audit Logs to Google Sheets Automation \u2013 Complete 2025 Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.buildingtheitguy.com\/#website","url":"https:\/\/www.buildingtheitguy.com\/","name":"Building THE IT GUY","description":"Making Everyone&#039;s Life Easier","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.buildingtheitguy.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.buildingtheitguy.com\/#\/schema\/person\/cce03fcda4c40ccf57ab3844ca707561","name":"Mohamed Asath","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ab17cc6285a5051affe4181f53011c89cc055de9416bcc44b3e2771be318d870?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ab17cc6285a5051affe4181f53011c89cc055de9416bcc44b3e2771be318d870?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ab17cc6285a5051affe4181f53011c89cc055de9416bcc44b3e2771be318d870?s=96&r=g","caption":"Mohamed Asath"},"description":"Turning IT Challenges into Opportunities","sameAs":["https:\/\/www.buildingtheitguy.com"],"url":"https:\/\/www.buildingtheitguy.com\/index.php\/author\/asathwebtieradmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.buildingtheitguy.com\/index.php\/wp-json\/wp\/v2\/posts\/1265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.buildingtheitguy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.buildingtheitguy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.buildingtheitguy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.buildingtheitguy.com\/index.php\/wp-json\/wp\/v2\/comments?post=1265"}],"version-history":[{"count":10,"href":"https:\/\/www.buildingtheitguy.com\/index.php\/wp-json\/wp\/v2\/posts\/1265\/revisions"}],"predecessor-version":[{"id":1293,"href":"https:\/\/www.buildingtheitguy.com\/index.php\/wp-json\/wp\/v2\/posts\/1265\/revisions\/1293"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.buildingtheitguy.com\/index.php\/wp-json\/wp\/v2\/media\/1283"}],"wp:attachment":[{"href":"https:\/\/www.buildingtheitguy.com\/index.php\/wp-json\/wp\/v2\/media?parent=1265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.buildingtheitguy.com\/index.php\/wp-json\/wp\/v2\/categories?post=1265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.buildingtheitguy.com\/index.php\/wp-json\/wp\/v2\/tags?post=1265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}