<?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 Mathias Wagner on Medium]]></title>
        <description><![CDATA[Stories by Mathias Wagner on Medium]]></description>
        <link>https://medium.com/@mathiasw?source=rss-b5ddc7f82ad3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GtoaWw1Iq_Gta4spi1VneA.jpeg</url>
            <title>Stories by Mathias Wagner on Medium</title>
            <link>https://medium.com/@mathiasw?source=rss-b5ddc7f82ad3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 14:17:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mathiasw/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[Remember to set Google Doc permissions when sending emails in Microsoft Outlook]]></title>
            <link>https://mathiasw.medium.com/remember-to-set-google-doc-permissions-when-sending-emails-in-microsoft-outlook-7b880f2199aa?source=rss-b5ddc7f82ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b880f2199aa</guid>
            <category><![CDATA[google-workspace]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[microsoft-outlook]]></category>
            <dc:creator><![CDATA[Mathias Wagner]]></dc:creator>
            <pubDate>Sat, 14 Nov 2026 20:24:41 GMT</pubDate>
            <atom:updated>2026-11-25T09:37:38.328Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kunbVF2LuUwSw4dhTrbQIw.jpeg" /></figure><p><strong>tl;dr:</strong> If your company uses Microsoft 365 for email and (allows) Google Workspace for documents, Outlook lets you send Google Doc links to people who do not have access to them, without telling you. <br>This post shows how to build a Power Automate flow and a Google Apps Script web app. Those ping you in Microsoft Teams with a pre-filled permissions dialogue right after you send a Google Doc link. Since MS and Google IAM do not work together very well, some ugliness and redundancy remains.</p><p>Gemini / AI was involved in creating this piece.</p><p>If you are interested in more Google Workspace to Microsoft crutches, you might like “<a href="https://medium.com/@mathiasw/automate-your-outlook-calendar-coloring-a363659dd0f3">Automate your Outlook Calendar coloring</a>”.</p><p><strong>Edit November 25, 2026:</strong> Updated the code with some failsafe and usability improvements. Since you cannot actually check access rights out of MS Power Automate, it’s still a pain.</p><h3>Introduction</h3><p>In Gmail, sharing a Google Doc link is simple. You hit Send, and Gmail immediately prompts you if any recipients lack access. In Microsoft Outlook, that check does not exist. You send the email, forget to adjust the document’s sharing settings, and five minutes later you get “Request access” emails.</p><p>I did not build an AI agent for this because it is cheaper and faster to run repeatable, deterministic code than to run an LLM on every outgoing email just to match a URL and extract To and Cc headers.</p><p>Before setting this up, keep three limitations in mind:</p><ul><li>The workflow triggers after sending, not before. Once your email lands in Sent Items, Power Automate detects the Google Doc link and sends you a Microsoft Teams message with a link to a pre-filled permissions dialogue. If you ignore the Teams message, recipients will still see the “Request access” screen.</li><li>The dialogue defaults to Commenter access because that fits my daily work. If you prefer Viewer or Editor as the default, you can change the selected attribute in the Google Apps Script.</li><li>You can only grant one permission level per batch. The dialogue applies the selected role (Viewer, Commenter, or Editor) to all listed recipients at once. If you want different permissions for individual recipients, or want to exclude someone on Cc, you need to edit the recipient list in the dialogue before clicking Grant Access or set permissions manually in Google Docs.</li></ul><h3>Optional: Why intercepting the Outbox does not work</h3><p>Microsoft’s official solution is to build a custom Outlook JavaScript Add-in using the OnMessageSend API and a backend Google OAuth token store. That requires developer effort and Exchange admin approval to sideload manifests, which is too much overhead for a personal fix. I might try that in the future, or wait until you did that and also write about it :D.</p><p>My first idea was to use my 30-second send delay in Outlook. Power Automate would monitor my Outbox, move the email back to Drafts during those 30 seconds if a Google Doc link is present, and prompt me in Teams.</p><p>That failed for two reasons:</p><ol><li>New Outlook and Outlook on the Web keep “Undo Send” emails in local client memory. The message does not reach the Exchange server until the 30-second countdown ends.</li><li>Exchange Online treats the Outbox as a temporary transport queue. Power Automate’s new email trigger never fires on the Outbox folder.</li></ol><p>Triggering on Sent Items works reliably. A few seconds after the email leaves your outbox, Power Automate extracts the Google Doc ID (from both plain-text URLs and HTML hyperlinks), grabs the To and Cc addresses, and posts a message in Teams.</p><h3>Optional: Why Power Automate does not pre-check permissions before pinging Teams</h3><p>After running this for a few days, one annoyance stood out: Power Automate messages you in Teams on some sent Google Doc email, even when every recipient already has access. Not sure why sometimes it triggers and sometimes it doesn&#39;t. My assumption is that it&#39;s based on a mix of viewer and commenter permissions. Which I cannot check from Power Automate…</p><p>To silence those unnecessary pings, we looked at adding a pre-check step before posting to Teams.</p><ol><li>Build a second, read-only Google Apps Script locked to Drive read-only scope and protected by a secret token.</li><li>Have Power Automate call that script via an HTTP action, check who is actually missing access, and only send the Teams message when someone lacks permissions.</li></ol><p>We had to drop that approach for two practical reasons. First, the Power Automate HTTP connector is a Premium action, which not every Microsoft 365 license includes. Second, corporate Google Workspace policies often lock Apps Script deployments to “Anyone within my company”, blocking the “Anyone” setting that Microsoft’s cloud servers would need to call the script without a full Google Cloud OAuth setup.</p><p>The fallback is simpler and requires zero Premium licenses or admin exceptions: keep Power Automate on Standard connectors as a simple notifier, and move the permission filtering into the personal Apps Script web app. When you open the dialogue, it checks current collaborators, hides anyone who already has Commenter, Editor, or Owner rights, and shows an “All set” banner if no one is missing access.</p><h3>Step 1: Deploy the Google Apps Script Permissions Dialogue</h3><p>Google blocks regular Google Docs links from auto-opening or pre-filling the native Share modal via URL parameters. To work around this, we deploy a small web app under your Google account that reads the document ID and recipient emails from the URL and updates permissions.</p><ol><li>Open<a href="https://script.google.com/"> script.google.com</a> with your Google Workspace account and click New project.</li><li>Replace the code in the editor with the Google Apps Script from the download section below. If you want a default other than Commenter, move the word selected to the Viewer or Editor option line in the script.</li><li>In the left sidebar next to Services, click the plus icon, select Drive API, and click Add. Built-in DriveApp groups Viewers and Commenters together, so enabling the Drive API service is needed if you want the script to tell them apart. With it enabled, existing Commenters are filtered out of the recipient box, while Viewers stay in the box and are flagged so you can upgrade them to Commenter in one click. (If you skip this step, the script falls back to DriveApp automatically.)</li><li>Press Cmd + S (or Ctrl + S) to save.</li><li>Click Deploy and then New deployment.</li><li>Click the gear icon next to Select type and choose Web app.</li><li>Set Execute as to Me and Who has access to Only myself.</li><li>Click Deploy, authorize the script (click Advanced, Go to project, and Allow if Google shows an unverified app warning), and copy the Web app URL.</li></ol><p>If you change the code later, do not create a new deployment or the URL will change. Then you’d need to change the URL in the Power Automate package. Instead, go to Deploy, Manage deployments, click the Edit pencil icon, set Version to New version, and click Deploy.</p><h3>Step 2: Prerequisites in Power Automate</h3><p>You need two connections in Power Automate: Office 365 Outlook and Microsoft Teams. If you followed my<a href="https://mathiasw.medium.com/automate-your-outlook-calendar-coloring-a363659dd0f3"> Automate your Outlook Calendar coloring</a> post, you already have the Outlook connection.</p><ol><li>Open <a href="https://make.powerautomate.com/">make.powerautomate.com</a> and go to Connections in the left menu (under More).</li><li>Click New connection in the top left.</li><li>Use the small search box on the upper right to filter connectors. Do not use the big search bar at the top center, as that only searches your flows and returns no results here.</li><li>Create a connection for Office 365 Outlook and another for Microsoft Teams.</li></ol><h3>Step 3: Generate and Import the Power Automate Package</h3><p>To avoid building nested string-splitting expressions by hand in the Power Automate UI, use the Python script at the bottom of this post to generate an importable zip package.</p><ol><li>Copy the Python script from the download section below.</li><li>Paste your Google Apps Script URL from Step 1 into the APPS_SCRIPT_URL variable at the top of the file.</li><li>Run the script in your terminal to generate GoogleDocPermissionChecker.zip.</li><li>In Power Automate, go to My flows, Import, Import Package (Legacy), and upload GoogleDocPermissionChecker.zip.</li><li>On the Review Package Content screen, set the flow resource to Create as new. Click Select during import for both Office 365 Outlook and Microsoft Teams, select your connections, and click Save.</li><li>Click Import.</li></ol><h3>Step 4: Select the Sent Items Folder and Turn On the Flow</h3><p>Exchange Online uses internal mailbox IDs for folders rather than display names, so you must select your Sent Items folder once in the designer:</p><ol><li>Click Open flow after the import finishes. Switch New designer off in the top right if it opens the modern view.</li><li>Click the trigger step (When an email is sent), click the Folder icon on the right of the Folder field, and select Sent Items.</li><li>Click Save.</li><li>Go back to the flow overview page and click Turn on in the top bar.</li></ol><p>Send a test email containing a Google Doc link. A few seconds after it hits Sent Items, the Flow bot will message you in Teams with the recipient list and a button to open the permissions dialogue.</p><h3>Post Mortem: What went wrong along the way</h3><p>So you and your LLM do not repeat the same mistakes we made building this:</p><ul><li>Uploading a generated zip package to Power Automate fails with a generic error unless the workflow definition is wrapped inside a top-level properties object and the connector UUIDs match across manifest.json, apisMap.json, and connectionsMap.json.</li><li>The Outlook new email trigger is a webhook trigger, not a polling trigger. Declaring it as OpenApiConnection fails validation with a missing recurrence error. It must use OpenApiConnectionNotification with a splitOn property.</li><li>A hyperlinked Google Doc without /edit at the end looks like &lt;a href=”https://docs.google.com/document/d/12345&quot;&gt;Link&lt;/a&gt; in the raw email HTML. Splitting only on a forward slash includes the closing quote and tag in the ID. You have to split on forward slashes, quotes, question marks, and spaces.</li><li>Calling DriveApp.addCommenters in a batch fails with an “Invalid argument” error if you email yourself (trying to downgrade the document owner to Commenter), if a recipient is already an Editor, if your Google Workspace admin blocks external sharing, or if the recipient email is an Exchange-only mailbox without a Google account. Looping through recipients one by one, skipping the owner and existing editors, and checking the email domain when catching errors fixes this.</li><li>DriveApp.getViewers() lumps Viewers and Commenters into a single list. If you want to upgrade an existing Viewer to Commenter, you need the Drive Advanced Service (Drive.Permissions.list). In Drive API v3, you also have to pass an explicit fields parameter requesting emailAddress, otherwise Google omits the email addresses from the response.</li><li>Transient Google Drive 500/503 errors or rate limits will break a single-shot API call. Wrapping Drive reads and writes in a small exponential-backoff retry helper recovers from temporary blips while still failing fast on deterministic errors like Invalid argument or Access denied.</li></ul><h3>Code Downloads</h3><p>Please ask an AI of your choice if you do not know how to run the code below in your terminal, or want to adjust it to your needs.</p><ul><li>Python Generator for the Power Automate Package <a href="https://drive.google.com/file/d/1oJ_29MCmFijzEvHycCTAwOPS6P5rNnJy/view?usp=drive_link">create_pa_package.py</a></li><li>Google Apps Script Web App <a href="https://drive.google.com/file/d/1S9ugzolH2DhGJ0R8VwhB9K6Ry2lb-yW0/view?usp=drive_link">google_drive_access_check.js</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b880f2199aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automate your Outlook Calendar coloring]]></title>
            <link>https://mathiasw.medium.com/automate-your-outlook-calendar-coloring-a363659dd0f3?source=rss-b5ddc7f82ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/a363659dd0f3</guid>
            <category><![CDATA[efficient-working]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[microsoft-outlook]]></category>
            <category><![CDATA[calendar]]></category>
            <category><![CDATA[power-automate]]></category>
            <dc:creator><![CDATA[Mathias Wagner]]></dc:creator>
            <pubDate>Sat, 24 Oct 2026 19:39:22 GMT</pubDate>
            <atom:updated>2026-11-14T20:34:49.607Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bLM5ibUOToCyb85474hb7g.png" /></figure><p><strong>tl;dr:</strong> Automatically coloring your Microsoft Outlook calendar by using categories is possible. It’s just much more painful than with Google Calendar. This is a how-to, including code to spare you the hassle. And it is also a rant on how complicated things can be in 2026, if you treat everything like MS did back in the Visual Basic 6 times.</p><p>Gemini / AI was involved in creating this piece.</p><p>If you are interested in more Google Workspace to Microsoft crutches, you might like “<a href="https://mathiasw.medium.com/remember-to-set-google-doc-permissions-when-sending-emails-in-microsoft-outlook-7b880f2199aa">Remember to set Google Doc permissions when sending emails in Microsoft Outlook</a>”.</p><h3>Introduction</h3><p>3 years ago, <a href="https://medium.com/@mathiasw/automate-your-google-calendar-coloring-4e7b15ed5560">I wrote about how I automated my Google Calendar coloring</a> using a small Google Apps Script. It was some fifty lines of clean JavaScript, took 2h (pre-LLM times) to build and set up, and ran quietly in the background for years. And it gained a lot of popularity, even Gemini is quoting from it when you search with Google :D. You might want to browse through it, since it also describes how I use color in my calendar from a former Googler perspective.</p><p>Then I had to switch to Microsoft 365.</p><p>If you have spent 8 years working in Google Workspace and are suddenly forced into the Microsoft ecosystem (again), it feels like having an arm and a leg cut off from a productivity perspective. Everything that used to be a quick script or a keyboard shortcut turns into an expedition through several generations of UI and coding paradigms.</p><p>Still, I wanted my color-coded calendar back. Knowing at a glance whether my week is full of external client calls, internal syncs, travel, or focus blocks is useful. Also knowing the importance and type of a meeting by just looking at color is key to prepare for me. I figured Microsoft must have a cloud scripting equivalent to Google Apps Script by now.</p><p>Spoiler: they don’t. What followed was a multi-hour descent into the madness of Microsoft Power Automate, aided — and at times actively sabotaged — by Gemini. Here is how to get the exact same automated calendar coloring working in Outlook, along with a downloadable package so you can skip the pain I went through.</p><p>This solution wouldn’t have been possible without Gemini 4. No way I would have dug through the technical debt and pain of O365 automation on my own. There might be better options like e.g. invoking scripts hosted on Azure. But I wanted to keep it simple and free for others — especially less technical users — like the solution I built on my own (and improved with Gemini 2y later) for the Google Calendar.</p><p>Also the solution is simply time based (e.g. every 15 minutes) and does not make use of modern update / change triggers. See the post mortem section at the bottom, if you want to understand why.</p><h3>Optional: The AI click-orgy trap (and why you should skip the UI)</h3><p>When I first asked Gemini to port my Google Apps Script to Outlook, it earnestly explained that Microsoft’s browser-based TypeScript environment (Office Scripts) only exists inside Excel. You cannot run a script directly inside Outlook in the cloud.</p><p>Instead, Gemini proposed what I can only describe as a cloud Rube Goldberg machine: create a blank Excel file in OneDrive, paste the TypeScript code into Excel, and then wire up a Power Automate flow that triggers on new calendar events, passes five parameters into the Excel file, reads the result, and patches the event back in Outlook via the Microsoft Graph API.</p><p>And because I didn’t know any better, I followed its step-by-step instructions for clicking this together in the Power Automate web UI.</p><p>Do not do this. If your AI assistant tells you to manually click together a flow in the Power Automate designer, stop immediately and tell it to generate an importable .zip package instead. Power Automate flows are just JSON files under the hood. There is zero reason for a human being to spend an hour hunting for hidden “fx” buttons, fighting two incompatible UI designers (“New designer” vs. “Classic designer”), and copy-pasting formulas into tiny popups that silently mangle your input. It took me way too long to ask Gemini the obvious question: if I can export a flow as JSON, why didn’t you just generate the .zip file in the first place?</p><h3>Optional: Why the code looks like a 1997 Excel formula</h3><p>Once we ditched the Excel file and decided to generate a pure, self-contained Power Automate package, we hit the next absurdity of Microsoft’s tooling.</p><p>In Google Apps Script, you have full JavaScript. You define a clean configuration object with an array of regular expressions, loop through them with .some(), and you are done.</p><p>Power Automate’s expression language has no regular expressions. None. There is no regexMatch(), no .some(), and no .filter() inside an expression. If you want your flow to evaluate 100 calendar events in memory in a fraction of a second — without spinning up an external Azure Function or looping over an Excel spreadsheet for eight minutes — you have to compile your rules into nested if(), or(), contains(), and replace() functions.</p><p>Here is what the actual category evaluation expression inside Power Automate looks like once formatted for human eyes:</p><pre>if(<br>  contains(<br>    replace(<br>      replace(<br>        replace(<br>          replace(<br>            replace(<br>              replace(<br>                replace(<br>                  toLower(string(coalesce(item()?[&#39;attendees&#39;], createArray()))),<br>                  &#39; @ &#39;, &#39; &#39;<br>                ),<br>                &#39;@your-company.de&#39;, &#39;&#39;<br>              ),<br>              &#39;@your-company.com&#39;, &#39;&#39;<br>            ),<br>            &#39;@your-company.it&#39;, &#39;&#39;<br>          ),<br>          &#39;@resource.calendar.google.com&#39;, &#39;&#39;<br>        ),<br>        &#39;@group.calendar.google.com&#39;, &#39;&#39;<br>      ),<br>      &#39;gserviceaccount.com&#39;, &#39;&#39;<br>    ),<br>    &#39;@&#39;<br>  ),<br>  &#39;Client&#39;,<br><br>  if(<br>    or(<br>      contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;dnb&#39;),<br>      contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;blocker&#39;)<br>    ),<br>    &#39;Blocker&#39;,<br><br>    if(<br>      or(<br>        contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;follow up&#39;),<br>        contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;follow-up&#39;),<br>        contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;fup&#39;),<br>        contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;prepare&#39;)<br>      ),<br>      &#39;ToDo&#39;,<br><br>      if(<br>        or(<br>          contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;journey from&#39;),<br>          contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;stay at&#39;),<br>          contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;flight to&#39;),<br>          contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;taxi&#39;),<br>          contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;transfer&#39;),<br>          contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;travel&#39;)<br>        ),<br>        &#39;Travel&#39;,<br><br>        if(<br>          or(<br>            contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;team&#39;),<br>            contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;team_name&#39;),<br>            contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;your_first_name&#39;)<br>          ),<br>          &#39;Internal&#39;,<br><br>          if(<br>            contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;interview&#39;),<br>            &#39;Interview&#39;,<br><br>            if(<br>              or(<br>                contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;training&#39;),<br>                contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;class&#39;),<br>                contains(toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;)), &#39;release demo&#39;)<br>              ),<br>              &#39;Training&#39;,<br>              &#39;&#39;<br>            )<br>          )<br>        )<br>      )<br>    )<br>  )<br>)</pre><h3>Prerequisite: Categories and one connection</h3><p>Unlike Google Calendar, where you set a numeric color ID directly on an event, Outlook uses named Categories. Which I try to abuse for replicating Google Mail labels in Outlook btw.</p><ol><li>In Outlook (Web or desktop), go to Settings -&gt; Accounts -&gt; Categories. Create the categories you want to use for your calendar and assign them colors. The ones I use (<a href="https://mathiasw.medium.com/automate-your-google-calendar-coloring-4e7b15ed5560">same as in Google Calendar</a>) are: Client, Blocker, ToDo, Travel, Internal, Interview, and Training.</li><li>Open Power Automate (make.powerautomate.com), click on Connections in the left menu (sometimes hidden under More), and click New connection. Search for Office 365 Users and sign in with your work account. (Why Office 365 Users instead of Office 365 Outlook? See the post-mortem at the bottom of this article).</li></ol><h3>Option A — Actual Python Code (preferred)</h3><h4>Generate your customized Power Automate package via terminal</h4><p>Since nobody wants to edit nested contains() calls by hand, the cleanest approach is to let a small Python script build the Power Automate .zip package for you.</p><p>You only need to adjust INTERNAL_DOMAINS and RULES at the top of the script below. Run it in your terminal, and it will spit out Outlook_Calendar_Colorizer_Template.zip in your Downloads folder, ready to import.</p><p>If you need to make changes, e.g. adding keywords or changing color categories, I&#39;d advise to do that in the below code. Then rebuild the Power Automate package and set it up from scratch, ditching your current package. It is just too painful doing it in the Power Automate UI (see above: 1977 code).</p><p>Please ask an AI of your choice if you don’t know how to run the below code in your terminal. Or struggle with adjusting the config at the top.</p><pre>python3 - &lt;&lt; &#39;EOF&#39;<br>import zipfile, json, os<br><br># =====================================================================<br># 1. CUSTOMIZE YOUR DOMAINS AND RULES HERE (all lowercase)<br># =====================================================================<br>INTERNAL_DOMAINS = [<br>    &quot;@your-company.com&quot;,<br>    &quot;@your-company.de&quot;,<br>    &quot;@your-company.it&quot;<br>]<br><br>EXTERNAL_CATEGORY = &quot;Client&quot;<br><br># Evaluated top-to-bottom. First match wins if no external guests are present.<br>RULES = [<br>    (&quot;Blocker&quot;,   [&quot;dnb&quot;, &quot;blocker&quot;]),<br>    (&quot;ToDo&quot;,      [&quot;follow up&quot;, &quot;follow-up&quot;, &quot;fup&quot;, &quot;prepare&quot;]),<br>    (&quot;Travel&quot;,    [&quot;journey from&quot;, &quot;stay at&quot;, &quot;flight to&quot;, &quot;taxi&quot;, &quot;transfer&quot;, &quot;travel&quot;]),<br>    (&quot;Internal&quot;,  [&quot;team&quot;, &quot;team_name&quot;, &quot;your_first_name&quot;]),<br>    (&quot;Interview&quot;, [&quot;interview&quot;]),<br>    (&quot;Training&quot;,  [&quot;training&quot;, &quot;class&quot;, &quot;release demo&quot;]),<br>]<br># =====================================================================<br><br>dst = os.path.expanduser(&quot;~/Downloads/Outlook_Calendar_Colorizer_Template.zip&quot;)<br>flow_id = &quot;8c2f4b1a-9d3e-4f5a-8b6c-1e2d3f4a5b6c&quot;<br>api_uuid = &quot;00000000-0000-0000-0000-000000000001&quot;<br>conn_uuid = &quot;1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d&quot;<br><br>def b_or(items):<br>    return items[0] if len(items) == 1 else f&quot;or({items[0]}, {b_or(items[1:])})&quot;<br><br>def b_and(items):<br>    return items[0] if len(items) == 1 else f&quot;and({items[0]}, {b_and(items[1:])})&quot;<br><br>subj = &quot;toLower(coalesce(item()?[&#39;subject&#39;], &#39;&#39;))&quot;<br>c = lambda kw: f&quot;contains({subj}, &#39;{kw.replace(chr(39), chr(39)*2)}&#39;)&quot;<br><br>att_str = &quot;replace(toLower(string(coalesce(item()?[&#39;attendees&#39;], createArray()))), &#39; @ &#39;, &#39; &#39;)&quot;<br>for dom in INTERNAL_DOMAINS + [&quot;@resource.calendar.google.com&quot;, &quot;@group.calendar.google.com&quot;, &quot;gserviceaccount.com&quot;]:<br>    att_str = f&quot;replace({att_str}, &#39;{dom}&#39;, &#39;&#39;)&quot;<br>ext_cond = f&quot;contains({att_str}, &#39;@&#39;)&quot;<br><br>expr = &quot;&#39;&#39;&quot;<br>for cat_name, keywords in reversed(RULES):<br>    cond = b_or([c(kw) for kw in keywords])<br>    expr = f&quot;if({cond}, &#39;{cat_name}&#39;, {expr})&quot;<br>category_expr = f&quot;@{{if({ext_cond}, &#39;{EXTERNAL_CATEGORY}&#39;, {expr})}}&quot;<br><br>where_uncategorized = &quot;@&quot; + b_and([<br>    &quot;not(equals(item()?[&#39;isCancelled&#39;], true))&quot;,<br>    &quot;not(equals(toLower(coalesce(item()?[&#39;responseStatus&#39;]?[&#39;response&#39;], &#39;none&#39;)), &#39;declined&#39;))&quot;,<br>    &quot;empty(coalesce(item()?[&#39;categories&#39;], createArray()))&quot;<br>])<br><br>manifest = {<br>    &quot;schema&quot;: &quot;1.0&quot;,<br>    &quot;details&quot;: {<br>        &quot;displayName&quot;: &quot;Outlook Calendar Colorizer (Batch Sync)&quot;,<br>        &quot;description&quot;: &quot;Batch calendar colorizer for Outlook using Microsoft Graph.&quot;,<br>        &quot;createdTime&quot;: &quot;2026-10-21T16:30:00.0000000Z&quot;,<br>        &quot;packageTelemetryId&quot;: &quot;f4a5b6c7-d8e9-4a0b-9c1d-2e3f4a5b6c7d&quot;,<br>        &quot;creator&quot;: &quot;Calendar Colorizer&quot;,<br>        &quot;sourceEnvironment&quot;: &quot;&quot;<br>    },<br>    &quot;resources&quot;: {<br>        flow_id: {<br>            &quot;type&quot;: &quot;Microsoft.Flow/flows&quot;,<br>            &quot;suggestedCreationType&quot;: &quot;New&quot;,<br>            &quot;creationType&quot;: &quot;Existing, New, Update&quot;,<br>            &quot;details&quot;: {&quot;displayName&quot;: &quot;Outlook Calendar Colorizer (Batch Sync)&quot;},<br>            &quot;configurableBy&quot;: &quot;User&quot;,<br>            &quot;hierarchy&quot;: &quot;Root&quot;,<br>            &quot;dependsOn&quot;: [api_uuid, conn_uuid]<br>        },<br>        api_uuid: {<br>            &quot;id&quot;: &quot;/providers/Microsoft.PowerApps/apis/shared_office365users&quot;,<br>            &quot;name&quot;: &quot;shared_office365users&quot;,<br>            &quot;type&quot;: &quot;Microsoft.PowerApps/apis&quot;,<br>            &quot;suggestedCreationType&quot;: &quot;Existing&quot;,<br>            &quot;details&quot;: {<br>                &quot;displayName&quot;: &quot;Office 365 Users&quot;,<br>                &quot;iconUri&quot;: &quot;https://connectoricons-prod.azureedge.net/releases/v1.0.1664/1.0.1664.3477/office365users/icon.png&quot;<br>            },<br>            &quot;configurableBy&quot;: &quot;System&quot;,<br>            &quot;hierarchy&quot;: &quot;Child&quot;,<br>            &quot;dependsOn&quot;: []<br>        },<br>        conn_uuid: {<br>            &quot;type&quot;: &quot;Microsoft.PowerApps/apis/connections&quot;,<br>            &quot;suggestedCreationType&quot;: &quot;Existing&quot;,<br>            &quot;creationType&quot;: &quot;Existing&quot;,<br>            &quot;details&quot;: {<br>                &quot;displayName&quot;: &quot;Office 365 Users&quot;,<br>                &quot;iconUri&quot;: &quot;https://connectoricons-prod.azureedge.net/releases/v1.0.1664/1.0.1664.3477/office365users/icon.png&quot;<br>            },<br>            &quot;configurableBy&quot;: &quot;User&quot;,<br>            &quot;hierarchy&quot;: &quot;Child&quot;,<br>            &quot;dependsOn&quot;: [api_uuid]<br>        }<br>    }<br>}<br><br>definition = {<br>    &quot;name&quot;: flow_id,<br>    &quot;id&quot;: f&quot;/providers/Microsoft.Flow/flows/{flow_id}&quot;,<br>    &quot;type&quot;: &quot;Microsoft.Flow/flows&quot;,<br>    &quot;properties&quot;: {<br>        &quot;apiId&quot;: &quot;/providers/Microsoft.PowerApps/apis/shared_logicflows&quot;,<br>        &quot;displayName&quot;: &quot;Outlook Calendar Colorizer (Batch Sync)&quot;,<br>        &quot;definition&quot;: {<br>            &quot;$schema&quot;: &quot;https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#&quot;,<br>            &quot;contentVersion&quot;: &quot;1.0.0.0&quot;,<br>            &quot;parameters&quot;: {<br>                &quot;$connections&quot;: {&quot;defaultValue&quot;: {}, &quot;type&quot;: &quot;Object&quot;},<br>                &quot;$authentication&quot;: {&quot;defaultValue&quot;: {}, &quot;type&quot;: &quot;SecureObject&quot;}<br>            },<br>            &quot;triggers&quot;: {<br>                &quot;Recurrence&quot;: {<br>                    &quot;recurrence&quot;: {&quot;frequency&quot;: &quot;Minute&quot;, &quot;interval&quot;: 15},<br>                    &quot;type&quot;: &quot;Recurrence&quot;<br>                }<br>            },<br>            &quot;actions&quot;: {<br>                &quot;Get_calendar_view_via_Graph&quot;: {<br>                    &quot;runAfter&quot;: {},<br>                    &quot;type&quot;: &quot;OpenApiConnection&quot;,<br>                    &quot;inputs&quot;: {<br>                        &quot;host&quot;: {<br>                            &quot;connectionName&quot;: &quot;shared_office365users&quot;,<br>                            &quot;operationId&quot;: &quot;HttpRequest&quot;,<br>                            &quot;apiId&quot;: &quot;/providers/Microsoft.PowerApps/apis/shared_office365users&quot;<br>                        },<br>                        &quot;parameters&quot;: {<br>                            &quot;Uri&quot;: &quot;https://graph.microsoft.com/v1.0/me/calendar/calendarView?startDateTime=@{addDays(utcNow(), -7)}&amp;endDateTime=@{addDays(utcNow(), 48)}&amp;$top=250&amp;$select=id,subject,isCancelled,categories,responseStatus,attendees&quot;,<br>                            &quot;Method&quot;: &quot;GET&quot;,<br>                            &quot;ContentType&quot;: &quot;application/json&quot;<br>                        },<br>                        &quot;authentication&quot;: &quot;@parameters(&#39;$authentication&#39;)&quot;<br>                    }<br>                },<br>                &quot;Filter_uncategorized_events&quot;: {<br>                    &quot;runAfter&quot;: {&quot;Get_calendar_view_via_Graph&quot;: [&quot;Succeeded&quot;]},<br>                    &quot;type&quot;: &quot;Query&quot;,<br>                    &quot;inputs&quot;: {<br>                        &quot;from&quot;: &quot;@body(&#39;Get_calendar_view_via_Graph&#39;)?[&#39;value&#39;]&quot;,<br>                        &quot;where&quot;: where_uncategorized<br>                    }<br>                },<br>                &quot;Select_target_categories&quot;: {<br>                    &quot;runAfter&quot;: {&quot;Filter_uncategorized_events&quot;: [&quot;Succeeded&quot;]},<br>                    &quot;type&quot;: &quot;Select&quot;,<br>                    &quot;inputs&quot;: {<br>                        &quot;from&quot;: &quot;@body(&#39;Filter_uncategorized_events&#39;)&quot;,<br>                        &quot;select&quot;: {<br>                            &quot;id&quot;: &quot;@item()?[&#39;id&#39;]&quot;,<br>                            &quot;subject&quot;: &quot;@item()?[&#39;subject&#39;]&quot;,<br>                            &quot;category&quot;: category_expr<br>                        }<br>                    }<br>                },<br>                &quot;Filter_matched_events&quot;: {<br>                    &quot;runAfter&quot;: {&quot;Select_target_categories&quot;: [&quot;Succeeded&quot;]},<br>                    &quot;type&quot;: &quot;Query&quot;,<br>                    &quot;inputs&quot;: {<br>                        &quot;from&quot;: &quot;@body(&#39;Select_target_categories&#39;)&quot;,<br>                        &quot;where&quot;: &quot;@not(empty(item()?[&#39;category&#39;]))&quot;<br>                    }<br>                },<br>                &quot;Apply_to_each_event_to_colorize&quot;: {<br>                    &quot;foreach&quot;: &quot;@body(&#39;Filter_matched_events&#39;)&quot;,<br>                    &quot;actions&quot;: {<br>                        &quot;Send_an_HTTP_request_to_set_category&quot;: {<br>                            &quot;runAfter&quot;: {},<br>                            &quot;type&quot;: &quot;OpenApiConnection&quot;,<br>                            &quot;inputs&quot;: {<br>                                &quot;host&quot;: {<br>                                    &quot;connectionName&quot;: &quot;shared_office365users&quot;,<br>                                    &quot;operationId&quot;: &quot;HttpRequest&quot;,<br>                                    &quot;apiId&quot;: &quot;/providers/Microsoft.PowerApps/apis/shared_office365users&quot;<br>                                },<br>                                &quot;parameters&quot;: {<br>                                    &quot;Uri&quot;: &quot;https://graph.microsoft.com/v1.0/me/calendar/events/@{items(&#39;Apply_to_each_event_to_colorize&#39;)?[&#39;id&#39;]}&quot;,<br>                                    &quot;Method&quot;: &quot;PATCH&quot;,<br>                                    &quot;Body&quot;: &quot;{\n  \&quot;categories\&quot;: [\n    \&quot;@{items(&#39;Apply_to_each_event_to_colorize&#39;)?[&#39;category&#39;]}\&quot;\n  ]\n}&quot;,<br>                                    &quot;ContentType&quot;: &quot;application/json&quot;<br>                                },<br>                                &quot;authentication&quot;: &quot;@parameters(&#39;$authentication&#39;)&quot;<br>                            }<br>                        }<br>                    },<br>                    &quot;runAfter&quot;: {&quot;Filter_matched_events&quot;: [&quot;Succeeded&quot;]},<br>                    &quot;type&quot;: &quot;Foreach&quot;<br>                }<br>            }<br>        },<br>        &quot;connectionReferences&quot;: {<br>            &quot;shared_office365users&quot;: {<br>                &quot;connectionName&quot;: &quot;&quot;,<br>                &quot;source&quot;: &quot;Invoker&quot;,<br>                &quot;id&quot;: &quot;/providers/Microsoft.PowerApps/apis/shared_office365users&quot;,<br>                &quot;tier&quot;: &quot;NotSpecified&quot;<br>            }<br>        },<br>        &quot;flowFailureAlertSubscribed&quot;: False,<br>        &quot;isManaged&quot;: False<br>    }<br>}<br><br>base_dir = f&quot;Microsoft.Flow/flows/{flow_id}&quot;<br>with zipfile.ZipFile(dst, &quot;w&quot;, zipfile.ZIP_DEFLATED) as zf:<br>    zf.writestr(&quot;manifest.json&quot;, json.dumps(manifest, indent=2))<br>    zf.writestr(&quot;Microsoft.Flow/flows/manifest.json&quot;, json.dumps({&quot;packageSchemaVersion&quot;: &quot;1.0&quot;, &quot;flowAssets&quot;: {&quot;assetPaths&quot;: [flow_id]}}, indent=2))<br>    zf.writestr(f&quot;{base_dir}/definition.json&quot;, json.dumps(definition, indent=2))<br>    zf.writestr(f&quot;{base_dir}/apisMap.json&quot;, json.dumps({&quot;shared_office365users&quot;: api_uuid}, indent=2))<br>    zf.writestr(f&quot;{base_dir}/connectionsMap.json&quot;, json.dumps({&quot;shared_office365users&quot;: conn_uuid}, indent=2))<br><br>print(&quot;Created package at:&quot;, dst)<br>EOF</pre><h3>Option B — Create a prebuilt Power Automate flow</h3><h4>Download the pre-built anonymized .zip directly — Security Warning</h4><p>If you don’t want to run Python and prefer to import the ready-made template zip file and edit the formula inside the Power Automate UI, you can decode the anonymized package directly into your Downloads folder with this one-liner.</p><p>From a security perspective, I’d always advise to use the human readable version above and build it on your own. But you can download the zip below and check the code, too :D. It will be painful to adjust it in Power Automate, though.</p><p>Please ask an AI of your choice if you don’t know how to run the terminal command. And adjust the file path depending on your operating system. Mine is for MacOS.</p><pre>base64 -d &lt;&lt; &#39;EOF&#39; &gt; ~/Downloads/Outlook_Calendar_Colorizer_Template_base.zip<br>UEsDBBQAAAAIAFlvVl2T6NQ2cQIAAFAHAAANAAAAbWFuaWZlc3QuanNvbt1Uy27bMBC85ysIn1og1Nvy49YYadFDkiKxUaBFUVDkSiIiiwRJJXUC/3tJWfIjbVKnvVUHwebO7o5mh/t4gtBA0xKWZDBFg9ALBqfuiIEhvNL27NH+dQdcy4qsLskSHPCqMZUQt2hGKqgZUWgmKqH4Ayj05owYWqKbVU3ftsXacpoqLg0XtcveIGifS7e5uVCoL91oXhfoglMltMgN+qCILL2+IlVADLA53/CJgijFYYCjcB6m0ziYBoEXbJ4vfYok9JYUMIcKlmDU6iNzmXlChllKR5iNYYITEmR4QkOGI4j7EDtoKpRLuyCm5ESjz6SoQfUALRpF4by+40rUS6iNgw5sbN2qqmAD2NN1TKM8yUKCJywGnORDgse2Jw4hYj2BLdrizUq2H7zVxXtfiXs/ty/dsXA8mqIAbfWZOcZW9XmXdgn3OxR9Ejz/wbWxop8iCztFC8msxDv4U0/8iy+6AusdF1HnvGgUySo4W7lSC73V1cZLDoooWrahayHMPi9pe+krZ62vO2bd+AP8m1f3hNsiFh+SKItpwvAQ0twaYZThMZ0wHECYRyTOEjpkPe9vJ3vsj+u0N0PeGs+XStxxBkr7u2F+Eveg3kmpfSK59nVJFLDvIs85hTgdNlaTvTHXnep/gP3qmcM2R/imt8Yr3dASQpYRWhxQciLYiS8Ud7DSGKmnvm9PaqD2grmYxlYf5pGHRgGwArwajK/s3SUatH9nN5UXpmni9z+8OBmN/EMJfFfIk5b2EX67WdkPXz7juFnJK/aM5Q7NcJSNXrzQTzzQqWKH8XeDeu6W/8ejfGF1vDTIV+6Ow13glvzJ+idQSwMEFAAAAAgAWW9WXRJ6WulvAAAAgQAAACIAAABNaWNyb3NvZnQuRmxvdy9mbG93cy9tYW5pZmVzdC5qc29uq+ZSUFAqSEzOTkxPDU7OSM1NDEstKs7Mz1OyUlAy1DNQ0gEpSMvJL3csLk4tKQYKVwNFgGKJIH5AYkkGSCwaLAYUtUg2SjNJMkzUtUwxTtU1STNN1LVIMkvWNUw1SjFOM0k0BXKUwIpjgWQtVy0AUEsDBBQAAAAIAFlvVl3h6OrY/AUAAHYYAABJAAAATWljcm9zb2Z0LkZsb3cvZmxvd3MvOGMyZjRiMWEtOWQzZS00ZjVhLThiNmMtMWUyZDNmNGE1YjZjL2RlZmluaXRpb24uanNvbs1YbXPaOBD+nl/h8WVqmAGcpEmv15lOSeklzUzfrnD90mQYIa9BrZF8kkzOyfDfb2Ub/ApJoB+OZEikfdFq99n1ru8PLMvmZA72K8t+SU/808kx6f7hPYfuqX9Gui8nL2j3GE685/4pOcOF3TESzDP8bijFgnkglfuRUSmU8HXvIhC3ro9fyn28Ph2HiQVNalIOPCoEqRko5LvHHdwjIbvabMgXcQvyPAyVi3zKVTMiwRsHYsporhe1eEyFAYk/ZU74HOlAiJ/WgATAPSKtgQiEZHcgrdZbounMGsacttfS4DPONBN8bRfuHio6gzkx+mZah+qV66Y7vTnhZApz4LpH7iIJPSrmjeZ/MIZmUso9OTp+0T3C32P3Vsif5gL5yb0fSvDfMovwdCq4xgO+ocLULvu4d2R+cpaQSLyvRo6C2cZwlOVAjdYyJb0qiQL9jQSR8dT9slOkrkL4efID5e01qcBlH5JIz9AyRknFY084YAgU/VY75qBynK0lm05rF/xqpCVwCtXT5SYK0nwJ/0RIilOQ8kiD3SmzMPS5XJAAOY7PCqTmSxTM2HIF0hAI+xL0mGbgHC8Y3OIXGV9KEs5qV4r4uY9mbYlWCPw8ZIN11EvXwkuFka4CAfdnQunaboq8TM8qnbK0E77PKDx/cRYpE5JOVdAkd4KJNKHfY9J8NS7HY2q8u6R95fySymUlkhtyI6P+LVkxrafG7735+niTzgtMN3cO7ipK63++YbTeKE2kfkc0jNgcXvfviee9I7FqRZp+Eretdsfq/t5ePkOBrUynL5HpUIvw9cnZ0bNDBQE6/jXzOipKUqPD1IAgvoIAvA7mG0yxioHqSFAhYgqGmuhIdYjGUuEBNMTkI+iZSBx9+eeoTh6kVWaUIYmEYZDltWvq0XYf1wqB3c/d3nIqhcJpF7UtG2vLBQtQdhzx1V3vMOywQCW1QlZMi7JZ23Pre9UFw4hSAA+88mVvHkz/vyKQ8eNSzZdinvhnIry45Wyx0Gm/+e4sTPF0bqrV6XYGMjm5T7jX4kK3MLtIoFpMw7xlBAtwcW46lpYRtBFmFXYtPpj8alGBNigKuXwZV85NYcvoc7jg4BiNjgc0YByPMSuYhzpuUJcj1khTCbg+l5LErbb5PIyHYZIQY0y2aeKylbrHg2E7on4dGFJLd0LDFhOddhUDaYloqmlpO9fPseDVEGTk08JSZs02m/gzm5JnZv+e+S3TlxDGVUsCdlwY7af+XaFP4bOdTxtQs65mTaBB6Fl9yzF/HLPoxyKSXSzYIeGxKdyG1EDxYAOB6ZyAWEcSxX4uS87eVIhpAGW9UymicCvLFJ9PC3xUEUpFxHVZPPkeBAzji5voUSFzp25OzXWMEkVJCvKJ0bWT7CQQ9CfIdPE2W+xljS8C7GetKDQ27aeku6eSVHwn2RBRir2Gk0FtJN6J/dzyAwHFIbZMzu9zKWw4YovovfwSsOlMW1rso0STf9le8pJw5Rvk7RghVLCAIAlQGqJ0vVeQNJC9gmPkx2YA3/lWpiSNfSaVzvQku1dmHOEku91OitOJBlsMZ60wWe3nL4kiWLz38RkNiFI7+0viY5AosDyYC2cNhNSolCn5LCsN7GMb0Ll5R7BD67mlX/k/9J2bzKu3GXmrmfSNSX9Xbeti5+YxPRyOcUE81mKMj8NZ6lGzotkbmapzfSENY70/KsekYnLjlJ2FhHtjwsfvR6MvY5mOo+Z8lXsgbmqnNo7dpVhsH723xSahbRjBE9quY3gi/IRRPHXfLx7HzafmtYfG8oRjl9E8hYSL/SlCFCfPByDnrNrjZbMz8pn5y/lo8L6Z6S1i07DcX3PLurbzZLo2yW42zfaTTMrzanltGw0313yDiU+a2zcFY5/5PdG5ubiWcvPB6axWbn9dsbzIykn9Bd1BQaiQbF8BuxPzTq+I0A2pV3qlV8/XQujsdLAwu1d8IbDbLhK3vIl/VOoVVGmW+Nn+JPQwBMp8lvusfGXz+vmCsCCScB6A1MNooqhkEzDG+CRQkDEy9TF5373ePzCqlv8BUEsDBBQAAAAIAFlvVl1fBLxzKwAAAEUAAABGAAAATWljcm9zb2Z0LkZsb3cvZmxvd3MvOGMyZjRiMWEtOWQzZS00ZjVhLThiNmMtMWUyZDNmNGE1YjZjL2FwaXNNYXAuanNvbqvmUlBQKs5ILEpNic9PS8tMTjU2My0tTi0qVrJSUDKAAl0sBBQYKnHVAgBQSwMEFAAAAAgAWW9WXSFL+OJGAAAARQAAAE0AAABNaWNyb3NvZnQuRmxvdy9mbG93cy84YzJmNGIxYS05ZDNlLTRmNWEtOGI2Yy0xZTJkM2Y0YTViNmMvY29ubmVjdGlvbnNNYXAuanNvbgXBSQqAMAwAwHtfUXIP2NXlMyXNgp6EFk/i3515nfcwTxoq7Ta7WFMtz9Qx4fAQKPbEWbBoNcy0dtx4F1w0WKTUMxcB9/1QSwECFAMUAAAACABZb1Zdk+jUNnECAABQBwAADQAAAAAAAAAAAAAAgAEAAAAAbWFuaWZlc3QuanNvblBLAQIUAxQAAAAIAFlvVl0SelrpbwAAAIEAAAAiAAAAAAAAAAAAAACAAZwCAABNaWNyb3NvZnQuRmxvdy9mbG93cy9tYW5pZmVzdC5qc29uUEsBAhQDFAAAAAgAWW9WXeHo6tj8BQAAdhgAAEkAAAAAAAAAAAAAAIABSwMAAE1pY3Jvc29mdC5GbG93L2Zsb3dzLzhjMmY0YjFhLTlkM2UtNGY1YS04YjZjLTFlMmQzZjRhNWI2Yy9kZWZpbml0aW9uLmpzb25QSwECFAMUAAAACABZb1ZdXwS8cysAAABFAAAARgAAAAAAAAAAAAAAgAGuCQAATWljcm9zb2Z0LkZsb3cvZmxvd3MvOGMyZjRiMWEtOWQzZS00ZjVhLThiNmMtMWUyZDNmNGE1YjZjL2FwaXNNYXAuanNvblBLAQIUAxQAAAAIAFlvVl0hS/jiRgAAAEUAAABNAAAAAAAAAAAAAACAAT0KAABNaWNyb3NvZnQuRmxvdy9mbG93cy84YzJmNGIxYS05ZDNlLTRmNWEtOGI2Yy0xZTJkM2Y0YTViNmMvY29ubmVjdGlvbnNNYXAuanNvblBLBQYAAAAABQAFAPEBAADuCgAAAAA=<br>EOF</pre><h3>Option C — Revert back to Google Apps Script</h3><h4>And trigger and run the code based on a neat Java Script piece</h4><p>There is an additional option, I seriously considered — but waived for now. I want to see what the MS ecosystem is (not) capable of :D.</p><p>BUT you can actually revert back to a clean and easy Google Apps Script, from where you apply the HTTP PATCH operations to your Outlook Calendar.</p><p>To not violate data privacy / secrecy, the Google Workspace account should be yours, from your company respectively. In a nutshell you:</p><ol><li>Register a personal developer app in the MS Azure Portal.</li><li>Add the delegated permission Calendars.ReadWrite and generate a Client Secret.</li><li>In your Google Apps Script (<a href="https://medium.com/@mathiasw/automate-your-google-calendar-coloring-4e7b15ed5560">see my previous post</a> to check out the code), use the standard apps-script-oauth2 library to handle the OAuth2 handshake and automatically maintain a fresh refresh token — without having to login every day.</li></ol><p>This keeps your code clean and easy to maintain / update and does not trigger the Outlook &quot;meeting upated&quot; behaviour (which would spam your invitees). The only downside is, that it will also run in a batch mode, since you won&#39;t have Outlook calendar update triggers (which don’t work anyways — see the post mortem section).</p><h3>Importing and turning on the flow</h3><ol><li>Make sure you followed the 2-step &quot;Prerequisites&quot; section above.</li><li>In Power Automate, go to My flows -&gt; Import -&gt; Import Package (Legacy) and upload the .zip file.</li><li>Under Review Package Content, click “Select during import” next to Office 365 Users, pick your connection, hit Save, and click Import.</li><li>Once imported, click “Open flow”. If you used Option B, click on the Select_target_categories step, click the category expression, and replace @your-company.com with your actual domain.</li><li>Now comes my favorite Microsoft UX moment: if you click “Test” in the top right corner, Power Automate will inform you with an error banner that the flow cannot be tested because it is currently turned off. Naturally, putting a “Turn on” button inside that banner would be far too convenient. Instead, you have to leave the editor, go back to the Flow Details overview page, click “Turn on” in the top bar, and open the editor again to run your first test.</li></ol><p>It took way more nerves than a simple calendar script ever should, but at least my calendar finally looks like my calendar again. I hope it helps you, too and this little write up can save you some trouble.</p><h3>Post Mortem</h3><h4>What went wrong along the way, so you and your LLM don’t have to make the same mistakes</h4><p>If you are wondering why this flow is built as a 15-minute batch job using the Office 365 Users connector rather than a real-time Outlook trigger, here is the trail of wreckage Gemini and I left behind getting there. Side note: I personally use a 3 minute trigger, desperately missing the snappy &lt; 10 second updates from Google Calendar. Execution time is ± 4 seconds, so let&#39;s see if this will trigger some limits.</p><ol><li>You cannot use a low-footprint event trigger in Outlook. In Google Workspace, you use an onEventUpdated trigger with a syncToken. When we tried the equivalent in Power Automate (“When an event is added, updated or deleted V3”), saving the flow threw a 502 BadGateway error. Digging into the raw JSON response revealed an unhandled HTTP 500 exception from Microsoft’s North Europe Azure server (office365-ne.azconn-ne-002.p.azurewebsites.net): An error occurred when trying to create a controller of type ‘EventSubscriptionController’. Make sure that the controller has a parameterless public constructor. Worse, Azure sets a sticky ARRAffinity cookie and caches the error (x-ms-apihub-cached-response: true), pinning you to the broken server node. And even when webhook subscriptions do register, strict corporate OAuth policies and MFA renewals invalidate the background connection every few days, killing your automation until you manually fix the connection. A scheduled Recurrence trigger has no webhook subscription to break and heals itself on the next run.</li><li>You cannot use the standard “Update event” action in Power Automate. If you use the built-in Outlook “Update event” block to add a category color to a meeting you organized, Exchange treats it as a meeting modification and sends update emails to every single participant. The only way to colorize an event silently is to send a PATCH request with just the categories array to the Microsoft Graph API.</li><li>The Office 365 Outlook connector’s HTTP action is broken for oauthDelegated connections. When we finally imported the flow using the Office 365 Outlook connector’s “Send an HTTP request” action (HttpRequest), the run failed immediately with Unexpected connection parameter set name: ‘oauthDelegated’. Microsoft migrated standard user connections to the oauthDelegated parameter set, but apparently forgot to tell the C# controller behind Office 365 Outlook -&gt; Send an HTTP request. Routing the exact same Graph calls through the Office 365 Users connector’s “Send an HTTP request” action bypasses the broken controller completely.</li><li>Microsoft whitelists the second URL segment on Graph requests. Even though /v1.0/me/calendarView is the standard Microsoft Graph endpoint, the connector only allows specific words as the second URL segment (messages, mailFolders, events, calendar, calendars, outlook). You have to call /v1.0/me/calendar/calendarView and /v1.0/me/calendar/events/{id} or the connector rejects the URL.</li><li>Never put an Excel Office Script inside a Power Automate loop. When you reference a field from “Get calendar view” inside “Run script”, Power Automate automatically wraps the script call in a “For each” loop. Because every call to an Excel Office Script has a 3-to-5-second startup overhead, looping over 100 calendar events takes over eight minutes. Evaluating everything in memory with native Filter array and Select actions takes less than a second.</li><li>The Power Automate UI glues formulas onto default strings. When we initially tested the Excel script, it had a default parameter existingCategoriesJson: string = “[]”. When you click the fx button in Power Automate to insert a dynamic expression into that field, the UI does not replace the default [] text — it silently appends your formula right after it, sending [][] into the script and making skipCheck() think every event already has a category.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a363659dd0f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automate Your Google Calendar Coloring]]></title>
            <link>https://mathiasw.medium.com/automate-your-google-calendar-coloring-4e7b15ed5560?source=rss-b5ddc7f82ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e7b15ed5560</guid>
            <category><![CDATA[google-app-script]]></category>
            <category><![CDATA[calendar]]></category>
            <category><![CDATA[google-workspace]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Mathias Wagner]]></dc:creator>
            <pubDate>Wed, 13 Dec 2023 15:22:15 GMT</pubDate>
            <atom:updated>2026-10-24T19:43:42.180Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Tl;dr: </strong>Using colors to visually cluster your calendar events is a great productivity hack. I’ll briefly explain my personal system of adding context to a calendar developed during my time at Google. Then I will give you a little piece of code, to automate the colorization of your Google Workspace calendar.</p><p><strong>Edit May 5, 2026:</strong> Did a v2 with some help of Gemini. Key changes are the introduction of the Google Calendar API token capability (performance!) and bundling of variables at the very beginning (tidying). New code at the very bottom.</p><p><strong>Edit October 24, 2026: </strong>Changed jobs, have to use Microsoft again. Fun. Therefore I created this writeup of my attempt to <a href="https://mathiasw.medium.com/automate-your-outlook-calendar-coloring-a363659dd0f3">replicate the below Google Calendar colorization magic to Microsoft Outlook Calendar</a>. It works, but it’s not pretty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JPXoUSTJm8qMLhhr" /><figcaption>From blue to context with color: what we want to achieve.</figcaption></figure><h3>How I use colors in my calendar</h3><p>I started using colors in my calendar already in Outlook, quite some time ago. In Google calendar it basically works the same way, with an important addition (not sure if Outlook has a similar view nowadays). The <a href="https://workspaceupdates.googleblog.com/2022/08/color-categorization-time-insights-google-calendar.html">time insights feature</a> does not only tell you with whom you meet most often or if you do more 1:1s vs. multi-person meetings. It also tells you how much time you spend per week based on event colors.</p><p>Knowing that I spent 10.3h on travel a week and have been with customers 8.5h can be valuable for my time management and prioritization. I use nine labels with a dedicated color to organize myself.</p><p>There are many ways of organizing your calendar. Mine is just one, which should inspire you to develop yours.</p><p>You can label the available 10 colors (+1 default color) in any way you find useful. For me the labels are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/0*Sb46INIi_STSb9TC" /></figure><ul><li>Client — for any meeting with a customer or partner</li><li>Internal — for meetings with internal colleagues only, which are not matching a label below (e.g. Event)</li><li>Travel — for time I spend on trains or planes</li><li>Blocker — for slots I am not available (e.g. a dentist appointment)</li><li>OoO — for absences (mine or colleagues)</li><li>Training — for well… trainings</li><li>Interview — for anything recruiting related</li><li>Event — for all hands, business dinners or a party</li><li>ToDo — for things I need to get done requiring time</li></ul><h3>Using Google App Script to automate colorizing your calendar</h3><p>Now to the fun part 😀. In my previous job at Google somebody wrote an internal browser extension to set event colors based on predefined event titles and also allowed some Regex shenanigans. As I couldn’t find anything useful or trustworthy in the public Chrome extension store, I did some coding on my own. This replicates all the functionality — on Google App Script level, not as a browser extension — and adds detection of external participants on top. Yes, I know that there is no error or exception handling. It just works ;).</p><p>My coding skills and time do not allow me to make a fully fledged extension out of this. But if you know how to create a Google App Script and schedule automatic execution, you are good to go. I give some hints, too.</p><h3>Deployment and Automation</h3><p>Google App Script makes it easy to create and deploy a script. Predefined triggers, like “calendar update” do exist and are perfect for our use case. Time bound triggering is also possible, but would be a waste of compute resources most of the time. Also, a user would expect a color change in a matter of seconds after creating or getting a new invite instead of e.g. once per hour.</p><p>This is a very brief overview of how to make it happen. If you struggle, please refer to the <a href="https://www.google.com/script/start/">official documentation</a>. Please find a screenshot for each of the below 4 steps at the very end of this article.</p><ol><li>Copy the below code or use <a href="https://drive.google.com/file/d/1LKvoSYsMYsOCHU3KJE8haicgL2MQf_kY/view?usp=sharing">my shared file</a></li><li>Put it in a new Google App Script project</li><li>Make adjustments as needed 😀</li><li>Deploy it and assign a trigger</li></ol><h3>The Code</h3><p>I commented on the code. So, read it if you are interested in how it works 😀.</p><pre>/* Written by Mathias Wagner www.linkedin.com/in/mathias-wagner */<br>/* Refactored in May 2026 for Advanced Calendar API (v3) Incremental Sync with Google Gemini */<br><br>// Global debug setting<br>// true: print info for every event<br>// false: print info for only newly colorized event<br>const DEBUG = false;<br><br>// helps you to get auto colorizing mistakes fixed. Beware as this being &quot;true&quot;<br>// overrides any overirdes you did to a color (see comment for function skipCheck() below)<br>// This also deletes any existing token to make sure to catch every event.<br>const IGNORE_SKIPPING = false;<br><br>// --- CONFIGURATION ---<br>const CONFIG = {<br>  // Timeframe to check for the INITIAL sync (in days)<br>  pastDays: 7, <br>  futureDays: 48, // doubled this to 48, since we now have the token mechanism pulling only changes<br>  <br>  // Configuration for keywords (regex) and their corresponding colors<br>  // Order matters for performance! Evaluated top-to-bottom. First match wins.<br><br>  rules: [<br>    {<br>      name: &quot;blocker&quot;,<br>      keywords: [/dnb/, /blocker/],<br>      color: CalendarApp.EventColor.YELLOW<br>    },<br>    {<br>      name: &quot;to do&quot;,<br>      keywords: [/follow up/, /follow-up/, /fup/, /prepare/],<br>      color: CalendarApp.EventColor.MAUVE<br>    },<br>    {<br>      name: &quot;travel&quot;,<br>      keywords: [/journey from/, /stay at/, /flight to/, /taxi/, /transfer/, /travel/],<br>      color: CalendarApp.EventColor.GREEN<br>    },<br>    {<br>      name: &quot;internal stuff&quot;,<br>      keywords: [/team/, /team_name/, /mathias/],<br>      color: CalendarApp.EventColor.BLUE<br>    },<br>    {<br>      name: &quot;interview stuff&quot;,<br>      keywords: [/interview/],<br>      color: CalendarApp.EventColor.PALE_RED<br>    },<br>    {<br>      name: &quot;training&quot;,<br>      keywords: [/training/, /class/, /&#39;some thing&#39; release demo/],<br>      color: CalendarApp.EventColor.ORANGE<br>    }<br>  ]<br>};<br>// ---------------------<br><br>/* Entry for the whole colorizing magic.<br>Select this function when deploying it and assigning a trigger function.<br>*/<br>function colorizeCalendar() {<br>  const calendarId = &#39;primary&#39;; // Targets your default calendar<br>  <br>  // Extracting the domain of your email using your default calendar ID (which is your email)<br>  const userEmail = CalendarApp.getDefaultCalendar().getId();<br>  const myOrg = userEmail.split(&quot;@&quot;)[1];<br>  <br>  if (DEBUG) {<br>    console.log(&quot;Calendar default org: &quot; + myOrg);<br>  }<br><br>  // Set up Properties Service to store and retrieve the syncToken<br>  const properties = PropertiesService.getUserProperties();<br>  const syncToken = properties.getProperty(&#39;syncToken&#39;);<br>  <br>  let options = {<br>    maxResults: 2500 // Max allowed per page<br>  };<br>  <br>  // If we have a token, use it for an incremental sync. <br>  // If not, fall back to the initial date-based sync.<br>  if (syncToken &amp;&amp; !IGNORE_SKIPPING) {<br>    options.syncToken = syncToken;<br>    if (DEBUG) console.log(&quot;Running incremental sync using syncToken.&quot;);<br>  } else {<br>    if (DEBUG) console.log(&quot;No syncToken found. Running full initial sync.&quot;);<br>    const now = new Date();<br>    const past = new Date(now.setDate(now.getDate() - CONFIG.pastDays));<br>    const today = new Date();<br>    const future = new Date(today.setDate(today.getDate() + CONFIG.futureDays));<br>    <br>    options.timeMin = past.toISOString();<br>    options.timeMax = future.toISOString();<br>  }<br><br>  try {<br>    let pageToken;<br>    do {<br>      options.pageToken = pageToken;<br>      <br>      // Call the Advanced Calendar API<br>      const response = Calendar.Events.list(calendarId, options); <br>      const events = response.items;<br>      <br>      if (events &amp;&amp; events.length &gt; 0) {<br>        for (let i = 0; i &lt; events.length; i++) {<br>          const event = events[i];<br>          <br>          // Skip events that were deleted/cancelled from the calendar<br>          if (event.status === &#39;cancelled&#39;) continue;<br>          <br>          // When using syncToken, API ignores time limits. We must manually filter dates.<br>          const eventStartStr = event.start ? (event.start.dateTime || event.start.date) : null;<br>          if (eventStartStr) {<br>            const eventStart = new Date(eventStartStr);<br>            const pastLimit = new Date();<br>            pastLimit.setDate(pastLimit.getDate() - CONFIG.pastDays);<br>            const futureLimit = new Date();<br>            futureLimit.setDate(futureLimit.getDate() + CONFIG.futureDays);<br><br>            if (eventStart &lt; pastLimit || eventStart &gt; futureLimit) {<br>              continue; // Skip if it falls outside our configured x-day window (see at the very top)<br>            }<br>          }<br><br>          // Skip for better performance, else go to colorizing below<br>          if (skipCheck(event)) {<br>            continue;<br>          }<br>          <br>          colorizeByRegex(event, myOrg, calendarId);<br>        }<br>      } else {<br>        if (DEBUG) console.log(&quot;No new or changed events found.&quot;);<br>      }<br>      <br>      pageToken = response.nextPageToken;<br>      <br>      // If a new syncToken is provided, save it for the next execution<br>      if (response.nextSyncToken) {<br>        properties.setProperty(&#39;syncToken&#39;, response.nextSyncToken);<br>      }<br>      <br>    } while (pageToken);<br>    <br>  } catch (e) {<br>    // If a syncToken expires or becomes invalid, Google throws an error.<br>    // We catch it, delete the bad token, and immediately re-run a full sync.<br>    if (e.message.includes(&quot;Sync token is no longer valid&quot;)) {<br>      console.warn(&quot;Sync token expired. Clearing token and re-running full sync.&quot;);<br>      properties.deleteProperty(&#39;syncToken&#39;);<br>      colorizeCalendar(); <br>    } else {<br>      console.error(&quot;API Error: &quot; + e.message);<br>    }<br>  }<br>}<br><br>/* Performance tweak: skip all events that do no longer have the DEFAULT color,<br>or have been declined already. This helps you in case you want to &quot;override&quot; the<br>automation. Let&#39;s say you want an internal meeting to be RED (which you use for <br>extenral meetings only) because your CEO is in it :D.<br>BUT in case you messed up during testing and have a lot of events automatically colored<br>&quot;wrong&quot;, you want to skip the skipCheck() function once to get it back in order (see <br>config at the top).<br>NB: Advanced API returns raw JSON objects, not CalendarApp objects.<br>@param {Object} event JSON representation of the event<br>*/<br>function skipCheck(event) {<br>  // 1. ALWAYS skip declined events, even if IGNORE_SKIPPING is true<br>  let myStatus = &quot;needsAction&quot;;<br>  if (event.attendees) {<br>    for (let att of event.attendees) {<br>      if (att.self) {<br>        myStatus = att.responseStatus;<br>        break;<br>      }<br>    }<br>  }<br>  <br>  if (myStatus === &quot;declined&quot;) {<br>    if (DEBUG) console.log(&quot;Skipping declined event: &quot; + (event.summary || &quot;(No Title)&quot;));<br>    return true;<br>  }<br><br>  // 2. Only skip already-colored events if we are NOT overriding<br>  if (!IGNORE_SKIPPING) {<br>    if (event.colorId) {<br>      if (DEBUG) console.log(&quot;Skipping already colored event: &quot; + (event.summary || &quot;(No Title)&quot;));<br>      return true;<br>    }<br>  } else {<br>    if (DEBUG) console.log(&quot;Attention! Overriding skip check. Evaluating already colored events.&quot;);<br>  }<br>  <br>  return false;<br>}<br><br>/* Actual colorizing of events based on Regex matching.<br>@param {Object} event<br>@param {String} myOrg<br>@param {String} calendarId<br>*/<br>function colorizeByRegex(event, myOrg, calendarId) {<br>  // Fallback to empty string if summary (title) is missing<br>  const eventTitle = (event.summary || &quot;&quot;).toLowerCase();<br>  <br>  let matchedRule = null;<br>  for (let rule of CONFIG.rules) {<br>    if (rule.keywords.some(regex =&gt; regex.test(eventTitle))) {<br>      matchedRule = rule;<br>      break;<br>    }<br>  }<br><br>  // checking for external events first, to make sure those are colored as EXTERNAL<br>  if (checkForExternal(event, myOrg)) {<br>    console.log(&quot;Colorizing external event found: &quot; + eventTitle);<br>    setColorSafely(event, CalendarApp.EventColor.RED, calendarId);<br>    return;<br>  }<br><br>  if (matchedRule) {<br>    console.log(`Colorizing ${matchedRule.name} found: ` + eventTitle);<br>    setColorSafely(event, matchedRule.color, calendarId);<br>    return;<br>  }<br><br>  if (DEBUG) console.log(&quot;No matching rule for: &quot; + eventTitle);<br>}<br><br>/* Safely attempts to change the event color using the Advanced API (patch).<br>Wraps the write operation in a try/catch block.<br>@param {Object} event<br>@param {String/Number} newColor<br>@param {String} calendarId<br>*/<br>function setColorSafely(event, newColor, calendarId) {<br>  try {<br>    // The patch method updates ONLY the specified fields, saving API bandwidth<br>    Calendar.Events.patch({ colorId: String(newColor) }, calendarId, event.id);<br>  } catch (e) {<br>    console.warn(`Could not change color for event: &quot;${event.summary || event.id}&quot;. You may not have edit permissions. Error: ${e.message}`);<br>  }<br>}<br><br>/* Check participants for external domain other than myOrg. <br>The Advanced API exposes all guests in an attendees array.<br>@param {Object} event<br>@param {String} myOrg<br>*/<br>function checkForExternal(event, myOrg) {<br>  if (!event.attendees) return false;<br>  <br>  for (let guest of event.attendees) {<br>    if (guest.email &amp;&amp; guest.email.includes(&quot;@&quot;)) {<br>      const domain = guest.email.split(&quot;@&quot;)[1];<br>      <br>      // Filter out room resources and internal service accounts<br>      if (domain !== myOrg &amp;&amp; !domain.includes(&quot;calendar.google.com&quot;) &amp;&amp; !domain.includes(&quot;gserviceaccount.com&quot;)) {<br>        if (DEBUG) {<br>          console.log(&quot;External domain found: &quot; + domain + &quot; in &quot; + (event.summary || &quot;(No Title)&quot;));<br>        }<br>        return true;<br>      }<br>    }<br>  }<br>  return false;<br>}</pre><h3>Screenshots for creating and deploying above script</h3><ol><li>Copy the below code or use <a href="https://drive.google.com/file/d/1LKvoSYsMYsOCHU3KJE8haicgL2MQf_kY/view?usp=sharing">my shared file</a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/0*i0vhA1e2KLjxepem" /></figure><p>2. Put it in a new Google App Script project</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*5OmOdQd2CWxTOIE7" /></figure><p>3. Make adjustments as needed 😀</p><p>4. Deploy it and assign a trigger</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/0*SqatNgu0SPgFklgd" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/0*cFGC0_HrUNdmDNRT" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e7b15ed5560" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Buying (and Selling) Cloud Is Not (Yet) a Transactional Activity]]></title>
            <link>https://medium.com/swlh/buying-and-selling-cloud-is-not-yet-a-transactional-activity-9bc807c97be5?source=rss-b5ddc7f82ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bc807c97be5</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[outsourcing]]></category>
            <category><![CDATA[procurement]]></category>
            <dc:creator><![CDATA[Mathias Wagner]]></dc:creator>
            <pubDate>Wed, 03 Feb 2021 13:37:03 GMT</pubDate>
            <atom:updated>2024-12-13T19:37:21.163Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LzHOAN2LtkhSx78Kx2QCVw.jpeg" /></figure><h3>Introduction</h3><p>I will talk about “all” the things you won’t get from a cloud provider. This is not to make the cloud look bad. To the contrary, I am strongly convinced that every company benefits from using cloud services.<br>Instead, I want to highlight non-technical aspects in your procurement, contracting, provider management and decision making functions. If your company understands the differences between traditional outsourcing and cloud outsourcing, as well as why cloud credits are not (yet) understood in the same detail as software licenses, you remove friction in deciding for and contracting a cloud provider. More importantly you allow for quicker ramp on the cloud due to improved expectation management and encourage openness to “try and do it differently than today”.</p><h3>Traditional Outsourcing vs. Cloud Outsourcing</h3><p><strong>Past:<br></strong>In the past companies bundled parts of their IT and issued a tender for outsourcing. Typical bundles comprised e.g. data center facilities and operations, workplace or network operations. Essentially you handed over a piece of assets and employees working on them to a 3rd party. Of course such agreements included lofty goals like “innovation” or at least renewal, but at the end of the day, you handed over a very well understood piece of work. I’m not saying, it was also well documented…</p><p>In addition the process of traditional outsourcing, as well as “managing” the 3rd party is well understood. Not only have companies done it more than once, but can also rely on a plethora of experienced consultants and skilled workers understanding how it’s done.</p><p><strong>Today:<br></strong>A typical cloud contract is different to an outsourcing one. Essential concepts like the “shared responsibility model” and “self service for everything” need to be explained to and accepted by business, technical as well as buying and provider management functions.</p><p><em>Shared responsibility</em> means that the cloud provider is not taking care of everything, but <em>only</em> for running and maintaining the platform. For example neither “installing a customer’s application” on the Cloud, nor operating it on the cloud is done by the provider. Basically every configurational activity or data manipulation is only executed on request by the outsourcing party (hopefully by an automated process) or it’s partners.</p><blockquote>If the API doesn’t provide what you want, you most likely will not get it.</blockquote><p><em>Self service</em> means, if you want to make a change in your cloud environment or request a report, you use an API (or a graphical interface abstracting from it). If the API doesn’t provide what you want, you most likely will not get it. Unless the cloud provider builds it, based on your feature request. The appealing pricing structure and flexibility of cloud platforms is based on relentless standardization and automation. Serving one-time efforts or snowflake asks are usually not fulfilled by cloud providers.<br>For example you won’t get a monthly SLA overview tailored to your specific needs. Instead monitoring uptime and requesting a redemption in case of outages are self services triggered by customers. Still cloud providers share a general status overview, not specific to a single customer. Features you need to build such a report are baked into their platform.</p><blockquote>Because of previous (people) outsourcing activities, the technical capabilities to understand and assess the impact and opportunities of the cloud can be limited.</blockquote><p>Until today the described differences are not understood in its entirety by all buying companies. The consulting market on cloud advisory is growing, but from a low starting point. And because of previous (people) outsourcing activities, the technical capabilities to understand and assess the impact and opportunities of the cloud can be limited. The lack of documentation hasn’t changed (despite all the outsourcing), which is an additional challenge when “creating the business case”. Which is no longer a calculation based on labour arbitrage, but on speed, ease of getting access to latest technology, reliability and scalability.</p><p>Of course reality is not exactly black or white as pictured above. I just want to highlight why a fundamental difference in approaching the cloud requires new ways of thinking, not only from a technical perspective. And help you to avoid building “just another data center” in the cloud.</p><h3>Licenses vs. Cloud Credits</h3><p><strong>Past:<br></strong>Buying (and selling) software licenses is a very well understood transaction, practiced and refined during the last 40+ years. If a company needed to upgrade their 100 Oracle databases, they bought 100 new licenses, got a significant discount (and might have been confused about CPU cores, sockets, VMs and what it actually meant for their license coverage :D).</p><p>More importantly the buying and contracting functions as well as the IT department or it’s partners know how to install or upgrade the software and can mitigate dependencies arising in their on-prem or managed hosting environments.</p><p><strong>Today:<br></strong>Consuming cloud services is different. In fact cloud consumers only pay what they use. No need for upfront commitments or multi-year contracts. As most of the enterprises want some kind of predictability and of course a little discount, cloud providers introduced the concept of cloud credits, which — in a nutshell — are a virtual currency, paid upfront and intended to be “consumed” by using the provider’s cloud services over a given period of time. Some cloud providers also offer multi-year commitments for e.g. a number of servers to address the customers’ need of predictability over flexibility.</p><p>Most buyers of such cloud credits don’t know how to spend it though. Wait, that’s easy to fix, isn’t it? Just consume the cloud, right? Well, for consuming the cloud, enterprises new to the cloud have a couple of prerequisites.</p><p>The organization needs to be ready to run workloads in the cloud from a security, compliance and connectivity perspective, but also from a mindset one. Giving up some of the control one had in the past is a hard change. In addition, architects, developers and operations staff need to learn using the cloud and the new concepts coming along with it (e.g. everything is an API, delete and redeploy vs. patch, firewall rules). So ultimately these companies have an additional training and management of change effort.</p><p>Once the above prerequisites are solved, you can start to really use the cloud with all it’s benefits. And as most of the cloud deployment activities will not be greenfield (i.e. applications developed from scratch, being cloud native), there is migration effort involved. It requires time, effort and ultimately a little risk taking from the business when migrating to the cloud.</p><h3>Now what?</h3><p>The key point here is that all of the above has been solved for many companies and can be solved for those tackling the cloud now. The cloud providers and their partners are prepared and will gladly assist customers in this journey. In addition, I strongly recommend reaching out to your competitors or players in related industries. They might be open to exchange learnings from their cloud transition with you. I’ve personally seen great results from such dialogues.</p><blockquote>A significant part of your transformation cost is not going to the cloud provider, but is spent on training your people and on migration efforts.</blockquote><p>“Going to the cloud” is much more than just buying the cloud credits or signing a contract. It is a fundamental transformation for all of the enterprise, not only for IT. This needs to be considered when planning, staffing and budgeting for a cloud adoption journey. A significant part of your transformation cost is not going to the cloud provider, but is spent on training your people and on migration efforts.</p><p><strong>Enable non-technical functions before starting the cloud selection process.<br></strong>If your procurement, contracting, provider management and decision making functions have no experience with cloud (providers) so far, enable them to learn about it. Focus on what is different to your established processes and thinking. You might have individuals on those functions, who are already very informed and interested in cloud adoption. Identify and encourage them to disseminate their knowledge and let them participate in your upcoming cloud endeavour.</p><p><strong>Be sensitive to finger pointing and foster exchange on eye-level.<br></strong>If you are in the early stages of a transition to the cloud, carefully listen to messages like “The cloud provider doesn’t want to integrate into our IT Service Management.”, “They are not able to provide SLA reports.” or “They are not able to implement our security standards.”. Such statements are strongs indicators of limited understanding of “how cloud works”. They might also be an indicator of the cloud provider’s personnel not having explained those differences to yours. Therefore make both parties responsible for establishing a common understanding, without falling into the buyer vs. supplier trap.</p><h3>Further Reading by Mathias Wagner</h3><ul><li><a href="https://medium.com/google-cloud/expand-your-cloud-center-of-excellence-to-the-whole-organization-and-become-a-cloud-first-business-60adb84349">Expand your Cloud Center of Excellence to the whole organization and become a cloud-first business</a></li><li><a href="https://mathiasw.medium.com/customer-expectations-and-best-practices-when-answering-an-rfp-b855f9639ffd">Customer expectations and best practices when answering an RfP</a></li></ul><p><em>Mathias Wagner is a Technical Advisor at Google Cloud. There he accelerates enterprise customers’ journeys to the Cloud. </em><a href="http://www.linkedin.com/in/mathias-wagner"><em>www.linkedin.com/in/mathias-wagner</em></a></p><p><em>This post reflects personal observations and opinions of the author and does not necessarily reflect those of his employer.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bc807c97be5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/buying-and-selling-cloud-is-not-yet-a-transactional-activity-9bc807c97be5">Buying (and Selling) Cloud Is Not (Yet) a Transactional Activity</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to copy Teslalogger backups to a secure location when running Teslalogger in a Container]]></title>
            <link>https://mathiasw.medium.com/how-to-copy-teslalogger-backups-to-a-secure-location-when-running-teslalogger-in-a-container-d60744e3fff6?source=rss-b5ddc7f82ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/d60744e3fff6</guid>
            <category><![CDATA[backup]]></category>
            <category><![CDATA[nas]]></category>
            <category><![CDATA[tesla]]></category>
            <dc:creator><![CDATA[Mathias Wagner]]></dc:creator>
            <pubDate>Sat, 09 Jan 2021 18:08:52 GMT</pubDate>
            <atom:updated>2021-01-09T18:19:28.577Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<h3>How to locate Teslalogger backups when running Teslalogger in a Docker Container, and copy those to a safe location</h3><h3>Intro</h3><p>Tesla cars can be queried via a documented API. This is a quite unique feature, allowing drivers of these cars to gain detailed insights. Available data points are e.g. consumption, speed, battery status or charging activities. There are a couple of self-hosted tools available to collect these treasures and analyze it.</p><p>Teslalogger (mostly build by Christian Pogea) is one of them and <a href="https://github.com/bassmaster187/TeslaLogger">available</a> on Github. There you can also find most of the existing documentation as well as links to the Raspberry Pi images. I decided to host it on my own, running in Docker containers on my QNAP NAS.</p><p>There is a short <a href="https://github.com/bassmaster187/TeslaLogger/blob/master/docker_setup.md">readme</a> on how to fire it up in a Docker environment. Teslalogger creates daily backups on its own, which is great. But these are stored on the same disk as the containers. So if you want them to survive a host HD crash, an encryption malware or worse, you better copy them to a save location(s).</p><h3>Locate the Teslalogger backup files</h3><ol><li>You can copy files from a running container, like this<br>docker cp a4d5:etc/teslalogger/backup /teslaloggerBackup<br>a4d5 is the beginning of my container ID for teslalogger_teslalogger_1, but the container ID changes after a restart. The container name might also change in the future. Luckily there is an easier solution:</li><li>Locate the Teslalogger backup path in your host’s file system. Then there is no need to extract the backup files from the container.</li><li>The local file system mapped into the container is exactly the same as the location in your file system used for building the container images (as of Teslalogger version 1.45.17.0).</li><li>For me this would be on a QNAP device: <br>/share/CACHEDEV1_DATA/homes/USERNAME/TeslaLoggerSetup/TeslaLogger/TeslaLogger/bin/backup</li><li>If you don’t know the path, you can find it out via <br>docker container inspect a4d5 | grep &quot;etc/teslalogger&quot;<br>Alternatively you can use docker container inspect teslalogger_teslalogger_1 | grep &quot;etc/teslalogger&quot;<br>assuming, the container name is unique across future versions</li><li>Now that we have the backup files’ location, we can store those away using a method of choice, like rsync to a local SMB or encrypt it and copy to a cloud storage. <a href="https://medium.com/google-cloud/rclone-and-google-drive-3fdfb00f34e8">Here’s my tutorial</a> on how you can backup encrypted files from a QNAP NAS to Google Drive. As the files are located in my NAS’ user folder, they are already safe :D.<br>QNAP users: don&#39;t get confused by CACHEDEV1_DATA. I don&#39;t know why they introduced this alias, but<br>/share/CACHEDEV1_DATA/homes/USERNAME/randomFolder is pointing to<br>/share/CACHEDEV1_DATA/homes/USERNAME/randomFolder or the other way round ;).</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d60744e3fff6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Customer expectations and best practices when answering an RfP]]></title>
            <link>https://medium.com/swlh/customer-expectations-and-best-practices-when-answering-an-rfp-b855f9639ffd?source=rss-b5ddc7f82ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b855f9639ffd</guid>
            <category><![CDATA[procurement]]></category>
            <category><![CDATA[tenders]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[rfp]]></category>
            <category><![CDATA[enterprise]]></category>
            <dc:creator><![CDATA[Mathias Wagner]]></dc:creator>
            <pubDate>Sun, 01 Sep 2019 14:57:02 GMT</pubDate>
            <atom:updated>2024-12-13T19:38:16.170Z</atom:updated>
            <content:encoded><![CDATA[<p>Sharing what I learned as a Sourcing Advisor</p><p>Influenced and supported by <a href="https://www.linkedin.com/in/simon-masterton-thx1138/">Simon Masterton</a>, <a href="https://www.linkedin.com/in/tsykes1971/">Tony Sykes</a> and <a href="https://www.linkedin.com/in/harald-viehweger-a7b9aa97/">Harald Viehweger</a></p><p><strong>tl;dr:</strong> Always try to understand what your customers want to achieve with the tender. Are your answers and your actions addressing their needs and expectations? Have you taken care of politics and formalities? If you are not sure, keep on reading.</p><h3>Introduction</h3><p>During the RfP process, certain customer expectations, best practices and formalities apply. If you are prepared, your experience will be much smoother and you will have a higher chance of winning.</p><p>I spent five years of my professional career as a sourcing advisor, helping customers to manage their outsourcing initiatives. My tasks included defining sourcing strategies, writing RfIs / RfPs, supporting supplier selections, executing due diligences, preparing and executing negotiations as well as accompanying transitions to suppliers.</p><p>The tenders ranged from medium-sized full-scope IT outsourcings to enterprise-grade, global IT operations deals across various industries. Today, I observe and support such deals from a vendor perspective at Google.</p><p>Below learnings are based on my personal failures and successes throughout the years. Some of them may sound obvious. They need to be addressed nevertheless.</p><p>I am strongly convinced those insights are applicable to your IT-related RfPs or ones in a different context. I do not especially address RfIs or RfQs (see further reading), yet most of the recommendations would apply also.</p><p>This article is structured around customer expectations. The sections are:</p><ul><li>Documented formalities of a tender</li><li>The customer tender team</li><li>Communicating with the customer</li><li>The RfP answer itself</li><li>Customer evaluation criteria</li><li>Marketing material</li><li>Your team</li></ul><h3>Customer expectations</h3><p>Enterprise customers usually have a rather strict and defined process in place when it comes to RfPs. The process is often not led by the buying department, but by procurement. This already makes a huge difference in how to approach the RfP or process. The bigger the customer organization, the more overlapping functions you find. Smaller customers have a more streamlined approach, avoiding overhead and redundancies.</p><ul><li>Buying department led<br>If you bid for a long-term relationship and / or a complex transformation ahead, the more likely will be the shift towards the buying department</li><li>Procurement led<br>If you bid for a commodity product — which is easy to describe and standardized in your industry — the more likely will be the shift towards procurement led. Usually compliance and audit requirements will be more strict (e.g. in financial services, medical or pharma)</li></ul><p>Often customers rely on external sourcing and legal advisory from the likes of ISG or KPMG. This can be very beneficial to you, as those advisors will help to streamline and structure. They are also good at communicating to involved parties, with a few exceptions of course. Use them as a translator between customer lingo and yours where you cannot map it out on your own. Particularly in clarifying the needs and motivations of both sides.</p><h3>Documented formalities of a tender</h3><p>There are some simple rules to stick to when answering the RfP. Most of them are based on common sense, whilst others might be defined specifically by your customer. It is vital to follow both.</p><p>Part of every RfP issued by the customer should be a document describing formalities, structure of the expected answer and key dates. If there is no such document in the tender documents received, reach out to your customer and ask for it.</p><p><strong>Key is to:</strong></p><ul><li>Read the document. Then read it again. Then make everybody in your team answering to the RfP read it. If you can, organize a reading session with the customer. You will avoid misunderstandings, clarify questions informally and also get additional insights on motivations and complications behind the tender</li><li>Have somebody outside of your bid team being responsible of taking care of described formalities and maintain an overview of dates and deadlines. Let’s call this person “RfP Manager”. He/she should read the document again from time to time and definitely before filing your answer.<br>This advice might sound excessive, but it is the only structured approach of making sure you meet the expressed customer expectations, adhere to your internal guidelines and interests and do not miss any deadlines. If you are not setup that way, give this responsibility to a bid team member</li><li>Structure your answer in exactly the way the customer asks you to. Even if this would be contradicting to your approach, the structure of your internal organization or tender team, or common sense. Do it anyway. <br>The customer usually has a reason for the given structure. E.g. certain information like pricing or staff impact must only be seen by authorized customer characters, specific customer staff will read only certain parts of your answer, or the breakdown follows their assessment guide (see next section).</li><li>If you really believe that it is necessary to deliver a proposal in an alternative format, do this in addition to delivering a compliant proposal. Explain the customer in advance why you do this (e.g. better service, lower cost, higher quality) and why you believe the given structure is an impediment to the customer. Then the customer will likely read your non-compliant version and it may influence them whilst they use their formal methodology to judge your compliant response</li><li>If your proposal is towards the public sector make sure that you comply 100%. There is no room for deviation in the public sector as the rules of engagement are far more strict for your customer</li><li>Respect the customer communication chain given to you (see “Communicating with the customer”)</li></ul><h3>Customer tender team</h3><p>The team at the customer comprises various functions and departments. This includes the buying department(s) as well as support functions like finance, legal and procurement. In my cases the buyers have been infrastructure and application leads, heads of IT, and C-level sponsors. <br>When the tender involves significant change potential, you hopefully find somebody dealing with the Management of Change, who needs to be addressed specifically. If not, offer support on this. Sometimes HR is also involved when the deal includes outsourcing of staff, or significant change in staff activities is expected.</p><p><strong>Key is to:</strong></p><ul><li>Identify and address the needs and expectations of each customer in the tender team as well as their advisor(s). Create a map of individuals in the customer teams. Document their level of support and why they might not support you. Cover each customer with somebody in your team or wider company. Especially focus on the non-supporters and try to convert them at least to neutral. Respect levels and seniority. Document how you want to do that. <br>It is also helpful to use a personality insights concept like social styles (see further reading), to not only map function- and level-wise, but have a fit on personalities (e.g. introverts, extroverts) in addition</li><li>Make sure you have the right people and content to address customer stakeholders at the expected level of detail. A CIO might be fine with a strategic or even a marketing message, while a head of infrastructure operations and her experts want to know all the details you have (and don’t have)</li><li>Understand who is a decision maker, who is an influencer and who doesn’t have an interest in the tender or is even working against it. For the latter ones, be careful not to address their expectations, as they might be contradicting to the overall goals of your customer</li><li>Spot the contradictions! You will often find that there are different views within the customer. This is sometimes done intentionally to see how you respond and sometimes because the different departments have different agendas. Don’t worry if they are divergent (that’s quite natural), but try and address this with the customer without aggravating them. The last thing you want is to be steered down the wrong path by one person trying to meet their own agenda</li></ul><h3>Communicating with the customer</h3><h3>In general</h3><p>Often a tender is run by the procurement department, using special tools like SAP Ariba. They are used to track all activities and communication between customer and supplier. This could mean, you are not allowed to talk to the customer, besides one specific person, email address or via the tool. They do that to avoid leakage, follow compliance protocols and to control and harmonize the information flow to suppliers. Quickly sorting out open points, feeling the heartbeat of your customer or just having an informal chat can be very hard and put you at risk of losing the right to bid.</p><p>Also you need to be aware of official and unofficial “leaks” to your competitors. Always assume that details like the order of magnitude of your pricing, your programme plan, your architecture or other important information finds its way to the competition. And not necessarily due to mischievous intend. It could simply be due to the comparability of a commodity service, research made available by companies like Gartner or ISG, or your competition’s internal battle cards. <br>Questions you file for answering to the customer, to my experience always get distributed amongst the competition. On the positive side, you will get your competitors’ Q&amp;As, too.</p><p><strong>Key is to:</strong></p><ul><li>Respect and follow the rules set by the customer, while testing where you could cross individual boundaries (e.g. via a very supportive customer character)</li><li>Help your customer to understand that ironing out small misunderstandings by discussing an open topic is beneficial to them early in the process.</li><li>Negotiate / clarify in advance who talks to whom. It is a good idea to seperate your deal team from your account team. The later one can keep communication channels (with senior management) open. Their job is not to discuss content or influence the tender, but to check-in on the process (e.g. keep asking “Are we on time?” and “Are we meeting your expectations?”)</li><li>Assume that official tools like Ariba will fail or have limited usabiliity. This impacts e.g. filing deadlines via the tool. When you file, send an email to your procurement contact. Then call them and ask for confirmation of your filing.<br>Getting additional access to the tool, in case your user is sick or out of office, might be a challenge. Always ask for access for at least two characters in your bid team</li><li>Accept leakage. Where you can’t, explicitly state the high confidentiality (i.e. shared under NDA only) of your material to the customer. Establish technical boundaries like sending out only PDFs, making use of user-specific access (e.g. via Google’s G Suite), but be aware, those methods are not bullet proof. If you cannot accept leakage, don’t hand out or send confidential documents. Be aware that the customer might not consider such material for decision making.<br>Make sure you have a sound definition on what “highly confidential” actually means. This helps to avoid needing to give in at the customer on declared “highly confidential documents”, which actually are not confidential at all</li><li>Use your own battle cards to benefit from organizational knowledge on your competitors. Such cards comprise e.g. pricing information, deal strategy, statements of your competition and how to respond. They allow you to be specific and precise in your communication without requiring you to build it your own from scratch</li><li>File structured and well written questions to your customer, including specific references to existing documents like the RfP issued (i.e. file name, section and page number, bullet point). The customer will be disappointed when you wouldn’t. It might even introduce negative bias towards you and put doubt on your professionalism</li><li>Phrase questions in a way not to give too much information to the competition. Either by the question itself, or an expected answer by the customer. Sometimes it is better not to ask a question because of the information flow towards the competition. On the other hand, carefully study Q&amp;A from competing parties</li><li>Know the history. It’s very likely that the customer has been engaged before. Maybe even three or four years earlier. Understand other initiatives and ongoing projects your company has at the customer</li></ul><h3>Orals and face-to-face interactions</h3><p>Your direct interactions with the customer are limited. Make the best out of it. You will present once in front of a customer panel on what you are offering in most cases. Depending on the size and complexity you have additional air time. Assume that the customer will come back with clarification questions after you filed your answer. Try to do those in person, at least via video conference, too.</p><p><strong>Key is to:</strong></p><ul><li>Make sure you send your best team! Don’t send the most confident sales person and let them simply have a panel of non-speaking characters sit behind them. Ensure that each person in the team can interact and demonstrate their value (i.e reason for being there). Remember that your customer has probably sat through 4 or 5 similar presentations and the last thing that they need is to have your team simply repeat what they have read in the proposal</li><li>Practice your story telling, make it interactive and keep it light-hearted so that the customer audience remembers your team and not just the proposal</li><li>Prepare and incorporate answers to explicit and implicit questions the customer might have in your story. Those are e.g.</li></ul><p>Why is this person here?</p><ul><li>Have they done this before? With which customer, when and to what scale?</li><li>At customers with similar scale and problem, what people and roles do they have and how do they match to these (your) supplier people?</li><li>Is this the team we will really get? For how long?</li><li>Why is my account the interesting one for this (supplier) person to work on?</li><li>Why do they need so many people to explain what they do and want to sell?</li><li>How do these people match up to my organisation?</li></ul><h3>RfP answer</h3><p>Your written answer to the customer RfP is the most important part and often legally binding. It will make up a significant part of their checklist (see next section). Get it right!</p><p><strong>Key is to:</strong></p><ul><li>Have a management summary for your whole answer, potentially spanning across 20+ individual documents. Make sure at least this part is written very well and reviewed by excellent writers in your company. This might be the one (and only) part read by all your customer stakeholders</li><li>Include a summary in every key chapter or document of your answer, too (eg. solution, security, financials). These summaries outline in a couple of sentences the value of your proposal and how it matches or exceeds customer expectations. They increase your chance of more customer characters reading parts of your answer, in addition to the management summary. Have the same people who write the management summary review those chapter / document summaries to ensure consistency</li><li>Do not answer with a simple yes or no. Usually it makes sense to add some context. Definitely explain more when you need to give a negative answer to the customer. So instead of answering the question “Do you have staff in Berlin?” with “No.”, answer something like “We have people in Dresden who would travel to your office 2 days a week and if required up to 4 days a week.”. If your customer issues a yes/no checklist try to include an additional column or comment field where you document such details. Goal is to give them more context and alternatives when evaluating your answer per their checklist (see below)</li><li>Take care of seemingly minor topics like proper table of contents, concise heading numbers, compelling descriptions of graphics and of course spelling and grammar</li><li>Stick to the customer formalities described above</li></ul><h3>Evaluation criteria</h3><p>Your customer will have some kind of assessment framework to select a supplier during the tender. Whether it is a complex multi-page framework from the likes of ISG, or a simple one-pager with checkboxes, it will exist. The structure of the RfP and the documented expectations of the customer will give you a hint, how the assessment could look like.</p><p>In addition, you might have done pre-work like proof of concepts, or have a long lasting relationship with you, working together in different areas (achieving good or bad results). With those you could already have influenced the decision criteria either way.</p><p><strong>Key is to:</strong></p><ul><li>Understand what dimensions the customer will be rating</li><li>Find out the priority of those dimensions. Usually the most important ones are not functional ones like best in class technology or compelling project methodology</li><li>Be aware that C-level customer decision makers might follow criteria not on the checklist of the customer bid team. To my experience their decision criteria are:</li><li>Financials (e.g. pricing, duration of contract, charging model)</li><li>Legal (e.g. contract under US vs. German law, one-sided risk allocation, intellectual property rights)</li><li>(Market) perception (e.g. your position in a magic quadrant, have done this before stories, public credentials, trust based on existing relationships between customer and supplier)</li><li>Your financial stability and outlook. I’ve seen partners being rejected because their public financial situation was not promising (e.g. declining exchange value, rumors on hostile takeover)</li><li>In very rare cases personal preferences or relationships. But usually this is only icing on the cake, not a deciding factor ruling out quantitative or qualitative criteria</li></ul><p>Keep in mind that the evaluation criteria will change along the way, especially in a multi-phased RFP (e.g. round 1, round 2, best and final offer — BAFO). Whilst the solution and financials may get you through round one, a good answer to the HR related topics may be essential at BAFO. You can usually pick-up hints as the questions evolve, or as to where the focus and weighting changes</p><h3>Marketing material</h3><p>I learned that functional people at the customer are the least interested in your marketing material during a tender. They would not have approached you, if they would not have some level of confidence that you can do it (tokenism aside). It is highly unlikely that your marketing content is part of the customer’s evaluation criteria (see above). I have seen restrictions like “your answer on chapter 3 can be no more than 5 pages” or “Please put your marketing content in a separate document. We will not read it.”.</p><p>Still, there might be situations where you need a tiny bit of marketing to make your point. As an example: Your customer might not have asked you about the security of your product. But you feel you are very strong in this area and to your experience this is a differentiator in your market. Then you would add one or two slides / half a page of your marketing material and make it specific to the customer tender.</p><p>Other references could be customer case studies and references, adherence to recognized standards / certifications, product roadmaps.</p><p><strong>Key is to:</strong></p><ul><li>Put content first for the functional decision makers and their experts at the customer</li><li>Make your marketing content — and content not asked for in general — specific to the customer tender. Keep it brief</li><li>Let the customer know, a specific document or section was included by you for a broader overview (speak marketing) to your answer. They still might read it based on a conscious decision, but won’t feel like it was a waste of their time</li></ul><h3>Supplier team</h3><p>This is about your team. It is one of the major factors why you win or lose. How to get it right?</p><p><strong>Goal is to:</strong></p><ul><li>Involve all required roles early on, to ensure what you sell is what you can deliver</li><li>Ensure that key individuals are available throughout the whole process and have the bandwidth to contribute. Adjust the team early, in case certain individuals cannot support the RfP as required (availability and skills)</li><li>Embed functional experts in your bid team, as the customer expects know-how to be present in their meetings, ready to be challenged. Be sure to understand how your experts are incentivized to embed themselves in your bid team</li><li>From the beginning make transparent to the customer who would be the long-term engagement manager type of role, who is only here during pre-sales and who would be involved in potential delivery. In my experience customer decisions are heavily influenced by the credibility of your bid team being able to deliver after a favorable decision. Having those colleagues on board early is a booster. Even if you can’t commit these people officially, be transparent to the customer that it is at least your intent to have them on-board</li><li>Have one person on the ground who is accountable for the bid. If your internal reporting lines do not meet at this person, make sure managers outside of this line support and respect the responsibility of this person. Contradicting statements or behaviours will be quickly noticed by the customer and are a big minus on their checklist</li><li>Inform your senior characters who know executives at the customer. Make sure that they are informed of what they should and should not do. You don’t want to be excluded from the RfP, just because your CxO discussed the bid with the customer during a weekend activity</li></ul><h3>Negotiations</h3><p>Negotiations start from day 1. Key is to prepare internally before you engage with your customers. Every interaction is in fact part of the negotiation. This includes defining and aligning positions, being prepared to push back, or retreating (temporarily) to reconsider when key positions are tackled hard by the customer. Be prepared to provide options to the customer. Also know your best alternative and when to walk away. <br>Everybody in your team is required to be aligned on your internal positions and should be ready to act on them. I’ll be covering this in a different article.</p><h3>What’s next?</h3><ul><li>If you are an active part of a bid team, read the formalities / expectations document of your customer. Then encourage your team to read it to identify gaps. After that start to close them</li><li>If you are not part of an active bid team, identify what of the above guidance is missing in your internal how-tos and training material. Start to factor it in</li><li>Let me know what is missing in my article from your point of view. I’m also interested in what worked well and what didn’t during your RfP answers</li></ul><h3>Further Reading</h3><ul><li><a href="https://www.linkedin.com/pulse/difference-between-rfq-rfi-rfp-haider-ali-chughtai-pmp-rmp/">The difference between RFQ, RFI and RFP</a></li><li><a href="https://tracom.com/social-style-training/model">The SOCIAL STYLE Model</a></li><li><a href="https://medium.com/swlh/buying-and-selling-cloud-is-not-yet-a-transactional-activity-9bc807c97be5">Buying (and Selling) Cloud Is Not (Yet) a Transactional Activity</a> by Mathias Wagner</li></ul><p><em>Mathias Wagner is a Technical Advisor at Google Cloud. There he accelerates enterprise customers’ journeys to the Cloud.<br></em><a href="http://www.linkedin.com/in/mathias-wagner"><em>www.linkedin.com/in/mathias-wagner</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b855f9639ffd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/customer-expectations-and-best-practices-when-answering-an-rfp-b855f9639ffd">Customer expectations and best practices when answering an RfP</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Expand your Cloud Center of Excellence to the whole organization and become a cloud-first business]]></title>
            <link>https://medium.com/google-cloud/expand-your-cloud-center-of-excellence-to-the-whole-organization-and-become-a-cloud-first-business-60adb84349?source=rss-b5ddc7f82ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/60adb84349</guid>
            <category><![CDATA[organizational-culture]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Mathias Wagner]]></dc:creator>
            <pubDate>Fri, 28 Jun 2019 16:01:02 GMT</pubDate>
            <atom:updated>2024-12-13T19:38:39.746Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GXdp4ng0Vlxtg-Pz7DkSBQ.jpeg" /></figure><p><strong>tl;dr</strong> There are plenty of resources explaining what a Cloud Center of Excellence is and how to set it up (see further reading). I will share some guidance on what comes next. Which is, expanding what was learned and built in your CCoE, to the whole organization. Without becoming a bottleneck.</p><h3>Introduction</h3><p>Given today’s challenges in IT and the vast amount of consultants, vendors and internal advocates, it is highly likely you already have a Cloud Center of Excellence (CCoE). If not, maybe you have one, or more teams who do the same thing but sail under a different flag like Cloud Competence Center, Cloud Tribe, DevOps Team, Cloud Magicians or just “the folks who do this new thing called cloud”. Although I’d like to challenge, if cloud should be considered being new.</p><p>Your CCoE is a mix of engineers, operations / SRE experts, project managers or Scrum Masters (which is not the same thing, of course). Leadership, especially a thought one is also part of it. Not to forget marketing and communications as well as change management. All of them form a great team, having embraced the concept of cloud.</p><p>You have achieved first results, ready for production. Or even run a live e-commerce platform, rolled out a machine learning solution to identify fraud, or enabled your customer contact center with sentiment analysis.</p><p>And — I’m pretty sure — you identified growth issues, bottlenecks and difficulties in rolling out, what was learned in the CCoE, to your wider organization.</p><p>I will help to identify pitfalls a priori and share ideas on how to avoid them. Moreover, I will propose, how to scale your CCoE’s competence and expand from a cloud island, to every shore in your organization. And become truly cloud-first.</p><h3>Common restrictions a CCoE faces and how to avoid them</h3><h4>CCoE is slowed down by governance, security or budgeting</h4><p>This is a tough one, with books to fill. In a nutshell, provide senior executive sponsorship to the CCoE, helping to obtain required process exceptions (e.g. financial planning, forecasting, hiring). At the same time, foster a cultural change towards more risk taking and measure results in impact instead of quantity. For security, establish a clear set of rules on what can go to the Cloud, what can’t and which are the security requirements. Make sure those rules are based on actual requirements (e.g. regulations, industry best practices), rather than on gut feelings or lack of understanding Cloud.</p><h4>CCoE is perceived as just another supplier management layer</h4><p>While the CCoE knows Cloud suppliers’ products, processes and support procedures by definition, make sure not to off-load highly specialized tasks like contract &amp; supplier management, troubleshooting or support to this team. Instead quickly scale those capabilities into departments, already responsible for for such tasks in “legacy” environments. In addition, enable your CCoE to uphold and enforce defined Cloud standards.</p><h4>CCoE struggles with implementing multi-cloud everywhere</h4><p>I consider multi-cloud as a given in large enterprises. Choice is a good thing. Still every supplier you add to the portfolio will increase complexity. With regards to hyperscalers (Alibaba, AWS, Google and Microsoft), try to start with one. Scale only after you understand the concept and mechanisms of Cloud well and have a business reason (e.g. unique feature, performance, availability) or regulatory requirements. Don’t try to make each of your services available on two or more hyperscalers (except services like Kubernetes or Anthos). The efforts of doing so and incompatibility of features would slow you down and bind unnecessary development, testing and integration cycles. Not to speak of trying to back-charge Cloud cost to individual services.</p><h4>CCoE tries to avoid vendor lock-in</h4><p>Some services (e.g. Kubernetes, open source-based databases) are very portable. Yet others are more difficult. I see no difference to previous technology or software purchasing decisions. Make sure to make a conscious, fact based decision when deciding for a potential lock-in. Don’t over-engineer, or try to build abstraction layers beyond what is available as open source (e.g. Terraform). Such efforts rarely pay off, if not backed by a large community.</p><h4>CCoE focuses on individual building blocks (e.g. architecture, CI/CD) instead of end-2-end Cloud</h4><p>Avoid by staffing diverse backgrounds (developers, architects, operations, business) and define 360 degree OKRs with transparent ways of measuring. Make sure an end-2-end perspective is baked into the CCoEs OKRs, which can then be broken down to individual responsibilities. It is vital for staff to identify themselves with their individual, but also overall OKRs.</p><h4>CCoE is not visible in the organization</h4><p>Create awareness by giving the CCoE seats in standardization and decision bodies like the architecture board. Also encourage them to speak in internal events related to IT and business transformation. In addition use internal blogs and newsletters, or whatever your organisation is using there. Ensure that the CCoE is creating products with business impact. Visibility will come from there.</p><h4>CCoE does not attract the envisioned talent</h4><p><strong>Internal: </strong>Have a clear career path for people joining, but also leaving the CCoE. Allow for moves sideways and encourage seasoned leaders managing people to make a “downward” step, by temporarily leaving their people management responsibilities, while providing their know-how and full attention to the CCoE.</p><p><strong>External: </strong>Speak on external events and publish content your CCoE developed publicly. Provide perks and adequate salary required to attract required talent.</p><p><strong>Both:</strong> Rigorously check your recruiting process and tailor to your CCoE’s needs. Adjust depending on the maturity of your CCoE and hire only new staff that is exceptionally good in one or more specific areas which you need.</p><h3>Ways to expand a Cloud Center of Excellence (CCoE) to your wider organization</h3><p>Once your CCoE is successfully established and delivering first results, you want to scale those learnings and assets to your whole organization. Here are some ideas on how to do that.</p><h4>Tell a business story</h4><p>Cloud doesn’t exist for the sake of technology. It is a vital tool for the digital transformation of your business. This should be reflected in the strategy and the stories you tell. Always have a reference to the business impact when talking Cloud. Users need to see the benefits for their work and business problems. Everything else will follow.</p><h4>Encourage and allow for independence</h4><p>Most of the teams adopting cloud and building on top of the ideas and assets of your CCoE will come back to the CCoE. They will ask for help, guidance, reviews and approvals. Avoid the latter at all cost. Design the decision process for scale, not to become a bottleneck.</p><p>Also provide guiding principles to teams, so they don’t need help from the CCoE in standard situations. Offer technical and non-technical training capacity, as well as budget suitable for the amount of staff requiring training. Include different types of training like self-study, mentoring, classroom, labs or Hackathons. Create learning paths, which will enable people and give them the required confidence for independence.</p><p>Trust in the foundations you built. Your organization and staff will be able to sort it out. Encourage them to do so.</p><h4>Evangelize</h4><p>Encourage CCoE staff to be on stage (internal and external) to grow awareness and build networks across the organization, make others wanting to try new technologies and solutions and also attract new talent.</p><p>Make sure to work on publications to spread the word. Leaders and sponsors in your organization need to support those efforts and participate whenever they can to show buy-in and provide confidence.</p><h4>Disseminate</h4><p>Re-assign CCoE veterans to other units in your company, either as leaders, experts or individual contributors. Make sure this move is aligned with expectations of a particular person and the career path communicated to your CCoE staff. Such individual tasks could be:</p><ul><li>Asking a Cloud Analytics expert to transfer to your finance department to help building more transparent and accurate reporting.</li><li>Having somebody with deep Machine Learning (ML) expertise support your manufacturing line on predictive maintenance and teach them what kind of data is required, to produce good models and predictions.</li></ul><p>Use those veterans as advocates, evangelists but also as a feedback loop. They suddenly experience Cloud from a business or IT perspective instead of a CCoE one and will definitely come up with first-hand ideas on ways to improve. In addition allow for temporary rotations of other staff into the CCoE to learn and disseminate once they rotate back.</p><h4>Grow Cloud footprint</h4><p>Based on your digital transformation strategy, define a roadmap of successive, additional cloud workloads and tie organization-wide OKRs to them, to get things moving. Break down to individual OKRs to ensure individual ownership. Don’t start with huge complicated all-in programme efforts requiring months of planning, vendor selection and huge teams to staff. Pick easy wins, learn and grow from there. Cloud adoption beyond single business problems and PoCs will lead to bigger impact, freeing up capacity through automation and result in more acceptance. In essence, growing your Cloud footprint will be one of the biggest drivers for CCoE know-how transfer.</p><p>I am sure there is even more which worked out for you. Or bits and pieces which didn’t go well. Please let me know!</p><h3>Next steps</h3><ul><li>Pick two areas for improvement and define an approach on how to tackle them. Get management buy-in and sponsorship. Then iterate. Definition and decision should be in the days than in the weeks.</li><li>Agree with your CCoE staff (e.g. in the next team meeting) on three public events they are going to speak at. Make sure the speakers are / get trained well and rehearse internally.</li><li>Revise your CCoE recruiting approach and sharpen the career paths.</li></ul><h3>Further reading</h3><ul><li><a href="https://services.google.com/fh/files/misc/cloud_center_of_excellence.pdf">Google Cloud whitepaper on building a Cloud Center of Excellence</a></li><li><a href="https://blog.cloudability.com/the-importance-of-having-a-cloud-center-of-excellence/">The Importance of Having a Cloud Center of Excellence</a> by the Cloudability team</li><li><a href="https://aws.amazon.com/blogs/enterprise-strategy/using-a-cloud-center-of-excellence-ccoe-to-transform-the-entire-enterprise/">Using a Cloud Center of Excellence (CCOE) to Transform the Entire Enterprise</a> by Mark Schwarz</li><li><a href="https://medium.com/swlh/buying-and-selling-cloud-is-not-yet-a-transactional-activity-9bc807c97be5">Buying (and Selling) Cloud Is Not (Yet) a Transactional Activity</a> by Mathias Wagner</li></ul><p><em>Mathias Wagner is a Technical Advisor at Google Cloud. There he accelerates enterprise customers’ journeys to the Cloud. </em><a href="https://www.linkedin.com/in/mathias-wagner"><em>www.linkedin.com/in/mathias-wagner</em></a></p><p><em>This post reflects personal observations and opinions of the author and does not necessarily reflect those of his employer.</em></p><p><em>Credit to Google’s Data Center Team for the article&#39;s chillers picture.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60adb84349" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/expand-your-cloud-center-of-excellence-to-the-whole-organization-and-become-a-cloud-first-business-60adb84349">Expand your Cloud Center of Excellence to the whole organization and become a cloud-first business</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[rclone and Google Drive]]></title>
            <link>https://medium.com/google-cloud/rclone-and-google-drive-3fdfb00f34e8?source=rss-b5ddc7f82ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fdfb00f34e8</guid>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-drive]]></category>
            <category><![CDATA[cloud-storage]]></category>
            <dc:creator><![CDATA[Mathias Wagner]]></dc:creator>
            <pubDate>Wed, 23 Jan 2019 18:14:42 GMT</pubDate>
            <atom:updated>2019-10-22T13:01:59.234Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<h3>How to utilize cloud storage like Google Drive, to copy local or NAS data with rclone, for out of region disaster recovery</h3><p><strong>tl;dr: </strong>If you want to copy data from local or network attached storage to your cloud storage — encrypted or not — without relying on any applications other than rclone, keep on reading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jrqPyNWUgEF7trnXnZySwg.jpeg" /><figcaption>Destroyed hard disks. Hopefully you have a copy of those… (copyright applies to this photo)</figcaption></figure><h3>Background</h3><p>A couple of weeks ago I decided to lift my private NAS backup strategy to the next level by adding out-of-region disaster recovery. In other words, I wanted to copy my most important data not only to local disks and NAS, but also store them in the cloud on Google Drive.</p><p>Of course I already have a lot of files in the cloud, e.g. Google Docs and Sheets. But there are others, like some music and especially RAW photos, which have not been so far.</p><p>This guide will outline, how to use rclone for encrypted copies from a QNAP NAS to Google Drive, while keeping your current storage setup and workflows as is. It is also applicable to other NAS, Linux or even Windows environments, as well as other Cloud Storage (e.g. Google Cloud Storage, OneDrive, Dropbox, S3), requiring only minor adjustments.</p><p>Additionally, it describes how to make use of Google Cloud Service Accounts, to limit rclone’s access rights and the chance of your account credentials getting in the wrong hands. I will provide an option to use Google Drive’s folder sharing mechanics, to make sure you can access your encrypted files without the service account, and even access those files in the Google Drive web application.</p><p>I focused on Google Drive as part of the Google Cloud and G Suite family. It is a no-cost, consumer ready solution for low data volumes. It also offers an easy to understand <a href="https://one.google.com/about#upgrade">pricing model for consumers if you need more storage</a>.</p><p><strong>Important to understand:</strong> this approach doesn’t support snapshots or versioning of files (see section “Difference between copy vs. sync and why versioning is not available” below)!</p><h3>Alternatives</h3><h4>Alternatives on QNAP</h4><p>There are plenty of similar use cases utilizing QNAP built-in features which allow for encryption out of the box, like backing up to Google Cloud Storage or AWS S3, (e.g. <a href="https://www.qnap.com/solution/hybrid-backup-sync/en-us/">QNAP Hybrid Backup Sync App</a>).</p><p>There is even a Google Drive connector available (e.g. <a href="https://www.qnap.com/en/how-to/tutorial/article/connect-to-your-cloud-storage-smoothly-with-cloud-drive-sync-on-qnap-nas/">QNAP Cloud Drive Sync</a>). But for reasons only known to QNAP, it does not support encryption.</p><h4>Alternatives for general purpose encryption</h4><p>You could work around the missing encryption feature by encrypting your data before putting it on your local storage. Or use software like <a href="https://cryptomator.org/">Cryptomator</a> (now also available as server edition running in a container), or <a href="https://www.boxcryptor.com/">Boxcryptor</a> in desktop environments. But these options require you to make adjustments to your existing storage / backup concept or make you dependent on specific vendors.</p><h3>rclone.conf example file we are going to build</h3><pre>[GDrive_User]<br>type = drive<br>scope = drive.file<br>service_account_file = /share/homes/username/BackUp/rclone/my-service-account-file-12345.json<br>auth_owner_only = true</pre><pre>/* Below is optional and only required if you want to encrypt your files */<br>[GDrive_User_Encrypted]<br>type = crypt<br>remote = GDrive_User:NAS_Documents/20181117_Baseline/<br>filename_encryption = standard<br>directory_name_encryption = true<br>password = someHash<br>password2 = otherHash</pre><h4>Install rclone on QNAP NAS</h4><ol><li><a href="https://rclone.org/downloads/">Download</a> rclone according to your CPU architecture. For QNAP NAS devices you find unofficial pre-built packages in the <a href="https://www.qnapclub.eu/en/qpkg/330">QNAP Club</a> (that’s the one I used).</li><li>Connect to your NAS using SSH.</li><li>Check if rclone is installed by invoking the rclone command.</li></ol><pre>[/] # rclone<br>//Output<br>Usage:<br> rclone [flags]<br> rclone [command]…</pre><h4>Create a Google Drive remote link and add encryption</h4><p>This guide assumes your are using Google Drive, but rclone supports most other cloud storage options, too (<a href="https://rclone.org/docs/#configure">see configuration options</a>).</p><h4>Create a Google service account</h4><p>I propose to connect using a <a href="https://cloud.google.com/iam/docs/understanding-service-accounts">Google service account</a>, which needs to be created first (see below). There is also an option using standard OAuth2 tokens, but I don’t think this would work in a NAS context, as it requires a web browser and (periodic) log-in to your Google account.</p><blockquote>Edit October 22, 2019: Just learned from a fellow reader that OAuth2 should work. You&#39;d receive a URL you open in the browser once, then copy the OAuth2 token to the console and take it from there. One additional benefit is that you can restrict rclone&#39;s access only to files created by it.</blockquote><p>Creating a service account not only works via the <a href="https://console.cloud.google.com/">Google Cloud Console</a>, but also via a lightweight interface, the <a href="https://console.developers.google.com/projectselector/iam-admin/serviceaccounts">Google APIs IAM site</a>. I suggest the latter if you don’t use any other Google Cloud Platform services so far.</p><ul><li>Go to the <a href="https://console.developers.google.com/projectselector/iam-admin/serviceaccounts">Google APIs IAM site</a></li><li>Klick on “Service Accounts”</li><li>Create a new project, if you haven’t done so far. Project name could be “rclone copy”. Then you get your service account ID / email, e.g.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/0*RyotItrS9YZYdaob" /><figcaption>Service account with email and name</figcaption></figure><ul><li>Click on the newly created service account and create a key in JSON format</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5ZPspaa92wtFx6F8" /><figcaption>JSON key creation for service account</figcaption></figure><ul><li>Download the key, as it will be required for your rclone config file</li></ul><p>Keep the key in a safe location as it will grant everybody who gets hold of it, read and write access to the files stored in (or shared with) the service account.</p><h4>Create rclone “remote”</h4><p>Please <a href="https://rclone.org/drive/">follow the official documentation</a> and create a standard remote. A remote is like a connector to a specific folder in a particular cloud storage.</p><h4>[Optional] Add encryption</h4><p>Now you add encryption on top of the remote link created above. The <a href="https://rclone.org/crypt/">official documentation also describes this in detail</a>.</p><h4>[Optional] Make copied files visible in your Google Drive</h4><p>During setup you might have checked back to your browser and your Google Drive account, realizing that the files you just copied are not there. That’s because the service account doesn’t have access to your existing Google Drive files! Picture the service account as kind of a virtual, new Google Drive account, but tied to your quota. You can only access it’s content via the Google Drive API, like rclone does.</p><p>You can make your (encrypted) files available in drive.google.com or the Google Drive app, but be aware that this also means that you, or somebody / an app having access to your Google Drive could (accidentally) delete your copy created with rclone.</p><p>If you decide to do so, share a specific folder (e.g. shared_folder) in your Google Drive with the service account. As your service account name looks like an email address (e.g. name-of-your-sa-account@your-project-name-123456.iam.gserviceaccount.com) you can share the copy folder in the Google Drive web UI. Just add the service account “email” as an additional user to the copy folder. You may receive an automated email stating that the service account email is not reachable, but it will work nevertheless.</p><p>From now on you can advise rclone to access this shared folder using the drive-shared-with-me flag. This works for all rclone commands (<a href="https://rclone.org/drive/#drive-shared-with-me">see official documentation</a>). Here’s an example:</p><pre>rclone copy --drive-shared-with-me /source/files your_remote:shared_folder/</pre><h3>Make rclone.conf durable and back it up</h3><h4>Configuration durability on QNAP devices</h4><p>On QNAP devices the rclone configuration is stored at /root/.config/rclone/rclone.conf. As this location will be wiped after NAS restart or latest after a NAS upgrade, you need to manually copy the rclone.conf file at a different location, e.g. at /share/homes/your-user/rclone/. Please note: anytime you change the configuration or create a new one using rclone config, you need to save the configuration again at a durable location.</p><h4>Configuration backup</h4><p>Backing up rclone.conf to a save remote location is strongly advised as it contains the (hashed and salted) passwords to restore your encrypted data.</p><p>As you only need to recover your files in case of a major event, I propose to encrypt it and put it to a different cloud storage or maybe even print it and store in a save, remote location. If all your local copies and backups are destroyed or not accessible, your password store, notes or however you try to remember the password and salt might also be gone!</p><p>You could recreate the file using your password and salt in a new rclone config run, but better be safe than sorry. The service account key file (*.json) could be downloaded any time from the Google Cloud Console, so backing it up isn’t required.</p><h3>Difference between copy vs. sync and why versioning is not available</h3><p>Rclone supports several file manipulation commands. I’d like to quickly highlight the difference between copy and sync and make clear that currently there is no snapshot feature!</p><h4>Copy</h4><p>Well, this command copies files, ignoring unchanged ones, utilizing file size and modification time. Important for our use case: this command does never ever delete a file at the target location. Even if the file was deleted at the source. But it does overwrite changed files! I use copy in this guide. See also the<a href="https://rclone.org/commands/rclone_copy/"> official documentation</a>.</p><h4>Sync</h4><p>This command synchronizes the source to the destination. Especially it would also delete files at the destination if deleted at the source. But never the other way around. See also the <a href="https://rclone.org/commands/rclone_sync/">official documentation</a>.</p><h4>Snapshots / versioning</h4><p>Rclone doesn’t support out of the box versioning or snapshot creation!. Changed files will be overwritten on copy instead of versioned! So I recommend not to rely on rclone “backups” only. Make sure your actual backup (e.g. on USB disks, local servers) allows for versioning and use rclone only, if all your backup sources are not / no longer available. Usually this would imply a disaster scenario.</p><p>To give a quick example: if you have a file like important.txt, save it on Monday, change it on Tuesday and want to revert to the Monday version on Wednesday, you cannot do this with rclone. Except you use this work-around which implements a versioning-like behavior, but I don’t use it here (<a href="https://rclone.org/docs/#backup-dir-dir">see official documentation on backup-dir</a>).</p><h3>[Optional] Create your specific run script and schedule for periodic execution</h3><p>I propose to create a script summarizing all required options and schedule periodic execution using crontab.</p><p>In my copy script below, I use two additional options:</p><pre>--config and --bwlimit.</pre><p>The first one is required to point to the rclone.conf file. Remember the standard location for this file gets wiped after reboot on QNAP NAS devices! The second one should limit bandwidth usage to 500 kilobyte. Adjust to your specific uplink environment.</p><p>Please note, bandwidth limitation doesn’t work for me. A quick research showed this might be a common bug. Therefore I use my router to control bandwidth usage by utilizing Quality of Service settings. It is important to keep plenty of spare upload. Otherwise your download might get affected, including e.g. video streaming.</p><h4>My rclone_copy.sh script</h4><pre>#!/bin/sh<br>rclone --config /share/homes/username/rclone/rclone.conf --bwlimit=500k copy --drive-shared-with-me /share/homes/username/documents GDrive_Username_Encrypted:<br>echo -e $(date -u) “ rclone_copy.sh ran” &gt;&gt; /share/homes/username/rclone/rclone.log<br>exit 0</pre><h4>Make script executable</h4><p>Don’t forget to make your rclone_copy.sh script executable on *NIX environments. Usually you use</p><pre>chmod +x /path/to/rclone_copy.sh</pre><h4>Schedule regular execution</h4><p>Last but not least, I propose scheduling using crontab. Usually you would create the crontab entry via crontab -e. But if you do that on a QNAP NAS device your command gets lost! After some confusion I found this description by <a href="https://www.techandme.se/qnap-and-cron/">Daniel Hansson on his Tech and Me blog</a>. Thank you very much! Please follow Daniel’s workaround if you are on QNAP.</p><p>In short you need to:</p><pre>crontab -e<br>// insert your entry (vi-like editor)…<br>// make persistent<br>crontab /etc/config/crontab<br>// reload<br>/etc/init.d/crond.sh restart</pre><p>My crontab entry (running rclone_copy.sh every hour):</p><pre>0 0–23 * * * /share/homes/username/rclone/rclone_copy.sh</pre><p>As my copy script writes to a log file after every execution, you can use this log as a cross check. The alternative is looking at cryptic filenames or counting encrypted files in your Google Drive copy folder :D.</p><h3>Avoid parallel execution during initial upload</h3><p>Depending on the amount of data and your upload capacity, initial copying to Google Drive might take days or weeks. I recommend not to setup a cron job during this time. Multiple rclone instances running in parallel will usually not increase upload efficiency but lead to heavy seeking on your NAS hard disks. You might want to check from time to time if your initial upload is completed, or for potential early script terminations.</p><h3>Whats next?</h3><p>Open a terminal and start building your out of region disaster recovery setup for your most precious local data. Remember: data is only valuable if you have access to it. So please test a restore.</p><p>You could also have a look on further reading recommendations:</p><ul><li><a href="https://www.cloudberrylab.com/resources/blog/choosing-online-backup-storage-google-cloud-storage-vs-google-drive/">Google Cloud Storage and Google Drive — when to choose what</a></li><li><a href="https://medium.com/@abhimanyuPathania/google-drive-service-accounts-and-nodejs-a038b8ec482f">The Matrix — OAuth 2.0, Service Accounts, Google Drive and Node.js</a></li></ul><p>I appreciate your feedback and improvements, like implementing a snapshot feature.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fdfb00f34e8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/rclone-and-google-drive-3fdfb00f34e8">rclone and Google Drive</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>