{"id":6737,"date":"2026-04-14T10:52:09","date_gmt":"2026-04-14T07:52:09","guid":{"rendered":"https:\/\/ngc.com.tr\/?p=6737"},"modified":"2026-04-14T10:52:11","modified_gmt":"2026-04-14T07:52:11","slug":"docs-sheets-slides-and-drive-apis-integration-with-google-workspace","status":"publish","type":"post","link":"https:\/\/ngc.com.tr\/en\/docs-sheets-slides-and-drive-apis-integration-with-google-workspace\/","title":{"rendered":"Docs, Sheets, Slides and Drive APIs integration with Google Workspace"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\"><strong>System Architecture and Workflow: The &#8220;Zero-Touch&#8221; Onboarding Pipeline<\/strong><\/h3>\n\n\n\n<p>In this scenario, a backend service (such as a Node.js server running on Google Cloud Run or AWS Lambda) acts as the central orchestrator. The workflow is triggered the moment an HR representative inputs the new hire&#8217;s core details.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Phase 1: The Trigger and Data Ingestion (Google Forms + Sheets API)<\/strong><\/h4>\n\n\n\n<p>The process begins with structured data entry.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>HR fills out a standardized &#8220;New Hire Initiation&#8221; Google Form containing fields like: <em>Candidate Name, Role, Department, Manager Name, Start Date, and Salary<\/em>.<\/li>\n\n\n\n<li>This form automatically pushes data to a master Google Sheet.<\/li>\n\n\n\n<li><strong>Sheets API:<\/strong> Our backend listens for new row entries (via a Webhook or periodic polling). Once a new row is detected, the API extracts the candidate&#8217;s data as a JSON object to be pushed down the pipeline.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Phase 2: Document Generation &amp; Legal Compliance (Docs API)<\/strong><\/h4>\n\n\n\n<p>Next, the system generates the necessary legal and operational paperwork.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The system accesses two master templates in Google Drive: a &#8220;Standard Offer Letter&#8221; and an &#8220;Employee Handbook.&#8221;<\/li>\n\n\n\n<li><strong>Docs API:<\/strong> Using the documents.batchUpdate and replaceAllText endpoints, the system dynamically populates placeholders. {{CANDIDATE_NAME}}, {{START_DATE}}, and {{SALARY}} are instantly replaced with the data fetched from Sheets.<\/li>\n\n\n\n<li>Within seconds, a legally accurate, highly personalized contract is generated without a human opening a word processor.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Phase 3: The Visual Welcome &amp; Roadmap (Slides API)<\/strong><\/h4>\n\n\n\n<p>A great onboarding experience requires more than just reading contracts. The new hire needs to understand their team and goals.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The system duplicates a &#8220;Welcome to the Team&#8221; Google Slides template.<\/li>\n\n\n\n<li><strong>Slides API:<\/strong> It uses presentations.batchUpdate to customize the deck. It replaces text placeholders like {{ROLE}} and {{DEPARTMENT}}.<\/li>\n\n\n\n<li><em>Advanced Integration:<\/em> Using the ReplaceImageRequest method within the Slides API, the system can even dynamically pull the hiring manager&#8217;s profile picture from a company database and insert it into the &#8220;Meet Your Manager&#8221; slide.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Phase 4: Provisioning and Delivery (Drive API + Gmail API)<\/strong><\/h4>\n\n\n\n<p>Generating the files is only half the battle; they must be securely organized and delivered to the candidate.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Drive API:<\/strong> The system uses files.create to generate a dedicated folder named <em>&#8220;[Candidate Name] &#8211; Onboarding Materials&#8221;<\/em>. It then uses files.update to move the generated Docs and Slides into this specific folder. Crucially, it sets the folder permissions so only the HR manager and the new hire&#8217;s personal email have &#8220;Viewer&#8221; or &#8220;Commenter&#8221; access.<\/li>\n\n\n\n<li><strong>Gmail API:<\/strong> Finally, the users.messages.send endpoint crafts a beautifully formatted HTML email welcoming the candidate. This email includes direct, authenticated links to their new Drive folder containing their offer letter and welcome presentation.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Technical Requirements and Authorization (OAuth Scopes)<\/strong><\/h3>\n\n\n\n<p>To implement this enterprise-grade pipeline, your service account or OAuth application will require the following scopes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>https:\/\/www.googleapis.com\/auth\/spreadsheets.readonly (To read the new hire data)<\/li>\n\n\n\n<li>https:\/\/www.googleapis.com\/auth\/documents (To generate contracts and handbooks)<\/li>\n\n\n\n<li>https:\/\/www.googleapis.com\/auth\/presentations (To customize the welcome deck)<\/li>\n\n\n\n<li>https:\/\/www.googleapis.com\/auth\/drive (To create folders, move files, and manage sharing permissions)<\/li>\n\n\n\n<li>https:\/\/www.googleapis.com\/auth\/gmail.send (To dispatch the automated welcome email)<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>System Architecture and Workflow: The &#8220;Zero-Touch&#8221; Onboarding Pipeline In this scenario, a backend service (such as a Node.js server running on Google Cloud Run or AWS Lambda) acts as the central orchestrator. The workflow is triggered the moment an HR representative inputs the new hire&#8217;s core details. Phase 1: The Trigger and Data Ingestion (Google [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":6738,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"class_list":["post-6737","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-workspace-en"],"_links":{"self":[{"href":"https:\/\/ngc.com.tr\/en\/wp-json\/wp\/v2\/posts\/6737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ngc.com.tr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ngc.com.tr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ngc.com.tr\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ngc.com.tr\/en\/wp-json\/wp\/v2\/comments?post=6737"}],"version-history":[{"count":1,"href":"https:\/\/ngc.com.tr\/en\/wp-json\/wp\/v2\/posts\/6737\/revisions"}],"predecessor-version":[{"id":6740,"href":"https:\/\/ngc.com.tr\/en\/wp-json\/wp\/v2\/posts\/6737\/revisions\/6740"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ngc.com.tr\/en\/wp-json\/wp\/v2\/media\/6738"}],"wp:attachment":[{"href":"https:\/\/ngc.com.tr\/en\/wp-json\/wp\/v2\/media?parent=6737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ngc.com.tr\/en\/wp-json\/wp\/v2\/categories?post=6737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ngc.com.tr\/en\/wp-json\/wp\/v2\/tags?post=6737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}