{"id":449,"date":"2026-10-19T15:12:02","date_gmt":"2026-10-19T15:12:02","guid":{"rendered":"https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/"},"modified":"2026-10-19T15:12:02","modified_gmt":"2026-10-19T15:12:02","slug":"run-soql-queries-directly-in-google-sheets-a-practical-guide","status":"publish","type":"post","link":"https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/","title":{"rendered":"Run SOQL Queries Directly in Google Sheets: A Practical Guide"},"content":{"rendered":"<p>Visual query builders are fine until you need a parent field, an aggregate, or a date-relative filter. If you know SOQL, the fastest path from Salesforce to a spreadsheet is typing the query yourself. <a href=\"https:\/\/www.g-integrator.com\/salesforce.html\">Data Integrator for Salesforce<\/a> lets you run raw SOQL <code>SELECT<\/code> statements directly in Google Sheets.<\/p>\n<h2>Your first query<\/h2>\n<p>Open <em>Data Integrator for Salesforce \u2192 Get Data using SOQL<\/em> and type:<\/p>\n<pre><code>SELECT Id, Name, Account.Name, Owner.Name\nFROM Contact\nWHERE CreatedDate = LAST_N_DAYS:30\nORDER BY CreatedDate DESC<\/code><\/pre>\n<p>Execute, and the result is written to a new sheet or to the current sheet starting at the active cell, with an optional header row.<\/p>\n<h2>What SOQL gives you that the builder cannot<\/h2>\n<ul>\n<li><strong>Relationship fields<\/strong> \u2014 pull <code>Account.Owner.Name<\/code> on a Contact without a second query or VLOOKUP<\/li>\n<li><strong>Date literals<\/strong> \u2014 <code>THIS_QUARTER<\/code>, <code>LAST_N_DAYS:90<\/code>, <code>NEXT_WEEK<\/code> keep queries evergreen<\/li>\n<li><strong>Aggregates and GROUP BY<\/strong> \u2014 <code>SELECT StageName, SUM(Amount) FROM Opportunity GROUP BY StageName<\/code> builds a pipeline summary in one shot<\/li>\n<\/ul>\n<h2>Save queries as templates<\/h2>\n<p>Check <strong>&#8220;Save as a template&#8221;<\/strong> in the SOQL dialog and the query appears in your template sidebars, where you can re-execute it, edit the SOQL text, or delete it. The previous output is cleared and rewritten in place, so your downstream formulas keep working.<\/p>\n<h2>Refresh on a schedule<\/h2>\n<p>Saved SOQL queries participate in <a href=\"https:\/\/www.g-integrator.com\/wiki\/salesforce\/automation.html\">workflows and webhooks<\/a> just like regular pull templates \u2014 schedule the refresh and your SOQL-powered dashboard updates itself.<\/p>\n<p>More examples, including gotchas around relationship depth and query limits, are in the <a href=\"https:\/\/www.g-integrator.com\/wiki\/salesforce\/soql.html\">SOQL help article<\/a>. Prefer clicking to typing? Start with the <a href=\"https:\/\/www.g-integrator.com\/wiki\/salesforce\/get-data.html\">visual data import<\/a> instead.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Write raw SOQL SELECT statements in Google Sheets: relationship fields, date literals, aggregates, saved query templates and scheduled refresh \u2014 everything the visual builder cannot express.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-449","post","type-post","status-publish","format-standard","hentry","category-salesforce"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Run SOQL Queries Directly in Google Sheets: A Practical Guide - G-Integrator blogs<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Run SOQL Queries Directly in Google Sheets: A Practical Guide - G-Integrator blogs\" \/>\n<meta property=\"og:description\" content=\"Write raw SOQL SELECT statements in Google Sheets: relationship fields, date literals, aggregates, saved query templates and scheduled refresh \u2014 everything the visual builder cannot express.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"G-Integrator blogs\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/gintegratorCompany\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-19T15:12:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wdp.g-integrator.com\/blog\/wp-content\/uploads\/2026\/09\/logolarge-4-scaled.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"761\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"gint\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"gint\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/2026\\\/10\\\/19\\\/run-soql-queries-directly-in-google-sheets-a-practical-guide\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/2026\\\/10\\\/19\\\/run-soql-queries-directly-in-google-sheets-a-practical-guide\\\/\"},\"author\":{\"name\":\"gint\",\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/#\\\/schema\\\/person\\\/9c702f84ef245e88819becb23351b1ad\"},\"headline\":\"Run SOQL Queries Directly in Google Sheets: A Practical Guide\",\"datePublished\":\"2026-10-19T15:12:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/2026\\\/10\\\/19\\\/run-soql-queries-directly-in-google-sheets-a-practical-guide\\\/\"},\"wordCount\":234,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/#organization\"},\"articleSection\":[\"Salesforce\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/2026\\\/10\\\/19\\\/run-soql-queries-directly-in-google-sheets-a-practical-guide\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/2026\\\/10\\\/19\\\/run-soql-queries-directly-in-google-sheets-a-practical-guide\\\/\",\"url\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/2026\\\/10\\\/19\\\/run-soql-queries-directly-in-google-sheets-a-practical-guide\\\/\",\"name\":\"Run SOQL Queries Directly in Google Sheets: A Practical Guide - G-Integrator blogs\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/#website\"},\"datePublished\":\"2026-10-19T15:12:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/2026\\\/10\\\/19\\\/run-soql-queries-directly-in-google-sheets-a-practical-guide\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/2026\\\/10\\\/19\\\/run-soql-queries-directly-in-google-sheets-a-practical-guide\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/2026\\\/10\\\/19\\\/run-soql-queries-directly-in-google-sheets-a-practical-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Run SOQL Queries Directly in Google Sheets: A Practical Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/\",\"name\":\"G-Integrator blogs\",\"description\":\"Blogs to support the G-Integrator products.\",\"publisher\":{\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/#organization\",\"name\":\"G-Integrator\",\"url\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/og-image.png\",\"contentUrl\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/og-image.png\",\"width\":1200,\"height\":630,\"caption\":\"G-Integrator\"},\"image\":{\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/gintegratorCompany\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/#\\\/schema\\\/person\\\/9c702f84ef245e88819becb23351b1ad\",\"name\":\"gint\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4290b2c4166d9d308cc28b65c9f6be23f4f107cad48630915b12a61df2d95a7f?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4290b2c4166d9d308cc28b65c9f6be23f4f107cad48630915b12a61df2d95a7f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4290b2c4166d9d308cc28b65c9f6be23f4f107cad48630915b12a61df2d95a7f?s=96&d=mm&r=g\",\"caption\":\"gint\"},\"sameAs\":[\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\"],\"url\":\"https:\\\/\\\/wdp.g-integrator.com\\\/blog\\\/author\\\/gint\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Run SOQL Queries Directly in Google Sheets: A Practical Guide - G-Integrator blogs","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:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/","og_locale":"en_US","og_type":"article","og_title":"Run SOQL Queries Directly in Google Sheets: A Practical Guide - G-Integrator blogs","og_description":"Write raw SOQL SELECT statements in Google Sheets: relationship fields, date literals, aggregates, saved query templates and scheduled refresh \u2014 everything the visual builder cannot express.","og_url":"https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/","og_site_name":"G-Integrator blogs","article_publisher":"https:\/\/www.facebook.com\/gintegratorCompany","article_published_time":"2026-10-19T15:12:02+00:00","og_image":[{"width":2560,"height":761,"url":"https:\/\/wdp.g-integrator.com\/blog\/wp-content\/uploads\/2026\/09\/logolarge-4-scaled.png","type":"image\/png"}],"author":"gint","twitter_card":"summary_large_image","twitter_misc":{"Written by":"gint","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/#article","isPartOf":{"@id":"https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/"},"author":{"name":"gint","@id":"https:\/\/wdp.g-integrator.com\/blog\/#\/schema\/person\/9c702f84ef245e88819becb23351b1ad"},"headline":"Run SOQL Queries Directly in Google Sheets: A Practical Guide","datePublished":"2026-10-19T15:12:02+00:00","mainEntityOfPage":{"@id":"https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/"},"wordCount":234,"commentCount":0,"publisher":{"@id":"https:\/\/wdp.g-integrator.com\/blog\/#organization"},"articleSection":["Salesforce"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/","url":"https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/","name":"Run SOQL Queries Directly in Google Sheets: A Practical Guide - G-Integrator blogs","isPartOf":{"@id":"https:\/\/wdp.g-integrator.com\/blog\/#website"},"datePublished":"2026-10-19T15:12:02+00:00","breadcrumb":{"@id":"https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wdp.g-integrator.com\/blog\/2026\/10\/19\/run-soql-queries-directly-in-google-sheets-a-practical-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wdp.g-integrator.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Run SOQL Queries Directly in Google Sheets: A Practical Guide"}]},{"@type":"WebSite","@id":"https:\/\/wdp.g-integrator.com\/blog\/#website","url":"https:\/\/wdp.g-integrator.com\/blog\/","name":"G-Integrator blogs","description":"Blogs to support the G-Integrator products.","publisher":{"@id":"https:\/\/wdp.g-integrator.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wdp.g-integrator.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/wdp.g-integrator.com\/blog\/#organization","name":"G-Integrator","url":"https:\/\/wdp.g-integrator.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wdp.g-integrator.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/wdp.g-integrator.com\/blog\/wp-content\/uploads\/2026\/09\/og-image.png","contentUrl":"https:\/\/wdp.g-integrator.com\/blog\/wp-content\/uploads\/2026\/09\/og-image.png","width":1200,"height":630,"caption":"G-Integrator"},"image":{"@id":"https:\/\/wdp.g-integrator.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/gintegratorCompany"]},{"@type":"Person","@id":"https:\/\/wdp.g-integrator.com\/blog\/#\/schema\/person\/9c702f84ef245e88819becb23351b1ad","name":"gint","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4290b2c4166d9d308cc28b65c9f6be23f4f107cad48630915b12a61df2d95a7f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4290b2c4166d9d308cc28b65c9f6be23f4f107cad48630915b12a61df2d95a7f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4290b2c4166d9d308cc28b65c9f6be23f4f107cad48630915b12a61df2d95a7f?s=96&d=mm&r=g","caption":"gint"},"sameAs":["https:\/\/wdp.g-integrator.com\/blog"],"url":"https:\/\/wdp.g-integrator.com\/blog\/author\/gint\/"}]}},"_links":{"self":[{"href":"https:\/\/wdp.g-integrator.com\/blog\/wp-json\/wp\/v2\/posts\/449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wdp.g-integrator.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wdp.g-integrator.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wdp.g-integrator.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wdp.g-integrator.com\/blog\/wp-json\/wp\/v2\/comments?post=449"}],"version-history":[{"count":0,"href":"https:\/\/wdp.g-integrator.com\/blog\/wp-json\/wp\/v2\/posts\/449\/revisions"}],"wp:attachment":[{"href":"https:\/\/wdp.g-integrator.com\/blog\/wp-json\/wp\/v2\/media?parent=449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wdp.g-integrator.com\/blog\/wp-json\/wp\/v2\/categories?post=449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wdp.g-integrator.com\/blog\/wp-json\/wp\/v2\/tags?post=449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}