<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jérémy Dessalines on Medium]]></title>
        <description><![CDATA[Stories by Jérémy Dessalines on Medium]]></description>
        <link>https://medium.com/@jeremy-dessalinesdorbigny?source=rss-b6c1a461c737------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xMPFG8azQL7kK5N71NCiBw@2x.jpeg</url>
            <title>Stories by Jérémy Dessalines on Medium</title>
            <link>https://medium.com/@jeremy-dessalinesdorbigny?source=rss-b6c1a461c737------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 17:15:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jeremy-dessalinesdorbigny/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Dynamically extract data from Workday Adaptive Planning using Google Cloud Run (Part 2/2)]]></title>
            <link>https://jeremy-dessalinesdorbigny.medium.com/dynamically-extract-data-from-workday-adaptive-planning-using-google-cloud-run-part-2-2-ece685b74f21?source=rss-b6c1a461c737------2</link>
            <guid isPermaLink="false">https://medium.com/p/ece685b74f21</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[workday-adaptive-planning]]></category>
            <category><![CDATA[google-cloud-run]]></category>
            <dc:creator><![CDATA[Jérémy Dessalines]]></dc:creator>
            <pubDate>Mon, 24 Jul 2023 21:41:39 GMT</pubDate>
            <atom:updated>2023-07-24T21:41:39.821Z</atom:updated>
            <content:encoded><![CDATA[<p>Part 2/2 — Repo update</p><p>In the first part of the project we saw how to extract dynamically data from Workday Adaptive Planning.</p><p>During the past month I have updated my repo so that the dataframe created will contain historically all the data from YTD to end of year, using:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3e209bf579c70876c8621c37b355dd4f/href">https://medium.com/media/3e209bf579c70876c8621c37b355dd4f/href</a></iframe><p>Feel free to see <em>the updated </em><a href="https://github.com/g-r3m/cloudrun-workdayadaptiveplanning/blob/main/main.py"><em>repo</em></a><em> here.</em></p><p>I did a bunch of small quick update so that I collect the whole year data from the data I want to compare with. Feel free to adjust this section of my repo.</p><p>Data is then stored everyday in my BigQuery datawarehouse allowing to compare data from what I have from my source to what I have in my Workday Extract repository.</p><p>Have a great day,</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ece685b74f21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dynamically extract data from Workday Adaptive Planning using Google Cloud Run (Part 2/2)]]></title>
            <link>https://jeremy-dessalinesdorbigny.medium.com/dynamically-extract-data-from-workday-adaptive-planning-using-google-cloud-run-part-2-2-40e733c270a4?source=rss-b6c1a461c737------2</link>
            <guid isPermaLink="false">https://medium.com/p/40e733c270a4</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-cloud-scheduler]]></category>
            <category><![CDATA[google-cloud-run]]></category>
            <category><![CDATA[workday-adaptive-planning]]></category>
            <dc:creator><![CDATA[Jérémy Dessalines]]></dc:creator>
            <pubDate>Mon, 24 Jul 2023 11:45:26 GMT</pubDate>
            <atom:updated>2023-07-24T11:45:26.002Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*Xk2dKJMHzOzYAuZADITcDA.png" /></figure><p>Hello everyone,</p><p>I have updated my <a href="https://github.com/g-r3m/cloudrun-workdayadaptiveplanning">repo</a> to improve how it works. <br>Now I will default query the whole year, so that I enforce it to have the whole current year period.</p><p>Now in order to schedule your Cloud Run we will use <a href="https://console.cloud.google.com/cloudscheduler">Cloud Scheduler</a> by running this command line:</p><pre>gcloud scheduler jobs create http my-job - schedule \<br> - schedule=&quot;*/5 * * * *&quot; \<br> - uri=${SERVICE_URL} \<br> - http-method=GET \<br> - oauth-service-account-email ${SCHEDULER_SERVICE_ACCOUNT}@${PROJECT_ID}.iam.gserviceaccount.com</pre><p>You might need to create the ${SCHEDULER_SERVICE_ACCOUNT} , then run those extra steps:</p><pre>export SCHEDULER_SERVICE_ACCOUNT=wap-scheduler-job-sa<br><br>gcloud iam service-accounts create ${SCHEDULER_SERVICE_ACCOUNT}</pre><pre>gcloud projects add-iam-policy-binding ${PROJECT_ID} \<br>  --member=&quot;serviceAccount:${SCHEDULER_SERVICE_ACCOUNT}@${PROJECT_ID}.iam.gserviceaccount.com&quot; \<br>  --role=&quot;roles/run.invoker&quot;</pre><p>To run the schedule Cloud Scheduler, you can use the Google Cloud interface:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*2EkBmnaUMia_JziGVO_-2Q.png" /><figcaption>Cloud Scheduler interface</figcaption></figure><p>It should trigger <a href="https://console.cloud.google.com/run/jobs/details/us-east1/cleanup-service/logs">Cloud Run Job</a>. If needed you can do it manually by clicking the “EXECUTE” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*a--fV99l3VhoE88e0a3bMA.png" /><figcaption>Cloud Run interface</figcaption></figure><p>From Cloud Shell by running following command:</p><pre>gcloud run jobs execute my-job --region=$REGION</pre><p>Happy coding,</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40e733c270a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dynamically extract data from Workday Adaptive Planning using Google Cloud Run]]></title>
            <link>https://jeremy-dessalinesdorbigny.medium.com/dynamically-extract-data-from-workday-adaptive-planning-using-google-cloud-run-208b8b50579c?source=rss-b6c1a461c737------2</link>
            <guid isPermaLink="false">https://medium.com/p/208b8b50579c</guid>
            <category><![CDATA[workday-adaptive-planning]]></category>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[workday]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Jérémy Dessalines]]></dc:creator>
            <pubDate>Wed, 31 May 2023 19:45:54 GMT</pubDate>
            <atom:updated>2023-06-01T07:07:38.106Z</atom:updated>
            <content:encoded><![CDATA[<h3>Dynamically extract data from Workday Adaptive Planning using Google Cloud Run (Part 1/2)</h3><p>I’m deploying for the second time a <a href="https://www.workday.com/en-us/products/adaptive-planning/overview.html">Workday Adaptive Planning</a> project. <br>As part of those project you need to:</p><ul><li><strong>Extract data</strong> from your source ERP,</li><li><strong>Import</strong> <strong>data</strong> <em>into</em> Workday Adaptive Planning,</li><li><strong>Extract data </strong><em>from</em> Workday Adaptive Planning</li></ul><p>In this article, I will share how to extract data from the Workday Adaptive Planning.</p><p>I will share a specific use case, how to:</p><ul><li><strong>Extract data </strong>from <strong>Workday Adaptive Planning </strong>using <strong>APIs</strong></li><li>Use <strong>Google Cloud Run</strong>, <strong>Cloud Scheduler</strong>, <strong>Secret Manager, Pub/Sub </strong>and <strong>BigQuery</strong> to store the result</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xGYtUYcEqqBiIGsqxdEwcA.png" /><figcaption>High Level Architecture</figcaption></figure><p>The goal is to compare data from Workday with data from our source ERP so that we can guarantee data is reliable in Workday Adaptive Planning.</p><p>This post is the <strong>first part</strong> of the <strong>use case,</strong> the <strong>second</strong> will explain how to schedule and run this function dynamically.</p><h3>How to extract data from Workday Adaptive Planning</h3><p>I will use the <a href="https://adaptiveplanning.doc.workday.com/r/DG7oXjCPB6kIw6Th6awNUg/0fXvQfif~jEthDiNR9fuYA">exportData</a> method of the Workday Adaptive Planning API.</p><blockquote>ExportData method description:</blockquote><blockquote>This method’s request contains the parameters that will be used to search the data in the specified version and return values which match the requested filters and format. This is the basic method used to retrieve data from Adaptive Planning, and can be used to retrieve values from any accounts, including standard accounts, GL accounts, modeled accounts, cube accounts, custom accounts, metric accounts, assumptions, and exchange rates.</blockquote><p>This will be a flexible approach to retrieve values from Adaptive Planning.</p><p>To be able to access data you will need:</p><ul><li>Login</li><li>Password</li></ul><p>Login &amp; Password can be collected in your Workday instance. You can use a dedicated user to perform calls to the APIs.</p><h3>Secret Manager</h3><p>I will use <a href="https://cloud.google.com/secret-manager/docs?hl=en">Secret Manager</a> to securely store the credentials in a JSON.</p><p>Create a Secret Manager called “<strong>adaptive_login</strong>” in your Google Cloud project:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/853bd60cf7aecc7f9dd469a91c96702c/href">https://medium.com/media/853bd60cf7aecc7f9dd469a91c96702c/href</a></iframe><h4>Specify your “exportData” Query</h4><p>exportData call must contain exactly one element of each of the listed types:</p><ul><li>Credentials <em>(defined above)</em></li><li>Version</li><li>format</li></ul><p>A request also may contain one of the following elements:</p><ul><li>Filters</li><li>accounts &gt; account</li><li>levels &gt; level</li><li>dimensionValues &gt; dimensionValue</li><li>timeSpan</li><li>dimensions &gt; dimension</li><li>rules &gt; currency</li></ul><p>For this example I will defined on my xml call:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/74173dd06997f1fa671367f2704295d5/href">https://medium.com/media/74173dd06997f1fa671367f2704295d5/href</a></iframe><p>In my code I will set default values, you will need to set each one of them.</p><h3>Google BigQuery</h3><p>Now we are going to send the data we have retrieved into <a href="https://cloud.google.com/bigquery/docs">BigQuery</a>, we need to define:</p><p>Now we are going to send the data we have retrieved into <a href="https://cloud.google.com/bigquery/docs">BigQuery</a>, we need to define:</p><ul><li>Project_id: PROJECT_ID,</li><li>Dataset_id: DATASET_ID,</li><li>Table_id: TABLE_ID.</li></ul><p>You will need to set each one of them.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1e6e9378d10487399d1d2fb37be286fa/href">https://medium.com/media/1e6e9378d10487399d1d2fb37be286fa/href</a></iframe><p>In my code I will set default values, you will need to set each one of them.</p><h3>Deploying using Google Cloud Run</h3><p>Define you vars:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/beb708e413bc7156b3a679977a011f10/href">https://medium.com/media/beb708e413bc7156b3a679977a011f10/href</a></iframe><p><a href="https://cloud.google.com/run/docs">Google Cloud Run</a> will allow us to deploy your code.</p><p>Copy this <a href="https://github.com/g-r3m/cloudrun-workdayadaptiveplanning/tree/main">repo</a> and run:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fbd2a7acd51ce833993ef5b7e92ee1cf/href">https://medium.com/media/fbd2a7acd51ce833993ef5b7e92ee1cf/href</a></iframe><p>Test your code by running:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2ebc36aeab672b0ed85b8e65b5ea25c0/href">https://medium.com/media/2ebc36aeab672b0ed85b8e65b5ea25c0/href</a></iframe><p>Replace `[CLOUD_RUN_SERVICE_URL]` with the URL of your Cloud Run service.</p><p>Make sure to replace `[PROJECT_ID]` and `[CLOUD_RUN_SERVICE_URL]` with your actual values in the README file.</p><p>You will need to grant access to the Google Cloud Run service account:</p><ul><li>Access to Secret Manager</li><li>Editor access to BigQuery &amp; JobUser.</li></ul><p>Result will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WdKSu8mrIhThnRFSVYrkCQ.png" /></figure><p>In the next post I will dive into how to schedule this using Cloud Scheduler.</p><p>Happy coding,</p><p>See you in 2 weeks for the second part,</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FumYMU8G2ixG5mJBDo5%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FBoschGlobal-coding-home-office-remote-working-umYMU8G2ixG5mJBDo5&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExZTVqa3lzZWpiNGkxeXlhM21ta3lsM3RmdjgwNDhueTNkd2tsbGRnbyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FumYMU8G2ixG5mJBDo5%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/f8613bd32af71255457a099b82eaff43/href">https://medium.com/media/f8613bd32af71255457a099b82eaff43/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=208b8b50579c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a simple Approval process via Email with Google Form and Google Apps Script (Web Apps…]]></title>
            <link>https://jeremy-dessalinesdorbigny.medium.com/create-a-simple-approval-process-via-email-with-google-form-and-google-apps-script-web-apps-3e4bf07c3601?source=rss-b6c1a461c737------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e4bf07c3601</guid>
            <category><![CDATA[workflow-automation]]></category>
            <category><![CDATA[google-workspace]]></category>
            <category><![CDATA[google-forms]]></category>
            <category><![CDATA[google-apps-script]]></category>
            <dc:creator><![CDATA[Jérémy Dessalines]]></dc:creator>
            <pubDate>Wed, 12 May 2021 13:54:17 GMT</pubDate>
            <atom:updated>2021-05-22T14:22:49.331Z</atom:updated>
            <content:encoded><![CDATA[<h3>Create a simple Approval process via Email with Google Form and Google Apps Script (Web Apps Deployment)</h3><p>TL:DR: At the end of this article, you will know how to create a workflow app, based on a Google Form that send an email to be approved or deny including logging of who is approving or denying with Apps Script. You will have discover how you can:</p><ul><li>Trigger Apps Script onFormSubmit</li><li>Publish your script as a web-app</li><li>Generate emails based on HTML templates</li><li>Generate an UUID to be used for following request sent</li></ul><h4>Some context</h4><p>I’m working for Veolia and we use Google Workspace. In my IT departments, we have quite often ask to handle workflow approval as simple as clicking on a button in an email to approve or deny a request.</p><p>To achieve those kind of use cases in Google Apps Script, web-apps can comes to your rescue. It is a very simple way to design a solution, a <em>Minimum Viable Product</em>, quickly.</p><p>Here is what we will build:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UzSzls_xYaxiax2QJ4RjVg.jpeg" /><figcaption>The context and the process we will build</figcaption></figure><h4>Why a web-app is needed ?</h4><p>In this scenario, you have a script that contains / does something <strong>you want only you to be get access to</strong>.</p><p>— It could includes : API calls, edit files/folders in your Google Drive for example. —</p><ul><li>You want to allow/share it : 1. <strong>Only to specific people </strong>(a Google Group?), or, 2. make it available <strong>in your organisation / or publicly</strong>.</li><li><strong>AND</strong> At the same time you don’t want to share this full <strong>scope</strong> of what your script is actually doing, i.e, it must still be executed by “<em>you</em>”. As an extra you might still want to know who is doing what so you will still keep a track of the email address of the person who reach your web-app.</li><li>Your database will be a Google Sheet.</li></ul><p>NB: As I use mostly Apps Script for internal needs in my company I have no experience in <em>public</em> sharing web-apps.</p><h4>Requirements for web apps in Apps Script</h4><p>A script can be published as a web app if it meets these requirements:</p><ul><li>It contains a doGet(e) or doPost(e) function.</li><li>The function returns an <a href="https://developers.google.com/apps-script/guides/html">HTML service</a> <a href="https://developers.google.com/apps-script/reference/html/html-output">HtmlOutput</a> object or a <a href="https://developers.google.com/apps-script/guides/content">Content service</a> <a href="https://developers.google.com/apps-script/reference/content/text-output">TextOutput</a> object.</li></ul><p>Learn more <a href="https://developers.google.com/apps-script/guides/web">here</a>.</p><h3><strong>Here we go !</strong></h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FY7A1tOoc0IMosaW6HQ%2Fvideo&amp;display_name=GIPHY&amp;url=https%3A%2F%2Fgiphy.com%2Fclips%2FBTTF-ready-back-to-the-future-bttf-Y7A1tOoc0IMosaW6HQ&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FY7A1tOoc0IMosaW6HQ%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="480" height="360" frameborder="0" scrolling="no"><a href="https://medium.com/media/354a60d075b49ea1a9036ff5e071a8fa/href">https://medium.com/media/354a60d075b49ea1a9036ff5e071a8fa/href</a></iframe><h3>Part 1 — On Form Submit</h3><p>All source are here:</p><ul><li><a href="https://docs.google.com/forms/d/11Y4KiWm6fBoYFivGLuVZFcT4fm3cPd6hlfpLPP3EgSo/copy">Make a copy</a> of the sample Google Form.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Ka1MrcwXYMuNsAwk1ITNw.png" /><figcaption>Our basic Google Form for testing/example purpose</figcaption></figure><ul><li><a href="https://docs.google.com/spreadsheets/d/10mV4aM8XUeVe2QWz9K7OUxIhEF7qdoldO0nWPj_pcGw/copy">Make a copy</a> of the Google Sheet + Apps Script.</li><li><a href="https://github.com/g-r3m/GASapprovalGoogleFormworkflow">Code repository</a> on GitHub</li></ul><p>1 — Create your form, link it to a Google Spreadsheet</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*41q6qlzUSYk40CQuy9_SmA.png" /><figcaption>Button “create spreadsheet” to link a form to a Google Sheet</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Tmh8oY8fSUxaTcF6fxWjQ.png" /><figcaption>Click “collect email addresses” — should be auto configured — but it will be needed in our use case</figcaption></figure><p>2 — First part of our process: onFormSubmit send email to the approver</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/794ec8d9ec924e7990bf3bcd24400ea3/href">https://medium.com/media/794ec8d9ec924e7990bf3bcd24400ea3/href</a></iframe><p>This script needs to be triggered onFormSubmit so :</p><p>1 — Click on “<em>Triggers</em>” on the menu</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*3uOL5GprjC8-c2LlnCC5Ow.png" /></figure><p>2 — Click on “<em>Add trigger</em>” button</p><p>3 — Add “<em>autoFillGoogleDocForm</em>” as “<em>onFormSubmit</em>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kSsxVU7w0vUkasB-lJgW0w.png" /><figcaption>Set up to trigger a function onFormSubmit</figcaption></figure><p>Now each time someone fill a form the code bellow will be triggered.</p><p>It collects information submitted on the Google Sheet linked to the Google Form, generate a UUID, add some information on the line to manually trigger if needed “<em>Approve</em>” or “<em>Deny</em>” function.</p><p>To go to this phase, we need to deploy the other part of the script that will be used to allow our end-users to click on the link and “Approve” / “Deny” their request.</p><h3>Part 2— Deploy your web-app</h3><p>Now you will have to click on “<em>Deploy</em>”, then “<em>New deployment</em>” to publish your script. It will generates a URL that we will use and add as a Constraint in our script.</p><p>1 — Click on Deploy, then New Deployment</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*lNBGLz9uPDHBglFs76uxmA.png" /></figure><p>2 — Configure your deployment</p><p>You can add a name, and define who can access it. For our usecase I need to collect “who” is clicking on the button so I want to know their Gmail address. You can set “<em>Everyone within Corporate organization</em>” or “<em>Anyone with Gmail account</em>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JD7-L4yvZ31Nzr57DCnRSg.png" /></figure><p>2 —Now copy the web app URL generated into “<em>Constraints.gs</em>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GrO6H3cM2uj4H3bBzkgxpg.png" /><figcaption>Active deployment url can be copy here</figcaption></figure><p>3 — Past the URL into “<em>Constraints.gs</em>”</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/edd659f48ba95ac97e00389e28cd611e/href">https://medium.com/media/edd659f48ba95ac97e00389e28cd611e/href</a></iframe><p>Change “<em>INSERT_HERE_DEPLOYURL</em>” variable.</p><p>Change “<em>INSERT_APPROVER_EMAIL</em>” variable. It will be the email that will receive with you the approval request. It can also be a <em>Google Groups </em>for<em> </em>example.</p><p>Time to test your code, you can now fill a Form and test that the whole flow is working.</p><p>But let’s just look at what the emails sent will look like, you can find them in the <em>.html </em>part of the script. Here is the one sent at the start of the process.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1aa85a5ebffc1270fa41ac1a2a0f5177/href">https://medium.com/media/1aa85a5ebffc1270fa41ac1a2a0f5177/href</a></iframe><p>The first email is requesting approval to an approver then it will send the approval or deny status to the requester.</p><p>It will also generate a UUID that can be used to <strong>track</strong> the approval status.</p><p><em>— Say generated a purchase order number for example —</em></p><h3>Part 3— Time to test</h3><p>You can fill a Google Form and you should receive an email like that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OgOIVgA6pP1PiZDOMY9kOQ.png" /><figcaption>Example email received.</figcaption></figure><p>When you click on the link to approve or deny you are receiving a simple message to acknowledge we have collected the information.</p><p>All information can be found:</p><p>1 — on the Google Sheet to receive the approval :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PBPthv22AXu6J9ullXQkRw.png" /></figure><p>2 — on the Logs also so we can easily track if people try to click many times for example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*lucTE5QISv_W_G2nINu5Vw.png" /><figcaption>Logs sheet</figcaption></figure><p>So if you click on “<strong>Approve</strong>” you will have your email appearing on both page and that should be fine.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3o6Zt8qDiPE2d3kayI%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FOriginals-thumbs-up-congrats-you-did-it-3o6Zt8qDiPE2d3kayI&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2F3o6Zt8qDiPE2d3kayI%2Fgiphy.gif%3Fcid%3D790b761194857efd70416feebb6e74864bed4734b923bb37%26rid%3Dgiphy.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/9ff89580a39e8b2aee6dd11d2379f0e2/href">https://medium.com/media/9ff89580a39e8b2aee6dd11d2379f0e2/href</a></iframe><h3>Let’s wrap up</h3><p>Now you have build a simple approval process workflow. Feel free to tune it to your own use case.</p><p>You can of course tweak it and improve, let me know what you build with it or if you have questions.</p><p>Warm thank you to my team in Stockholm. Shout out to Charlie O., Johan B., Oscar K. during this fun and very quick project we did couple of months ago.</p><p>PS: Google Apps Script released on March 15th a new feature.</p><h4>Extra information — Side notes</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2SkRDrqojDamoMI_2GwvSw.png" /><figcaption>Release notes</figcaption></figure><p>It is now possible to release multiple deployment with the same script.</p><p>This sounds very interesting for some use cases. Maybe this one ?</p><p>It reminded me this tweak I have been doing for specific use cases in my organisation and Martin tweet push me to write this article, which is kinda connected to this new release.</p><h4>PS2: Check out other Google product <a href="https://www.appsheet.com/">AppSheet</a> it might helps ! (we like it too)</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e4bf07c3601" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to get the list of Google Cloud Platform projects using Google App Maker in your entreprise ?]]></title>
            <link>https://jeremy-dessalinesdorbigny.medium.com/how-to-get-the-list-of-google-cloud-platform-projects-using-google-app-maker-in-your-entreprise-18dfce14ae9?source=rss-b6c1a461c737------2</link>
            <guid isPermaLink="false">https://medium.com/p/18dfce14ae9</guid>
            <category><![CDATA[google-app-maker]]></category>
            <category><![CDATA[google-cloud]]></category>
            <category><![CDATA[google-suite]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Jérémy Dessalines]]></dc:creator>
            <pubDate>Sun, 29 Dec 2019 11:01:01 GMT</pubDate>
            <atom:updated>2019-12-29T11:01:01.110Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to get the list of Google Cloud Platform projects using Google App Maker ?</h3><p>I have already talked about the dashboard I have created in order to <a href="https://medium.com/p/c3d2dab414a8">follow the trends of App Maker apps developed in our organization</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*7btOrhgxEc8lrA0Y" /></figure><p>I’m also following the Google Cloud Platform projects who are using Google App Maker. It helped our FinOps to identify the cost of the product in our organization, more importantly it allows me to track product adoption.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*rvqcWveLUWSDW_g_YWNH7A.jpeg" /><figcaption>Adoption dashboard</figcaption></figure><h3>Before we start</h3><p>As a reminder, your App Maker apps can use an existing custom database, or you can create a new one. In order to do it, you need to set it up and integrate it.</p><p>App Maker runs on App Engine. Set up a connection with App Engine by adding a service account to your Cloud project : <a href="/service/mailto:appmaker-maestro@appspot.gserviceaccount.com">appmaker-maestro@appspot.gserviceaccount.com</a></p><p>This is what we are going to identify and list.</p><h3>Prerequisite</h3><p>In order to execute the script you need a service account with GET IAM POLICY rights at ORG level.</p><p>We will use <a href="https://cloud.google.com/shell/">Cloud Shell</a> to execute the script.</p><p>To <a href="https://medium.com/@pnatraj/how-to-run-gcloud-command-line-using-a-service-account-f39043d515b9">run gcloud command line using a service account</a>:</p><p>If necessary (authenticate with your Gmail account), with the following command:</p><p><em>gcloud auth login</em></p><p>If necessary get on the right project:</p><p><em>gcloud config set project PROJECT-NAME</em></p><h4>Step 1:</h4><p>Retrieve the service account key (to be generated on the console or by command line)</p><p><em>gcloud auth activate-service-account — project = gbl-ist-ve-corp-inso — key-file = somekey.json</em></p><p><em>Somekey.json</em>: this is the key generated by your GCP admin.</p><p>This adds the rights of the service account to the authenticated user.</p><h3>The script</h3><p>In order to do it we have developed a shell script who list all the projects with this service account in their IAM.</p><p>Source:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/06b068e2ccfee026e8982c1140a7328b/href">https://medium.com/media/06b068e2ccfee026e8982c1140a7328b/href</a></iframe><p>You need to create a script file (<em>script.sh</em>) and a log file (<em>log_file.txt</em>).</p><p>You can execute the code using the following command: <em>Bash script.sh</em></p><p>The script scans the projects and identifies the projects having as members</p><p><a href="/service/mailto:appmaker-maestro@appspot.gserviceaccount.com">appmaker-maestro@appspot.gserviceaccount.com</a>.</p><p>Projects with this role in IAM are added to a log file. The project appears several times if the account has several roles.</p><p>Here you go you have your result in your <em>log_file</em>.</p><h3>Thank you for reading</h3><p>I’d like to thank <a href="https://www.linkedin.com/in/kaouthar-boulerbah">Kaoutar Boulerbah</a> for supporting this simple but useful project and Antoine Castex our <a href="https://www.youtube.com/watch?v=Lm-ebQVytBY">GCP Admin brilliant speaker</a> for the json key.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18dfce14ae9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a game web-app fast with Google App Maker ? Challenge accepted.]]></title>
            <link>https://jeremy-dessalinesdorbigny.medium.com/create-a-game-web-app-fast-with-google-app-maker-challenge-accepted-b21130284994?source=rss-b6c1a461c737------2</link>
            <guid isPermaLink="false">https://medium.com/p/b21130284994</guid>
            <category><![CDATA[google-data-studio]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-suite]]></category>
            <category><![CDATA[google-apps-script]]></category>
            <category><![CDATA[google-app-maker]]></category>
            <dc:creator><![CDATA[Jérémy Dessalines]]></dc:creator>
            <pubDate>Mon, 16 Dec 2019 15:56:01 GMT</pubDate>
            <atom:updated>2019-12-16T15:56:01.346Z</atom:updated>
            <content:encoded><![CDATA[<h3>Create a game web-app fast with Google App Maker</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_YVdzvF45BOdV62pfbVTgg.png" /></figure><p><strong>The context</strong></p><p>In my company we have express <a href="https://www.veolia.com/en/news/veolia-group-giving-itself-purpose">our purpose</a>, it describes both why our group exists, what it does and how, for the benefit of all its stakeholders.</p><p>In my department, IS&amp;T we are committed to preserving, using and recycling natural resources efficiently. We want to be useful, exemplary, contribute to the general interest and reduce the environmental footprint of digital uses . This digital sobriety approach promotes the controlled use of tools and increases our environmental and economic performance.</p><p>Cloud-only pay-as-you-go solutions and the adoption of Chromebook devices are lightening the weight of our infrastructure and maintenance. Their appeals are fully in line with our “Ressourcing the World” mission.</p><p>That is why we want to engage our end-users. So, we have created a web-app to push good practices in the office around a collective and solidarity challenge we have launch this autumn.</p><p><strong>Our challenge</strong></p><p>It is based on Google App Maker as we were able to create this app following an agile methodology fast.</p><p>With this app we have identified 35 good eco-responsible practices at the office spread around four families. This calculates a score for each IS&amp;T employee. The score is then sum by team at the manager level.</p><p><strong>The result</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*Jam8VyVtiVvCwN5UD-T0UQ.gif" /><figcaption>The web-app: One for All</figcaption></figure><p>The app benefits from Google App Maker to authenticate the user, create a responsive application that allows the visualization of good practices in the form of cards.</p><p>The application works with a few lines of code. Access is secure and restricted to a small group of users via a Google Group.</p><p>In addition users can see the evolution of the score live via a DataStudio report connected to the database of the application (Google Cloud SQL).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QxiVxU52leehpcP5Zy1hlA.png" /><figcaption>Global result in our Google Data Studio</figcaption></figure><p>All this was done in a few weeks with a UX designer to prepare the UX of the game, a developer and a project manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/233/1*29ifoJ2ggiPRM-EZTq9T4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/1*zpG_j_ViHPJu9-atVBxGJA.png" /></figure><p>Good luck to our IS &amp; T players and at the end let the planet wins!</p><p>PS : You can get the reusable source app (.zip) <a href="https://drive.google.com/open?id=1kPKXZUqKuaXWRqBIVbkPAQ7Fjy79YfPP">here</a>. If you want to do the same within your company. You have to modify and store the app images. I have included reusable samples.</p><p>PS2: Might be english in french in the client/server side scripts comments. I’m a bit lazy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b21130284994" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to design advanced Google App Maker apps with BigQuery API, Groups, Data Studio and Cloud SQL]]></title>
            <link>https://jeremy-dessalinesdorbigny.medium.com/how-to-query-bigquery-api-with-google-app-maker-d0497390f254?source=rss-b6c1a461c737------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0497390f254</guid>
            <category><![CDATA[google-app-maker]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[google-apps-script]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Jérémy Dessalines]]></dc:creator>
            <pubDate>Wed, 02 Oct 2019 12:31:01 GMT</pubDate>
            <atom:updated>2019-10-03T13:25:35.132Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to design advanced Google App Maker apps with BigQuery API, Google Groups, Google Data Studio and Cloud SQL</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*wYRsmfsjtBeqrIxz" /></figure><p>My last Medium post raised questions on how to achieve an app like <a href="https://medium.com/@jeremy.dessalinesdorbigny/digitize-mail-parcels-tracking-with-google-app-maker-8f5b10c8f12a?source=your_stories_page---------------------------">this</a>.</p><p>I’d like to take a bit more time here to explain how to design this kind of advanced App Maker apps, and how to make it a success.</p><p>In our company :</p><ul><li>we use BigQuery as our datalake. Basically if you need fresh and reliable data you need to query or fetch data from there.</li><li>we use Google Groups. We have Google Groups for our Business Units for example.</li><li>we use Google Data Studio. <a href="https://medium.com/google-cloud/which-bi-tool-for-big-query-d9eb838ff7ad">We use it as our prefered BI tool</a> — read the post of my colleague Remy David for example — . It can be easily used by both our IT or business teams.</li></ul><p><strong>What does it mean for most of my Google App Maker architecture ?</strong></p><p><strong>0 — Should I deploy this app: as User or as Developer ?</strong></p><p>I always recommend to publish apps as s Developer, as It will not require your end-user any access to their Google account.</p><p>What does it mean ? The account that is used for running code is often referred to as the execution identity. App Maker can use the app user’s account (the default value) or the account of the developer who publishes the app.</p><p>On the other side, it also means that you will not have access to your end-user Drive, Mail or Calendar.</p><p>For more information have a look at this <a href="https://developers.google.com/appmaker/security/identity">page</a></p><p>Usually, I deploy my app is run as developer. So, I will use the developer account credentials to perform all the script. It is the same for the Google BigQuery API.</p><p>Fortunately Google App Maker, as Google Apps Script natively integrate this API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7IGjcS_2XpNSEXjFPzlWvQ.png" /></figure><p><strong>1 — Go to “App Settings” &gt; “Advanced Services” sections &gt; “Add service” &gt; add “BigQuery API”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/0*WrKHN5rocKf27JrW" /></figure><p><strong>2 — Query Big Query</strong></p><p>In order to query a table you can use the sample code <a href="https://developers.google.com/apps-script/advanced/bigquery">available here</a>.</p><p>I have slightly modified it in order to format the JSON and return in on the client side.</p><p>It will be easier to do an advanced search with this formatted JSON:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/99969b5b8393cdc4d1025769bb62b5df/href">https://medium.com/media/99969b5b8393cdc4d1025769bb62b5df/href</a></iframe><p>That way you will have a formatted JSON easier to manipulate on client side. You can store it if you need to use it on multiple functions to perform filters or queries.</p><p><strong>3 — Architecture wrap up</strong></p><ul><li>Use Google BigQuery as the data warehouse for your company data.</li><li>Use Google CloudSQL as the relational database where your app data will be used.</li><li>Use Google App Maker:</li></ul><p>As the UI for your end-user and for your specific use case. Make your app data as light as possible. Store only what you really need. Google App Maker is made to create simple apps. Plus, It will ensure the performance of your apps.</p><p>To secure efficiently (from page level, to field level or with script, …) access to your app data hosted in CloudSQL</p><p>Below, the architecture of the app I present in my previous post:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xCLB8qpqQe2BPwjmnFs34g.png" /><figcaption>Example of App Maker appsarchitecture</figcaption></figure><ul><li>Use Google Groups to define the end-users who will use your apps.</li></ul><p>Tips: Avoid huge nested Groups ! It won’t work properly for now.</p><p><a href="https://developers.google.com/appmaker/security/secure-deployments">Go to the App Maker Guides sections for more information.</a></p><ul><li>Use Google Data Studio for your dashboards, it can be embedded in your apps. It is easy to create and to customize. It can be interconnected to multiple source of data.</li></ul><p><a href="https://youtu.be/hfPrGNO6Frs?t=1595">Cleo and Chris made a presentation at Next on how to integrate DataStudio with App Maker</a></p><p>Use BigQuery API each time you need to retrieve other data for your apps. You do not need to store it in your App Maker app.</p><p>Thank you for reading,</p><p>Feel free to comment, ask questions/feedbacks and thumbs up if you enjoy reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0497390f254" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Digitize Mail & Parcels Tracking with Google App Maker]]></title>
            <link>https://jeremy-dessalinesdorbigny.medium.com/digitize-mail-parcels-tracking-with-google-app-maker-8f5b10c8f12a?source=rss-b6c1a461c737------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f5b10c8f12a</guid>
            <category><![CDATA[google-apps-script]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-cloud]]></category>
            <category><![CDATA[google-app-maker]]></category>
            <dc:creator><![CDATA[Jérémy Dessalines]]></dc:creator>
            <pubDate>Mon, 09 Sep 2019 17:58:52 GMT</pubDate>
            <atom:updated>2019-09-10T06:48:20.826Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5L2XkaTFD7Og_Tpo" /><figcaption>Google App Maker + Card Readers + Chromebooks are awesome</figcaption></figure><p>A few months ago my team was challenged to digitize the work of the General Services Department in our offices. My company is moving toward digitalization to create a digital workplace for its employees. It can be showcase as we provide <a href="https://www.blog.google/products/chrome-enterprise/how-veolia-empowers-its-cloud-workers-to-collaborate-securely-anytime-anywhere/">Chromebooks</a> as the default device for our employees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/0*4j2CBIlsE955wBQ0" /></figure><h3>BEFORE</h3><p>Previously the teams in charge of receiving, storing, transferring and delivering mail and parcels followed their activity on multiple papers and spreadsheets. To acknowledge receipt, a signature was required for the recipients. Different teams are involved in this process: Receptionist, Dock agent, Factotum and Mail Service.</p><p>There was no centralized monitoring of the activities of teams. Reliability was not assured.</p><p>For example, some parcels were received while the recipient was not in our company.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/0*1Vt-RSg6B6e51a-V" /></figure><p>Digitizing this process is meaningful. The scope is limited to a small number of people. But it is their day to day activity. It requires change management and follow-up to change the way our employees work.</p><h3>AFTER</h3><p>To improve the process we created a <a href="https://gsuite.google.fr/intl/fr/products/app-maker/">Google App Maker</a> web-app designed to be used on Chromebooks in tablet mode. Each team has different roles and access to the app.</p><p>To track usage and movements, <a href="https://cloud.google.com/sql/docs/">Cloud SQL</a> stores data in tables: packages, movements/history and anomalies declared by teams.</p><p>In addition the app is linked with the Veolia Directory in order to no longer accept packages or mail from people outside the company.</p><p>In order to track transfer and delivery, we implemented the reading of the access badge of the people who received mails and parcels. Moreover, the use of the badge allows the authentication of the employees. Indeed, some of our service providers do not have a personal email address but an access badge that identifies them. Card reader is connected to Chromebooks. For instance, the transfer of mails and parcels to other team members is tracked by this action.</p><h3>MAIN BENEFITS</h3><p>During the study of the need, we identified SaaS solutions that could meet our needs without success.</p><p>The main benefits of this tailor made solution on Google App Maker are:</p><ul><li>Secure access for end-users via a web-app,</li><li>Allow end-users and team to sign-in / acknowledge actions with their access badge,</li><li>Responsive design for tablets and chromebooks,</li><li>Role based access to the app,</li><li>Built-in integration to our Directory,</li><li>Data stored in Google Cloud Platform,</li><li>Your developers (me) will focus on the outcome and features,</li><li>Cheap running cost (CloudSQL database)</li></ul><h3>FEW TIPS</h3><p><strong>How to connect with your badge reader ?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*xbmlh-RTo1tvfUkh" /></figure><p>In order to retrieve the hexadecimal code of the badge, it’s really easy. A card reader behaves like a keyboard !</p><p>You need to create a widget like a TextArea in your App Maker and add an event onAttach. That’s all !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*B84QWJdIPJsV6j5ZgTmAdw.png" /></figure><p>It will on attach on the page focus on the widget where you will add a custom function to get the hexadecimal values of the badge onInputChange.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/0*WEt-Bx_lFzIlSwm1" /><figcaption>onInputChange function</figcaption></figure><p>Here it will call “readbage” function.</p><p><strong>How to track the history of my mails and parcels ?</strong></p><p>On each time that you want to store movement call a function on server side which will create a record into your History model.</p><p>Link the created record to your data model Mails &amp; Packages.</p><p>That’s it !</p><p>Thank you for reading. Feel free to ask questions or feedbacks to my post.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f5b10c8f12a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Follow the trend of Apps develop in your org with a Dashboard of the default Cloud SQL App Maker Db]]></title>
            <link>https://jeremy-dessalinesdorbigny.medium.com/follow-the-trend-of-apps-develop-in-your-org-with-a-dashboard-of-the-default-cloud-sql-app-maker-db-c3d2dab414a8?source=rss-b6c1a461c737------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3d2dab414a8</guid>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-apps-script]]></category>
            <category><![CDATA[google-data-studio]]></category>
            <dc:creator><![CDATA[Jérémy Dessalines]]></dc:creator>
            <pubDate>Fri, 09 Aug 2019 08:29:25 GMT</pubDate>
            <atom:updated>2019-08-27T14:32:33.951Z</atom:updated>
            <content:encoded><![CDATA[<h3>Follow the trend of Apps develop in your org with a Dashboard of the default Cloud SQL App Maker Instance</h3><p>Monitoring Google App Maker adoption in our Organisation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WiltxF4qqnFJhbmsZ9WNDw.jpeg" /></figure><p>To improve our monitoring of the use of the Google App Maker product within our organization, we have implemented dashboards to track:</p><ul><li>Consumption of GCP projects using App Maker</li><li><a href="https://developers.google.com/admin-sdk/reports/v1/reference/customerUsageReports/get">API G Suite Admin Reports</a> to identify the use of the product at macro level:</li></ul><p>Number of apps active today, number of users on these apps.</p><p>As the summer was a good time to take a step back, I wanted to automate the use of the <a href="https://support.google.com/a/answer/7550053?hl=en">Cloud SQL App Maker instance</a> of our organization.</p><p>This instance is used for projects in development before the production of our internal applications by our community of about 200 Citizen Developers at the group level.</p><p>The idea is simple, I want to know the trends of App Maker projects on this instance.</p><p>A project corresponding to the creation of a new database in this instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tgrbV6HCt0L-fndI" /><figcaption>WIthout data your’re just another person with an opinion.</figcaption></figure><p>For this I realized an <a href="https://developers.google.com/apps-script/">Apps Script</a> project calling the <a href="https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/">Cloud SQL Admin API</a>, a REST API for administering your instances programmatically in order to Lists instances under a given project in alphabetical order by instance name.</p><p>Data will be displayed on a <a href="https://datastudio.google.com/">DataStudio dashboard</a>.</p><p><strong>Configure the Apps Script</strong></p><p>Create a new one.</p><p>For this script, you will need to activate OAuth2.</p><p>To add it to your script, do the following in the Apps Script code editor:</p><ol><li>Click on the menu item “Resources &gt; Libraries…”</li><li>In the “Find a Library” text box, enter the script ID 1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDFand click the “Select” button.</li><li>Choose a version in the dropdown box (usually best to pick the latest version).</li><li>Click the “Save” button.</li></ol><p>For this library (and the Apps Script functionality in general) the URL will always be in the following format:</p><pre><a href="https://script.google.com/macros/d/%7BSCRIPT">https://script.google.com/macros/d/{SCRIPT</a> ID}/usercallback</pre><p>Where {SCRIPT ID} is the ID of the script that is using this library. You can find your script’s ID in the Apps Script code editor by clicking on the menu item “File &gt; Project properties”.</p><p><strong>Save the URL.</strong> We will need this URL to configure our Access to the GCP Instance.</p><p>Once done click on that, go to Resources &gt; Cloud Platform project enter the Project Number of your Cloud SQL default instance. It will link your script to the project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/0*dcSwHxOX-IZou5OI" /></figure><p>Access the related GCP Project. From there, click on the menu in the top left and navigate to “APIs and Services → Dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/0*efyPm7BCt14nIK5C" /></figure><p>Click on Enable APIs and Services and enable the following API:</p><pre>Enable Google Cloud SQL Admin API</pre><p>You will also need to create a Big Query Dataset (if one doesn’t exist).</p><p><strong>OAuth Credentials</strong></p><p>Then we need to create the OAuth credentials. First create the OAuth consent screen. Fill in the Application Name only.</p><p>Then create the OAuth ID and Secret by clicking on Create Credential -&gt; OAuth client ID. Choose Web Application, and give it a name (again, use App Maker app/GCP Project name). We then need to specify the “Authorized redirect URI”.</p><p>We will need the {SCRIPT ID} we previously created:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*pvReY7Nlp6hmcVLSy-j91Q.jpeg" /></figure><p>Copy and add the previously generated URL:</p><pre><a href="https://script.google.com/macros/d/%7BSCRIPT">https://script.google.com/macros/d/{SCRIPT</a> ID}/usercallback</pre><p>It is now setup for Cloud SQL API access.</p><p>We need to configure the scope in our script to access this API. According to the documentation:</p><pre>.setScope(‘https://www.googleapis.com/auth/sqlservice.admin&#39;)</pre><pre>.setScope(‘https://www.googleapis.com/auth/cloud-platform&#39;)</pre><p>Below the script with this scope:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e8723fcabb0086c4304160cf531cdef6/href">https://medium.com/media/e8723fcabb0086c4304160cf531cdef6/href</a></iframe><p><strong>Access to Big Query</strong></p><p>As BigQuery is the data warehouse of Google Cloud. We will use it to store the data retrieved by the Cloud SQL API: The list of Cloud SQL instances.</p><p>To be able to use Big Query in Apps Script you have to activate this service in Apps Script. For this in your script go to Resources&gt; Advanced Google Services and activate BigQuery API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/0*fpo6GTX6CF05jQcm" /></figure><ul><li>Create the Big Query table</li></ul><p>In Big Query and create a table in one of your dataset</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/0*ybSyJu12WwjxhD5s" /></figure><p>You will need to create an empty table with 2 fields:</p><p>“date” and “name”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/0*SbmHyQz_CfAiYnuZ" /></figure><p><strong>Apps Script Function</strong></p><p>Create the function who will use the service to access the API and insert the result into BigQuery.</p><p>Modify the params in the JSON with</p><pre>CLIENT_ID and CLIENT_SECRET we have created before in GCP.</pre><pre>PROJECT name and INSTANCE name of your Cloud SQL instance.</pre><pre>BigQuery PROJECT Id, Dataset Id and Table Id.</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/735682c37795412b864b618d1e750cad/href">https://medium.com/media/735682c37795412b864b618d1e750cad/href</a></iframe><p><strong>Test it</strong></p><p>PManagement() function.</p><p><strong>The result in BQ</strong></p><p>You will find the list of instances and the dates in the BigQuery table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/0*BoRBQWIJRX8fFyfu" /></figure><p><strong>See the number of apps in your org by running</strong></p><p>SELECT date, COUNT(NAME) FROM [YOURTABLE] GROUP BY date ORDER BY date desc</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*jTATB5TOUXaraVZvMSTPOg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/0*RZ7GVnF5M4EXSqrK" /></figure><p><strong>Schedule it</strong></p><p>You can schedule the function to run hourly or daily depending on your needs.</p><p><strong>Dashboard</strong></p><p>Insert the result in a DataStudio to present it nicely</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jIUSzr7ztAtjqnKX8UZUZQ.png" /></figure><p>That’s it !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*4u0igvDwmM0_3pY4" /></figure><p>Thanks you for reading my first Medium post.</p><p>You can find the full code on <a href="https://github.com/g-r3m/GAMDefaultInstanceMonitoring">GitHub</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3d2dab414a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>