<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title></title>
    <link rel="self" type="application/atom+xml" href="https://peter.vlasveld.info/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://peter.vlasveld.info"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-05-18T00:00:00+00:00</updated>
    <id>https://peter.vlasveld.info/atom.xml</id>
    <entry xml:lang="en">
        <title>This Article is Slop</title>
        <published>2026-05-18T00:00:00+00:00</published>
        <updated>2026-05-18T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Peter Vlasveld
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://peter.vlasveld.info/blog/this-is-slop/"/>
        <id>https://peter.vlasveld.info/blog/this-is-slop/</id>
        
        <content type="html" xml:base="https://peter.vlasveld.info/blog/this-is-slop/">&lt;p&gt;There was a very &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;lobste.rs&#x2F;s&#x2F;29pm2f&#x2F;llm_generated_submissions_should_be&quot;&gt;hot proposal on lobste.rs&lt;&#x2F;a&gt;
this week. The proposal was to ban users who regularly post &quot;LLM generated article(s)&quot;. It didn&#x27;t surprise me too much
because I feel like, almost every article comment section on that site has some comment to the effect of
&quot;this article smells like it was generated by an LLM&quot;.&lt;&#x2F;p&gt;
&lt;p&gt;Often when you push back on a comment like that, you get a link to the
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Wikipedia:Signs_of_AI_writing&quot;&gt;wikipedia article about signs of AI writing&lt;&#x2F;a&gt;,
which even has a quiz associated with it so that you can test your own AI-dar. Interestingly,
most people who have taken the quiz and published their score, tend to get more than half right.
Neat. Not sure really what that says, since its a sample size of like 20 or whatever, but there you
have it.&lt;&#x2F;p&gt;
&lt;p&gt;Anyway, in this article, I&#x27;d like to dive into this topic, because I feel like I have a bit of a
different take than a lot of people; one which was echoed in a few
obscure comments on the giant lobste.rs thread (linked above), but seems to be missed a lot in the conversation.&lt;&#x2F;p&gt;
&lt;p&gt;One has to ask the question: what do you actually care about when you read an article? In other
words, why do you even start reading an article on the internet to begin with? For me, the answer to
this question usually lies in that I was intrigued to read an article either because it contains
new information to me, and so I might learn something from it. Otherwise, I might read an article
because it contains some philosophical argument that I am interested in reading because I want to
compare it against my current conception of some part of the world.&lt;&#x2F;p&gt;
&lt;p&gt;An example of the first category might be that the article is about a programming language that I
have never heard about, so I might be interested to learn about it.
An example of the second category might be somebody arguing that functional programming is better than
Object Oriented Programming (OOP) (just to use a super cliche example). In this case, I already know what those two
concepts are, but I want to hear the authors argument, so that I can compare it with my opinion
on the subject, and maybe by the end of the article, I&#x27;ll have been convinced. The article you&#x27;re
reading right now, by the way, is also an example of the second category.&lt;&#x2F;p&gt;
&lt;p&gt;So the question becomes: in both of these categories, what are we &lt;em&gt;losing&lt;&#x2F;em&gt; of the article is
generated by an LLM? Taking the first example, suppose I have a new programming language that I built
and I want to share it with the world. &lt;em&gt;Insert excuse for using an LLM here&lt;&#x2F;em&gt;, so I get an LLM to read
the git repo and write an article about. I then go through the article and check for inaccuracies,
and so on. Suffice it to say that that article is mostly LLM generated. However, the article
contains all of the necessary information for somebody to learn about this new language that they
had never heard about before.&lt;&#x2F;p&gt;
&lt;p&gt;Now, take the second example. Bare in mind: LLMs &lt;em&gt;suck&lt;&#x2F;em&gt; at logic (trust me, as someone who has asked
an LLM to edit a philosophy essay for me, and then found out that it actually subtly changed my
argument, I know how bad these things are at reasoning). So in our example suppose I am writing an
argument about functional vs OOP. In any case, the LLM is going to need a lot of help from me to get
the logic right, &lt;em&gt;but&lt;&#x2F;em&gt;, suppose I work with an LLM to write this article and by the end we can say,
over 50% of the text was generated by an LLM, with heavy oversight from me. I&#x27;d still call that an
&quot;LLM generated&quot; article, but the important thing about the article isn&#x27;t that an LLM helped generate
it. It&#x27;s that the logic was actually valid. The article contains a real argument that people (or machines?) can
debate about.&lt;&#x2F;p&gt;
&lt;p&gt;So in both of these examples the LLM was a tool used to generate potentially many paragraphs of text
but the important part wasn&#x27;t the &lt;em&gt;tool&lt;&#x2F;em&gt; that was used -- whether it&#x27;s an LLM or just me and my fingers.
The &lt;em&gt;important&lt;&#x2F;em&gt; part is the actual content. The new information, or the logic contained within. This
is what we should be judging an article on.&lt;&#x2F;p&gt;
&lt;p&gt;This is what gets under my skin when I see a comment (very common on lobste.rs) that is just &quot;this
seems AI generated&quot;. They&#x27;re not making any argument against the article with that statement. If
the article is poorly written, by an LLM or a human, it should be criticized on it&#x27;s contents. Slop
is a real thing, but it&#x27;s clear within the first few minutes of reading a slop article, that the
article isn&#x27;t saying much. You would criticize a &lt;em&gt;human&lt;&#x2F;em&gt; as well for just writing a bunch of non-sense
fluff (believe it or not that&#x27;s something we used to do before we started blaming LLMs for bad writing),
just as much as you should rightfully criticize an LLM generated piece of garbage.&lt;&#x2F;p&gt;
&lt;p&gt;Another point I want to make here before I conclude is that, yes, there are some obvious things
that LLMs do that &lt;em&gt;most&lt;&#x2F;em&gt; native English writers don&#x27;t, at least not anymore. But, that doesn&#x27;t mean
that no human wouldn&#x27;t write like that. As we all know, LLMs are trained on human writing. They
are literally outputting the thing at the very middle of the bell-curve given all of human English
from the internet. Thus, there will be a non-zero set of writers that write that way. It&#x27;s fair to just not
like to read a certain writing style. I have many favorite and not favorite writers of my own. But
to accuse someone of not writing like a human. Come on.&lt;&#x2F;p&gt;
&lt;p&gt;So, I guess all I&#x27;m saying here is, next time you go to comment section with the intention of
complaining that it is slop. Many of us would appreciate if you gave a reason why the content of the
article is unsatisfactory. I&#x27;m also saying that a blanket ban on &quot;LLM generated&quot; content is
ridiculous because of the reasons listed above. That&#x27;s my two cents on this. Thanks for reading.
By the way, I didn&#x27;t use an LLM to write this, but how would you even tell? I could have just instructed
it to write like a me.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Simplifying Local Prefect 2 Testing</title>
        <published>2023-02-18T00:00:00+00:00</published>
        <updated>2023-02-18T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Peter Vlasveld
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://peter.vlasveld.info/blog/simplifying-local-prefect-2-testing/"/>
        <id>https://peter.vlasveld.info/blog/simplifying-local-prefect-2-testing/</id>
        
        <content type="html" xml:base="https://peter.vlasveld.info/blog/simplifying-local-prefect-2-testing/">&lt;p&gt;One thing I don&#x27;t like about a lot of modern orchestration systems is that they do not have easy local testing setup instructions. &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.prefect.io&#x2F;&quot;&gt;Prefect 2&lt;&#x2F;a&gt; is no exception to this. One thing that Prefect does have going for it, is a nice &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;hub.docker.com&#x2F;r&#x2F;prefecthq&#x2F;prefect&quot;&gt;Docker Hub image&lt;&#x2F;a&gt;. Though this image is not very well documented, at least it gives us a starting point for local Prefect docker setup.&lt;&#x2F;p&gt;
&lt;p&gt;Recently, I was working on a &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;fastapi.tiangolo.com&#x2F;&quot;&gt;FastAPI&lt;&#x2F;a&gt; app that uses &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;prefect-client&#x2F;&quot;&gt;prefect-client&lt;&#x2F;a&gt; to talk to the Prefect Cloud API, and I needed a way to test locally to ensure that my app could kick off a Flow Run, wait for the Flow to finish and then retrieve the results back from the Prefect API. The best way to test this would be to have a local Prefect 2 server running with a dummy flow deployed to it that I can use to test with.&lt;&#x2F;p&gt;
&lt;p&gt;Usually when there is a lack of documentation online for a solution, everyone comes up with their own bespoke way of doing it. This was true here as well. I have some colleagues who also needed a local Prefect setup, and they created a nice README on how to set up a local Prefect server running in a Python venv. Their tutorial had me spinning up a local &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;kubernetes.io&#x2F;&quot;&gt;kubernetes&lt;&#x2F;a&gt; cluster inside &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.docker.com&#x2F;products&#x2F;docker-desktop&#x2F;&quot;&gt;Docker Desktop&lt;&#x2F;a&gt; and Prefect would run the flows on it, just like it does in production. It was a really cool local setup, and I&#x27;m sure that it is worth it for certain purposes where you need to test compute-heavy, complicated workflows.&lt;&#x2F;p&gt;
&lt;p&gt;However, this was not the case for me, and the kubernetes approach was highly complicated. It also had the drawback of not being containerized and you had to run a bunch of different commands. If something got messed up, you had to run more commands to try and reset it. This didn&#x27;t jive with how I like to work. When I write an app, I want my fellow developers to be able to just pull my repo, &lt;code&gt;docker compose up&lt;&#x2F;code&gt;, and boom, working local app. So I set out to make my own bespoke way of running Prefect 2 locally, and my intention was to make it as simple as possible.&lt;&#x2F;p&gt;
&lt;p&gt;The approach I will describe below is available on my gitlab page &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;fizzizist&#x2F;toy-local-prefect&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;docker-compose&quot;&gt;Docker Compose&lt;&#x2F;h2&gt;
&lt;p&gt;I love docker compose. It&#x27;s the ultimate way to set it and forget it. So, the first thing I did when looking to fix this problem was to Google if there were any existing Prefect 2 docker compose setups online. Indeed there are, and I found &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rpeden&#x2F;prefect-docker-compose&quot;&gt;this one&lt;&#x2F;a&gt; to be particularly helpful. You&#x27;ll find that the components I use in my &lt;code&gt;docker-compose.yml&lt;&#x2F;code&gt; are almost identical to that example, but there are some notable differences that I should explain.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-fastapi-app&quot;&gt;The FastAPI app&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #F8F8F2; background-color: #272822;&quot;&gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;web&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    build&lt;&#x2F;span&gt;&lt;span&gt;: &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;      context&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt; .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;      target&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; web&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    command&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; uvicorn main:app --host 0.0.0.0 --port 8000 --reload&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    ports&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; 8001:8000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    env_file&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; .env&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    volumes&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; .&#x2F;:&#x2F;app&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; .&#x2F;.prefect:&#x2F;root&#x2F;.prefect&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This looks pretty much like your typical FastAPI docker compose. We use the &lt;code&gt;Dockerfile&lt;&#x2F;code&gt; to install our Python dependencies, and &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.uvicorn.org&#x2F;&quot;&gt;uvicorn&lt;&#x2F;a&gt; to host the server. The only thing to note here is that we are mounting the &lt;code&gt;.prefect&lt;&#x2F;code&gt; folder to this container. You will see that we will mount this same folder to all of the prefect containers as well. This is because, since we want to keep this setup as simple as possible, I opted to just use the local disk for all storage. If you have bucket storage readily available, that would work too, but this tutorial assumes that you are working with nothing other than your local system. The other option would be to use another s3 container like &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;min.io&#x2F;&quot;&gt;MinIO&lt;&#x2F;a&gt;, as you&#x27;ll see in the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rpeden&#x2F;prefect-docker-compose&quot;&gt;rpeden example&lt;&#x2F;a&gt;, but again, that adds more complexity to our setup that we don&#x27;t really need.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-prefect-2-server&quot;&gt;The Prefect 2 Server&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #F8F8F2; background-color: #272822;&quot;&gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;prefect-server&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    image&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; prefecthq&#x2F;prefect:2-python3.11&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    ports&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; 4200:4200&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    command&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; prefect server start&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    volumes&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; .&#x2F;.prefect:&#x2F;root&#x2F;.prefect&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    environment&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; PREFECT_UI_URL=http:&#x2F;&#x2F;127.0.0.1:4200&#x2F;api&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; PREFECT_API_URL=http:&#x2F;&#x2F;127.0.0.1:4200&#x2F;api&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; PREFECT_SERVER_API_HOST=0.0.0.0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;hub.docker.com&#x2F;u&#x2F;prefecthq&quot;&gt;prefecthq docker hub&lt;&#x2F;a&gt; has a bunch of images, but most of them have gone years without updates. There is now only 1 image that can be used as a server, a worker, and even a client, and that&#x27;s &lt;code&gt;prefecthq&#x2F;prefect&lt;&#x2F;code&gt;. Be sure to choose the tag wisely though as &lt;code&gt;latest&lt;&#x2F;code&gt; may not point to what you&#x27;re looking for. Here we are using &lt;code&gt;2-python3.11&lt;&#x2F;code&gt; which will update to any &lt;code&gt;2.*&lt;&#x2F;code&gt; prefect version but pin the Python version since everything else in our project  is on Python 3.11.&lt;&#x2F;p&gt;
&lt;p&gt;Port 4200 allows us to access the Prefect 2 dashboard while we are running the app. Again, we are mounting the same &lt;code&gt;.prefect&lt;&#x2F;code&gt; volume, and we have extra environment variables for the server. This configuration is pretty much a copy from the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rpeden&#x2F;prefect-docker-compose&quot;&gt;rpeden example&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-prefect-2-worker&quot;&gt;The Prefect 2 Worker&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #F8F8F2; background-color: #272822;&quot;&gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;prefect-worker&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    build&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;      context&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt; .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;      target&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; worker&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    command&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; prefect worker start --pool test-process-pool&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    depends_on&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; prefect-server&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    environment&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; PREFECT_API_URL=http:&#x2F;&#x2F;prefect-server:4200&#x2F;api&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    volumes&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; .&#x2F;flows:&#x2F;root&#x2F;flows&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; .&#x2F;.prefect:&#x2F;root&#x2F;.prefect&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;    restart&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; always&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Same volume mount here, but we also mount the flow code. This is because we are using the disk as the storage for the flow code as well as the output. The flow code is in the &lt;code&gt;flows&lt;&#x2F;code&gt; directory, and the flow output will be dumped into &lt;code&gt;.prefect&#x2F;storage&lt;&#x2F;code&gt;. That&#x27;s why &lt;code&gt;.prefect&lt;&#x2F;code&gt; needs to be available to the fastapi app, so that it can be read by &lt;code&gt;prefect-client&lt;&#x2F;code&gt;. The reason we have a build step here, is just to install any Python dependencies that are needed inside the flow.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;two-commands-and-that-s-it&quot;&gt;Two Commands and That&#x27;s It&lt;&#x2F;h2&gt;
&lt;p&gt;I wanted to be able to just &lt;code&gt;docker compose up&lt;&#x2F;code&gt;, and maybe that is still possible, but for now 2 commands will suffice. Just like provisioning a database, you don&#x27;t really want to be redeploying your flow every time that you &lt;code&gt;docker compose up&lt;&#x2F;code&gt;, so I wrote a short &lt;code&gt;bash&lt;&#x2F;code&gt; script that needs to be run to spin up the worker pool and deploy the flow.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #F8F8F2; background-color: #272822;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; creating worker pool&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;prefect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; work-pool create&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt; -t&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; process test-process-pool&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; deploying test flow&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;prefect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt; --no-prompt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; deploy&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt; --name&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;return a df&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt; --pool&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; test-process-pool &#x2F;root&#x2F;flows&#x2F;test_flows.py:return_a_df&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;prefect deploy&lt;&#x2F;code&gt; command is pretty nice. It will infer most stuff, so you don&#x27;t have to explicitly define too much, especially for a basic setup like this.&lt;&#x2F;p&gt;
&lt;p&gt;So then, all one needs to do to run this whole thing is:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #F8F8F2; background-color: #272822;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; compose run prefect-worker bash &#x2F;root&#x2F;flows&#x2F;deploy.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; compose up&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;That&#x27;s just how I like it. Nice and simple. No kubernetes, no giant yaml files, and no &quot;it works on my machine&quot; issues.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;&#x2F;h2&gt;
&lt;p&gt;I&#x27;m not saying that this is the right setup for everybody. If you are testing a large system that spins up a bunch of nested flows and tasks on k8s, then you probably want to replicate that locally. But if you are testing something that just talks to Prefect 2, then I would argue that this is all you really need. Just add those 2 prefect containers, make sure they all share that &lt;code&gt;.prefect&lt;&#x2F;code&gt; directory, and you&#x27;re pretty much good to go.&lt;&#x2F;p&gt;
&lt;p&gt;Feel free to reach out if you found this helpful, have questions, or if you want to share an even better setup :)&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Bright Green Lies and the Fermi Paradox</title>
        <published>2022-05-12T00:00:00+00:00</published>
        <updated>2022-05-12T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Peter Vlasveld
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://peter.vlasveld.info/blog/bright-green-lies-reflection/"/>
        <id>https://peter.vlasveld.info/blog/bright-green-lies-reflection/</id>
        
        <content type="html" xml:base="https://peter.vlasveld.info/blog/bright-green-lies-reflection/">&lt;p&gt;I just finished reading &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;libro.fm&#x2F;audiobooks&#x2F;9781666154122&quot;&gt;Bright Green Lies&lt;&#x2F;a&gt; by Derrick Jensen, Lierre Keith and Max Wilbert. I really love when a book completely changes my perspective on a topic. This book did just that. Like many others, I have been concerned for quite some time about the environment and about climate change. My thinking has always been that, since it&#x27;s futile to expect governments or businesses to do the right thing for curbing emissions, then the only solution to the problem is for us to engineer our way out of it. In other words, I always thought that if we built enough green technology, it would be the only way to solve the problem. This book takes that notion, and thrashes it against a wall.&lt;&#x2F;p&gt;
&lt;p&gt;The authors systematically take all of those technologies that I thought were going to save the planet, and show me how much damage they do to the planet they are trying to save. This is quite a devistating revelation for me because, I thought that those technologies are our &lt;em&gt;last&lt;&#x2F;em&gt; hope. Fossil fuels will continue to be burned, capitalist industrialism will press on, whether I like it or not. If there is nothing that humans can do to steer the market in the positive direction, then we are truly fucked as a species.&lt;&#x2F;p&gt;
&lt;p&gt;With all of the doom and gloom of the first 14 chapters of the book, I was hoping that the last chapter would have some golden nugget. A way to solve this problem in some kind of systematic way. If I have any criticism of the book, I say it falls short in really clearly laying out the answer. The authors say that we need to stop burning fossil fuels completely, and they also talk about some really interesting work being done with sequestering carbon in soils. That&#x27;s all well and good, but we are &lt;em&gt;never&lt;&#x2F;em&gt; getting off of fossil fuels. It&#x27;s just not going to happen. The book itself even lays out in many chapters why it will never happen. Essentially all this book is showing us  is how fucked we are. The solution is one that is unattainable from a game theory perspective.&lt;&#x2F;p&gt;
&lt;p&gt;So I guess now that this book has taken away my last hope for solving climate change, I will go back to my old doom and gloom stance that, due to factors out of my control, there is nothing that can be done.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;reflection-on-the-fermi-paradox&quot;&gt;Reflection on the Fermi Paradox&lt;&#x2F;h2&gt;
&lt;p&gt;The above reflection on the book makes me really think broadly about humans and the path that we are headed toward. I&#x27;ve always been fascinated by the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Fermi_paradox&quot;&gt;Fermi Paradox&lt;&#x2F;a&gt;. In a nutshell, the Fermi Paradox states that, given the probability of intelligent life forming on a planet, and given the sheer number of planets in the galaxy, you would think that we would have run into another civilization by now. This hasn&#x27;t happened, so that&#x27;s contradictory. There have been countless hypotheses about why this may be the case. My favorite has always bee the &quot;Dark Forest&quot; hypothesis, which essentially states that civilizations would be hesitant to attempt communication with each other given that you don&#x27;t know if a civilization is friendly or not, so you don&#x27;t want to risk annihilation.&lt;&#x2F;p&gt;
&lt;p&gt;Thinking about Bright Green Lies, and the whole issue with game theory, and climate change, it makes me think that what is really true about intelligent civilizations, is that there are just not enough resources to grow past your own planet. The human race has been growing and growing. We are at something like 7 billion people now, and our industrial processes have completely thrown this planet off balance. We are now due for a devistating course correction that will likely wipe out a bunch of our species and reset us to a less modern state (a state that the book argues, we should willfully go to, so as to minimize the death toll). If we again attempt to rebuild, we can only go so far before this happens again. We have gone way beyond our &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Carrying_capacity&quot;&gt;carrying capacity&lt;&#x2F;a&gt;, and we won&#x27;t make it off world, because every time we try, the earth will need to correct for all of the devistation that we create. Therefore, maybe it&#x27;s just not physically possible for a civilization to exploit their planets resources enough to actually colonize an entire solar system, let alone outside of a solar system.&lt;&#x2F;p&gt;
&lt;p&gt;If we think about the conditions that need to be met for life to leave its own planet, it would shrink the probability of space-faring civilization possibly to 0. You not only need a planet capable of growing life, i.e. within it&#x27;s &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Circumstellar_habitable_zone&quot;&gt;goldilocks zone&lt;&#x2F;a&gt;. You also need a species to develop that is intelligent. Then, you need the planet to have enough resources available such that, that intelligent lifeform can colonize surrounding uninhabitable planets and be able to sustain itself on those. Those outer colonizations would also probably cost more energy than the civilization on the habitable planet, because you would need to maintain a habitable infrastructure. It&#x27;s possible that this would actually shrink the probability significantly, to the point where it makes total sense why we haven&#x27;t seen any other civilizations, and why we aren&#x27;t all living inside of a grand &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Galactic_empire&quot;&gt;galactic empire&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;&#x2F;h2&gt;
&lt;p&gt;A bit morbidly, the thought that our civilization is doomed to fail is a bit freeing. At this point, it is out of my control. There is nothing that one person can do, especially someone who is not a politician or a billionaire, that can have even a remote positive effect on the trajectory that we are headed toward. I admire people like &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Greta_Thunberg&quot;&gt;Greta Thunberg&lt;&#x2F;a&gt; who are really getting their voices heard and starting movements across the globe, but we still don&#x27;t see politicians taking this seriously, and the only concern of entrepeneurs is to line their own pockets.&lt;&#x2F;p&gt;
&lt;p&gt;Elon Musk wants to &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.cnbc.com&#x2F;2021&#x2F;12&#x2F;15&#x2F;elon-musk-surprised-if-were-not-landing-on-mars-within-five-years.html&quot;&gt;colonize Mars&lt;&#x2F;a&gt;, but I think it would make more sense to colonize Earth. Start building the same shelters you were planning for Mars right here, because we are going to need them sooner than you think. My plan is to try my best to reduce, re-use, and recycle, but at the end of the day, its up to the people running the factories and the governments to make the real change.&lt;&#x2F;p&gt;
&lt;p&gt;Many moral questions come to mind here, such as: Is it okay to bring a child into a world that is in this state? Is violent activism justified when the stakes are this high? These topics warrant a full article of their own, but suffice to say that I worry deeply for the well-being of future generations, and I think violence as a result of climate change is not only inevitable, but &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.dw.com&#x2F;en&#x2F;how-climate-change-paved-the-way-to-war-in-syria&#x2F;a-56711650&quot;&gt;has already been taking place&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;As always, I encourage feedback and discussion on these topics. Feel free to send me an email with your thoughts, and remember to share this article with others if you found it interesting or thought provoking.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Setting Slack Status with PomoDoneApp using Google App Scripts</title>
        <published>2021-02-24T00:00:00+00:00</published>
        <updated>2021-02-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Peter Vlasveld
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://peter.vlasveld.info/blog/slack-status-from-pomodoneapp-tutorial/"/>
        <id>https://peter.vlasveld.info/blog/slack-status-from-pomodoneapp-tutorial/</id>
        
        <content type="html" xml:base="https://peter.vlasveld.info/blog/slack-status-from-pomodoneapp-tutorial/">&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Edit: Home-grown Solution&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;2022-03-13&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Since creating the above scripts, I set out to find a solution that I could host at home instead of relying on Google servers to run it. I ended up creating &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;fizzizist&#x2F;pomodone-slack-bridge&quot;&gt;this Flask app&lt;&#x2F;a&gt;, which is essentially a python rendition of the above scripts. I run this at home on a Raspi 4 now. It can easily be run on any cloud VM as well, but in that case, it&#x27;s probably cheaper to just continue using the Google script. If you&#x27;d like to use this app instead, you can follow the README to get it up and running.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h2 id=&quot;original-article&quot;&gt;Original Article&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;pomodoneapp.com&#x2F;&quot;&gt;PomoDoneApp&lt;&#x2F;a&gt; is an app that I use on a regular basis to keep myself on task, and monitor my productivity. The thing that really sets it apart from other similar apps is all of the built-in integrations with many of the popular productivity tools like Trello, Todoist, Slack, JIRA and so on.&lt;&#x2F;p&gt;
&lt;p&gt;The built-in slack integration uses a public Slack bot, which has the ability to post in slack channels, but is unable to set a user&#x27;s status. Personally, when I am working, I like to set my status to let my co-workers know not to bother me, or at least let them know why I am not replying to their messages. So, when I originally started using the app, I used their integration with Zapier to make zaps that would change my status automatically. This is very easy to set up and works great, but if, like me, you don&#x27;t want to spend 25 dollars a month for a Zapier membership, then you are limited to 100 &quot;tasks&quot; per month, which really isn&#x27;t enough if you are changing your status many times throughout the day.&lt;&#x2F;p&gt;
&lt;p&gt;So I went searching for free solutions. I figured that Zapier must be using some API to do what it is doing, so I should be able to use that same API with something that I have developed myself. The PomoDoneApp API has basically know documentation, so I had to reach out to the PomoDoneApp team to ask them how to use their API. I am using &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;script.google.com&#x2F;&quot;&gt;Google API scripts&lt;&#x2F;a&gt; in this tutorial, but if you don&#x27;t want to use Google, this can easily be adapted to use something home-grown. I am planning on doing that in the future, but the Google solution works well enough for the time being.&lt;&#x2F;p&gt;
&lt;p&gt;The Google scripts that I am using here are adapted from &lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;pmdn.co&#x2F;webhooks4todoist&quot;&gt;this google doc&lt;&#x2F;a&gt; that was sent to me by Alex Mauzon of the PomoDoneApp Team, so kudos to him for helping me get this up and running.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;creating-a-slack-bot&quot;&gt;Creating a slack bot&lt;&#x2F;h2&gt;
&lt;p&gt;The first thing that needs to be done, is you need to create a slack bot that is capable of changing your status. You can do this by going to the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;api.slack.com&#x2F;apps&quot;&gt;Apps dashboard on api.slack.com&lt;&#x2F;a&gt;. There you can create a new app. You then just need to go to the &lt;code&gt;OAuth &amp;amp; Permissions&lt;&#x2F;code&gt; section in the left sidebar and add &lt;code&gt;users.profile:write&lt;&#x2F;code&gt; scope in the &lt;code&gt;User Token Scopes&lt;&#x2F;code&gt; section under &lt;code&gt;Scopes&lt;&#x2F;code&gt;. Then you can scroll up to the &lt;code&gt;OAuth Tokens for Your Workscape&lt;&#x2F;code&gt; section, install the app, and get the &lt;code&gt;User OAuth Token&lt;&#x2F;code&gt;. This token should begin with &lt;code&gt;xoxp&lt;&#x2F;code&gt;. Once you have that token, you are ready to create your scripts.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;creating-the-google-app-scripts-scripts&quot;&gt;Creating the Google App Scripts scripts&lt;&#x2F;h2&gt;
&lt;p&gt;Go to &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;script.google.com&#x2F;&quot;&gt;script.google.com&lt;&#x2F;a&gt; and make sure to sign in with your Google Account. Then create a new project. The project will be created with a blank &lt;code&gt;.gs&lt;&#x2F;code&gt; script called &lt;code&gt;Code.gs&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #F8F8F2; background-color: #272822;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; myFunction&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;the-slack-status-script&quot;&gt;The slack status script&lt;&#x2F;h3&gt;
&lt;p&gt;Change &lt;code&gt;myFunction&lt;&#x2F;code&gt; to &lt;code&gt;testSetStatus&lt;&#x2F;code&gt; and create another function called &lt;code&gt;setStatus&lt;&#x2F;code&gt; that looks like the one below.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #F8F8F2; background-color: #272822;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span&gt; APITOKEN&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;xoxp-my-token&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; testSetStatus&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;  setStatus&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;&amp;#39;test status&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;:man-shrugging&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; setStatus&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FD971F;font-style: italic;&quot;&gt;status&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FD971F;font-style: italic;&quot;&gt; emoji&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FD971F;font-style: italic;&quot;&gt; timeEnd&lt;&#x2F;span&gt;&lt;span&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; header&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;quot;Content-Type&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;application&#x2F;json; charset=utf-8&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;	&amp;quot;Authorization&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;Bearer &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; APITOKEN,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; payload&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;quot;profile&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;      &amp;quot;status_text&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: status,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;      &amp;quot;status_emoji&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: emoji,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;      &amp;quot;status_expiration&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: timeEnd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; options&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;method&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; :&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;post&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;headers&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; : header,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;muteHttpExceptions&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;payload&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;: JSON.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;stringify&lt;&#x2F;span&gt;&lt;span&gt;(payload)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; url2fetch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;https:&#x2F;&#x2F;cyclicarx.slack.com&#x2F;api&#x2F;users.profile.set&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  response&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; UrlFetchApp.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;fetch&lt;&#x2F;span&gt;&lt;span&gt;(url2fetch, options);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  console.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;log&lt;&#x2F;span&gt;&lt;span&gt;(response.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;getContentText&lt;&#x2F;span&gt;&lt;span&gt;())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You can then open the &lt;code&gt;Execution log&lt;&#x2F;code&gt;, select &lt;code&gt;testSetStatus&lt;&#x2F;code&gt; from the menu bar and hit &lt;code&gt;Run&lt;&#x2F;code&gt;. If you set up your slack bot correctly, you should see your slack status change to &quot;test status&quot;. If the request is unsuccessful, there will be a console message showing the response data which should give you some idea why it didn&#x27;t work.&lt;&#x2F;p&gt;
&lt;p&gt;If this was successful, it&#x27;s time to set up the PomoDoneApp side of things. First add another function to &lt;code&gt;Code.gs&lt;&#x2F;code&gt; called &lt;code&gt;doPost&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #F8F8F2; background-color: #272822;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88846F;&quot;&gt;&#x2F;*&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88846F;&quot;&gt; * Function run when pomodoneapp posts event to google script&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88846F;&quot;&gt; *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; doPost&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FD971F;font-style: italic;&quot;&gt;e&lt;&#x2F;span&gt;&lt;span&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span&gt;(e.postData){&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; myData&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; JSON.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;parse&lt;&#x2F;span&gt;&lt;span&gt;(e.postData.contents);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span&gt;(myData){&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; pdEvent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; myData.eventType;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88846F;&quot;&gt; &#x2F;&#x2F; timerStart, timerStop, cardDone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; pdTaskName&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; myData.name;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88846F;&quot;&gt; &#x2F;&#x2F; &amp;quot;Your Task Name&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; pdTimerSize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; myData.minutes;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88846F;&quot;&gt; &#x2F;&#x2F; Duration of the timer, e.g. 5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span&gt;(pdEvent.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;toLowerCase&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;timerstop&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;){&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88846F;&quot;&gt;    &#x2F;&#x2F; Run on timerstop event&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; response&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; setStatus&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;&amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span&gt;(pdEvent.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;toLowerCase&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;timerstart&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;){&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88846F;&quot;&gt;    &#x2F;&#x2F; Run on timerstart event&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; timeEnd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; Math.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;floor&lt;&#x2F;span&gt;&lt;span&gt;(Date.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt;1000&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; (pdTimerSize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;*&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt;60&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; response&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; setStatus&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;      &amp;#39;Working on &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; pdTaskName&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39; for the next &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; pdTimerSize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39; minutes.&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;      &amp;#39;:thinking_face:&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;, timeEnd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    );&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This is the function that will be run by the PomoDoneApp. When the timer is stopped, it sends a blank status update, effectively clearing the status, and when the timer starts, it uses the name of the event and the time in minutes to generate an expiry for the status.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-pomodoneapp-registration-script&quot;&gt;The PomoDoneApp Registration Script&lt;&#x2F;h3&gt;
&lt;p&gt;Now that we have a scipt that can change our slack status, we need to tell PomoDoneApp to use it. Press the &lt;code&gt;+&lt;&#x2F;code&gt; symbol in the &lt;code&gt;Files&lt;&#x2F;code&gt; section of the left sidebar and select &lt;code&gt;Script&lt;&#x2F;code&gt;. Call it whatever you want. Mine is called &lt;code&gt;pgHookReg.gs&lt;&#x2F;code&gt;. You will be presented with a new file with the same &lt;code&gt;myFunction&lt;&#x2F;code&gt; function in it.&lt;&#x2F;p&gt;
&lt;p&gt;We&#x27;ll need 4 constants for this file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #F8F8F2; background-color: #272822;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span&gt; MYAPIKEY&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;my-pomodoneapp-API-key&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span&gt; MYINTEGRATIONNAME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;gsheet&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span&gt; EVENTTOADD&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;timerStart&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span&gt; DEPLOYMENTID&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;my-deploy-id&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;DEPLOYMENTID&lt;&#x2F;code&gt; can be filled in after we deploy the script. &lt;code&gt;MYAPIKEY&lt;&#x2F;code&gt; can be found in your PomoDoneApp account. You have to go to &lt;code&gt;My Settings&lt;&#x2F;code&gt; and look for &lt;code&gt;Your API Key&lt;&#x2F;code&gt; section.&lt;&#x2F;p&gt;
&lt;p&gt;Next we need a function for registering the webhook with pomodoneapp:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #F8F8F2; background-color: #272822;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; registerWebHook&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; header&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;&amp;quot;Content-Type&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;application&#x2F;json&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; payload&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;quot;subscription_url&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;registered By Google Script&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;quot;target_url&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;https:&#x2F;&#x2F;script.google.com&#x2F;macros&#x2F;s&#x2F;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; DEPLOYMENTID&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;&#x2F;exec&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;quot;event&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: EVENTTOADD&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; options&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;method&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; :&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;POST&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;header&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; : header,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;payload&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;: JSON.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;stringify&lt;&#x2F;span&gt;&lt;span&gt;(payload)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; url2fetch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;https:&#x2F;&#x2F;my.pomodoneapp.com&#x2F;integration&#x2F;authorize&#x2F;?integration=&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    MYINTEGRATIONNAME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;&amp;amp;params[api_key]=&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; MYAPIKEY;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  response&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; UrlFetchApp.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;fetch&lt;&#x2F;span&gt;&lt;span&gt;(url2fetch, options);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We&#x27;ll also want a function to remove the web hook if we want to change something in the future:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #F8F8F2; background-color: #272822;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; removeAllWebHooks&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; header&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;&amp;quot;Content-Type&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;application&#x2F;json&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; payload&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;quot;target_url&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;https:&#x2F;&#x2F;script.google.com&#x2F;macros&#x2F;s&#x2F;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; DEPLOYMENTID&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;&#x2F;exec&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; options&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;method&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; :&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;POST&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;header&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; : header,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;payload&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;: JSON.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;stringify&lt;&#x2F;span&gt;&lt;span&gt;(payload)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; url2fetch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;https:&#x2F;&#x2F;my.pomodoneapp.com&#x2F;integration&#x2F;remove&#x2F;?integration=&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    MYINTEGRATIONNAME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;&amp;amp;params[api_key]=&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;+&lt;&#x2F;span&gt;&lt;span&gt;MYAPIKEY;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  response&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; UrlFetchApp.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;fetch&lt;&#x2F;span&gt;&lt;span&gt;(url2fetch, options);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;deploying-the-scripts&quot;&gt;Deploying the scripts&lt;&#x2F;h3&gt;
&lt;p&gt;At this point your scripts should look like this:
&lt;code&gt;Code.gs&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #F8F8F2; background-color: #272822;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span&gt; APITOKEN&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;xoxp-my-token&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; testSetStatus&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;  setStatus&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;&amp;#39;test status&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;:man-shrugging&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; setStatus&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FD971F;font-style: italic;&quot;&gt;status&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FD971F;font-style: italic;&quot;&gt; emoji&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FD971F;font-style: italic;&quot;&gt; timeEnd&lt;&#x2F;span&gt;&lt;span&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; header&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;quot;Content-Type&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;application&#x2F;json; charset=utf-8&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;	&amp;quot;Authorization&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;Bearer &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; APITOKEN,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; payload&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;quot;profile&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;      &amp;quot;status_text&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: status,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;      &amp;quot;status_emoji&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: emoji,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;      &amp;quot;status_expiration&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: timeEnd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; options&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;method&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; :&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;post&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;headers&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; : header,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;muteHttpExceptions&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;payload&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;: JSON.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;stringify&lt;&#x2F;span&gt;&lt;span&gt;(payload)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; url2fetch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;https:&#x2F;&#x2F;cyclicarx.slack.com&#x2F;api&#x2F;users.profile.set&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  response&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; UrlFetchApp.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;fetch&lt;&#x2F;span&gt;&lt;span&gt;(url2fetch, options);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  console.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;log&lt;&#x2F;span&gt;&lt;span&gt;(response.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;getContentText&lt;&#x2F;span&gt;&lt;span&gt;())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88846F;&quot;&gt;&#x2F;*&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88846F;&quot;&gt; * Function run when pomodoneapp posts event to google script&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88846F;&quot;&gt; *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; doPost&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FD971F;font-style: italic;&quot;&gt;e&lt;&#x2F;span&gt;&lt;span&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span&gt;(e.postData){&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; myData&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; JSON.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;parse&lt;&#x2F;span&gt;&lt;span&gt;(e.postData.contents);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span&gt;(myData){&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; pdEvent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; myData.eventType;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88846F;&quot;&gt; &#x2F;&#x2F; timerStart, timerStop, cardDone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; pdTaskName&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; myData.name;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88846F;&quot;&gt; &#x2F;&#x2F; &amp;quot;Your Task Name&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; pdTimerSize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; myData.minutes;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #88846F;&quot;&gt; &#x2F;&#x2F; Duration of the timer, e.g. 5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span&gt;(pdEvent.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;toLowerCase&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;timerstop&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;){&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88846F;&quot;&gt;    &#x2F;&#x2F; Run on timerstop event&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; response&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; setStatus&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;&amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span&gt;(pdEvent.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;toLowerCase&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;timerstart&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;){&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #88846F;&quot;&gt;    &#x2F;&#x2F; Run on timerstart event&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; timeEnd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; Math.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;floor&lt;&#x2F;span&gt;&lt;span&gt;(Date.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt;1000&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; (pdTimerSize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;*&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt;60&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;    var&lt;&#x2F;span&gt;&lt;span&gt; response&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; setStatus&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;      &amp;#39;Working on &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; pdTaskName&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39; for the next &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; pdTimerSize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39; minutes.&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;      &amp;#39;:thinking_face:&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;, timeEnd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AE81FF;&quot;&gt;    54&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;pgHookReg.gs&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #F8F8F2; background-color: #272822;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span&gt; MYAPIKEY&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;my-pomodoneapp-API-key&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span&gt; MYINTEGRATIONNAME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;gsheet&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span&gt; EVENTTOADD&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;timerStart&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span&gt; DEPLOYMENTID&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;my-deploy-id&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; registerWebHook&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; header&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;&amp;quot;Content-Type&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;application&#x2F;json&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; payload&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;quot;subscription_url&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;registered By Google Script&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;quot;target_url&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;https:&#x2F;&#x2F;script.google.com&#x2F;macros&#x2F;s&#x2F;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; DEPLOYMENTID&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;&#x2F;exec&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;quot;event&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: EVENTTOADD&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; options&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;method&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; :&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;POST&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;header&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; : header,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;payload&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;: JSON.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;stringify&lt;&#x2F;span&gt;&lt;span&gt;(payload)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; url2fetch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;https:&#x2F;&#x2F;my.pomodoneapp.com&#x2F;integration&#x2F;authorize&#x2F;?integration=&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    MYINTEGRATIONNAME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;&amp;amp;params[api_key]=&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; MYAPIKEY;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  response&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; UrlFetchApp.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;fetch&lt;&#x2F;span&gt;&lt;span&gt;(url2fetch, options);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt; removeAllWebHooks&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; header&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;&amp;quot;Content-Type&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;application&#x2F;json&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; payload&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;quot;target_url&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;https:&#x2F;&#x2F;script.google.com&#x2F;macros&#x2F;s&#x2F;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; DEPLOYMENTID&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;quot;&#x2F;exec&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; options&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;method&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; :&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;POST&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;header&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; : header,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt;    &amp;#39;payload&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;: JSON.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;stringify&lt;&#x2F;span&gt;&lt;span&gt;(payload)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #66D9EF;font-style: italic;&quot;&gt;  var&lt;&#x2F;span&gt;&lt;span&gt; url2fetch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;https:&#x2F;&#x2F;my.pomodoneapp.com&#x2F;integration&#x2F;remove&#x2F;?integration=&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    MYINTEGRATIONNAME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6DB74;&quot;&gt; &amp;#39;&amp;amp;params[api_key]=&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt;+&lt;&#x2F;span&gt;&lt;span&gt;MYAPIKEY;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  response&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F92672;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; UrlFetchApp.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E22E;&quot;&gt;fetch&lt;&#x2F;span&gt;&lt;span&gt;(url2fetch, options);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we need to deploy. In the top right of the editor window, you should see a big blue &lt;code&gt;Deploy&lt;&#x2F;code&gt; button. Click that and select &lt;code&gt;New deployment&lt;&#x2F;code&gt;. The type should be &lt;code&gt;Web app&lt;&#x2F;code&gt;. Give it any description that you&#x27;d like and hit &lt;code&gt;Deploy&lt;&#x2F;code&gt;. Once it is deployed you will be given a deployment ID that you can put into the &lt;code&gt;DEPLOYMENTID&lt;&#x2F;code&gt; parameter in &lt;code&gt;pgHookReg.gs&lt;&#x2F;code&gt;. All you need to do now is open &lt;code&gt;Execution log&lt;&#x2F;code&gt;, select &lt;code&gt;registerWebHook&lt;&#x2F;code&gt; from the dropdown at the top bar and hit &lt;code&gt;Run&lt;&#x2F;code&gt;. If there is no error, then the webhook should now be registered. Test that its working by opening the pomodoneapp and running a timer. You should then see your status change.&lt;&#x2F;p&gt;
&lt;p&gt;Now we have the scripts deployed and the &lt;code&gt;&#x27;timerStart&#x27;&lt;&#x2F;code&gt; event registered, but we still need to add a &lt;code&gt;&#x27;timerStop&#x27;&lt;&#x2F;code&gt; hook. Change &lt;code&gt;EVENTTOADD&lt;&#x2F;code&gt; to &lt;code&gt;&#x27;timerStop&#x27;&lt;&#x2F;code&gt; and run &lt;code&gt;registerWebHook&lt;&#x2F;code&gt; again. Then stop the timer in your pomodone app and you should see your status clear.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>On the Moral Permissibility of Human Embryo Editing Technology in Canada</title>
        <published>2017-09-26T00:00:00+00:00</published>
        <updated>2017-09-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Peter Vlasveld
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://peter.vlasveld.info/blog/on-the-moral-permissibility-of-human-embryo-editing-in-canada/"/>
        <id>https://peter.vlasveld.info/blog/on-the-moral-permissibility-of-human-embryo-editing-in-canada/</id>
        
        <content type="html" xml:base="https://peter.vlasveld.info/blog/on-the-moral-permissibility-of-human-embryo-editing-in-canada/">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;&#x2F;h2&gt;
&lt;p&gt;The CRISPR&#x2F;Cas9 system is a new DNA editing technology with a host of applications from the editing of DNA for use in agriculture (Butler et al., 2015), to the editing of DNA in human embryos (Liang et al., 2015). In the following pages, the focus will be on its use on human embryos within a Canadian health care context. It will be argued that it will be morally permissible to use this technology on human embryos, but with hard and fast regulations such that it may only be used for disease prevention and only if the technology is available through &lt;em&gt;in vitro&lt;&#x2F;em&gt; fertilization (IVF) and &lt;em&gt;in utero&lt;&#x2F;em&gt; treatments. A brief summary of the state of the technology will first be laid out. The moral question being examined will then be analysed using a few of the most popular ethical theories in the literature. Through this examination, it should be clear that whether you are a deontologist, a consequentialist, or a principlist, you can still get behind the idea that the use of this technology would be a force for good in the Canadian health care context as long as it is used within a certain ethical framework.&lt;&#x2F;p&gt;
&lt;p&gt;Before getting into the ethical question at hand, it is important to give some background of the technology. To summarize the CRISPR&#x2F;Cas9 system, cas9 is a protein that cuts strands of DNA, and CRISPRs are strands of repeating RNA that help guide the Cas9 protein to its cutting site (Jinek et al., 2012). The use of these two molecules in conjunction allows for the cutting out of DNA sequences or the adding in of new ones (Jinek et al., 2012). This process occurs naturally in bacteria and archaea as an immune response, cutting foreign strands of DNA such as that of viruses (Jinek et al., 2012).&lt;&#x2F;p&gt;
&lt;p&gt;The use of this technology for the editing of human embryos is currently in the stage of the laboratory. Only two countries have currently given approval for scientists to use the technology on human embryos. These countries are Britain and China. The US was recently given approval to use CRISPR&#x2F;Cas9 on human immune cells in an effort to fight against certain cancers (Reardon 2016). Chinese scientists, Liang et al. (2015), were the first to successfully edit a human embryo, but showed that there is still much work to be done before clinical application would be possible.&lt;&#x2F;p&gt;
&lt;p&gt;Not everyone agrees that we should be embarking down this path. Lanphier et al. (2015) wrote a very stern paper which argues why we should not be using these tools to edit human embryos. The argument is that not only is the technology uncertain at this stage, but using it for things that are ethically questionable, such as eugenics (Roth &amp;amp; Wakeley, 2016), puts in jeopardy the research that we know will save lives if successful, such as the editing of T cells to fight cancer (an implication of Reardon (2016)). The idea being that if something goes wrong with the use of CRISPR&#x2F;Cas9 on human embryos, then the technology itself has the potential to be banned altogether.&lt;&#x2F;p&gt;
&lt;p&gt;Another concern of Lanphier et al. (2015) is that we do not know what effects the spliced germline DNA will have on the future generations that it is passed to. This is another fair point of concern, and the technology will likely need multiple generations of study on primates to see its long term effects before we think about using it for human clinical purposes.&lt;&#x2F;p&gt;
&lt;p&gt;As mentioned above, the current state of the technology for editing human embryos is still in its infancy. Liang et al. (2015) found that many of the edited embryos in their study were mosaic, which is to say that the technology had tended to cause unforeseen genetic problems with the embryo. Liang at al. (2015) attributes some of these problems to the gap in our knowledge of early embryonic repair mechanisms. The point being that, with the current state of this technology, it would clearly be unwise to begin using it in a clinical setting.&lt;&#x2F;p&gt;
&lt;p&gt;Taking this all into consideration, in order to have a discussion about the ethics of using this technology on human embryos that are meant to be brought to term in Canada, we need to consider a hypothetical scenario in which a sufficient amount of time has passed for the technology to be at a stage where we can reliably use it on human embryos, and make genetic changes such that the resulting organism will be healthy and have whatever genetic features we have engineered it to have. This paper will address the question of whether in such circumstances it will be ethically permissible to use this technology on human embryos in a Canadian clinical setting.&lt;&#x2F;p&gt;
&lt;p&gt;What is the relevance of this ethical question now if our hypothetical scenario is taking place in what could be a far away future? Well it turns out that up until the point in which we can use this technology reliably, there should be no real ethical dilemma at hand. It is quite easy for everyone to agree that presently we should not be using it clinically on embryos, nor should we be using it at any point until it is proven to be effective and not cause harm to the patient. So our scenario is the only time when a real ethical problem will arise for this technology.&lt;&#x2F;p&gt;
&lt;p&gt;The reason to explore it now rather than later is that it would be useless for organizations in Britain and China to be funding such research if it were the case that in the end it will be unethical to use it in a clinical setting. Therefore we need to have the discussion now as to whether this technology should be used when it is at a proper stage of advancement, otherwise we may as well throw out the project altogether and not waste the resources.&lt;&#x2F;p&gt;
&lt;p&gt;For reasons that will be evident, it should also be discussed whether in our hypothetical scenario, the clinical use is limited to IVF, or if it will be possible to edit the embryos &lt;em&gt;in utero&lt;&#x2F;em&gt;. This is ethically important because if it can only be used &lt;em&gt;in vitro&lt;&#x2F;em&gt;, then only the subset of the population that is using IVF will have access to this technology. This can cause some ethical problems in terms of the inequality between people using IVF and people who are not. I will discuss this further as we go through the ethical theories.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;deontological-perspective&quot;&gt;Deontological Perspective&lt;&#x2F;h2&gt;
&lt;p&gt;Now let us turn to some ethical theories. For the deontologist, the good of an act is determined by its conformity to moral norms or duties (Kant &amp;amp; Paton, 2009). So in our scenario, the deontologist is going to be concerned with whether the Canadian health care establishment has a duty to provide the service of gene editing to patients, or in other words, is the act of gene editing good in and of itself (Heavey 2013).&lt;&#x2F;p&gt;
&lt;p&gt;The duty to prevent disease has been around since at least the time of Hippocrates (approximately 5th century BCE) (Gagarin &amp;amp; Fantham, 2010). We have already seen in the UK, mitochondrial transfer (three person IVF), which allows for mitochondria to be transferred from the eggs of a donor to the eggs of a woman who has is at high risk of certain genetic diseases (Callaway 2015). After successful transfer the eggs are implanted and the child will be at lower risk for any particular genetic disease. Contrary to the opinions of Lanphier et al. (2015), CRISPR&#x2F;Cas9 can likely be developed for the same purpose without the need for a donor. Even more, CRISPR&#x2F;Cas9 has the ability to replace a much larger portion of the DNA which gives it an even greater capacity for treatments of this nature. A deontologist would therefore argue that Canada would have a duty to provide this service at least if it is being used for disease prevention.&lt;&#x2F;p&gt;
&lt;p&gt;When it comes to gene editing of the sort that is superficial, e.g. changing eye color, height, and so forth, the deontologist would likely have a completely different argument. They would argue that the child is being used as a means to an end. Even if they are doing it for the purpose of the child itself (e.g. they want the child to be tall so that he&#x2F;she is more attractive and does better socially), the advantage that this gives to the child certainly cannot be used as a universal law to be applied to all newborns. If it were the case that Canada had a duty to provide whatever modifications to the child that the parents want, then presumably each person would want an even more handsome baby than the next. There is an inherent competitiveness in that system that no longer makes it a universal good but instead an arms race with no room for justice.&lt;&#x2F;p&gt;
&lt;p&gt;Thus since there is a moral duty to prevent disease, but no moral norm that works for superficial uses, it must be concluded that the deontologist would only agree to the use of this technology if it stayed within the confines of disease prevention.&lt;&#x2F;p&gt;
&lt;p&gt;For the deontologist, the moral value of the act would not change whether it is using IVF or being performed &lt;em&gt;in utero&lt;&#x2F;em&gt;. If &lt;em&gt;in utero&lt;&#x2F;em&gt; were not available, the act of preventing disease using IVF would be good in and of itself and the deontologist would argue that we should provide IVF to anyone who’s child is likely to have a genetic disease, no matter the cost.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;utilitarian-perspective&quot;&gt;Utilitarian Perspective&lt;&#x2F;h2&gt;
&lt;p&gt;For the utilitarian, the moral act is that which maximizes the good and minimizes the harm (Mill &amp;amp; Bailey, 2016). How much good would this technology bring versus how much harm?&lt;&#x2F;p&gt;
&lt;p&gt;The use of this technology in a clinical setting for disease prevention would surely do more good than harm. It is by the very nature of disease prevention that we are increasing the well-being of the individual for whom we are preventing the disease. In a scenario in which we do not use the technology, the child in question might grow up and suffer from some horrible genetic disease, and in the case of its use the child will not. Thus it is quite easy for the utilitarian to take the position that in its use for disease prevention, at least on the individual level, there is more good than harm.&lt;&#x2F;p&gt;
&lt;p&gt;A harder problem for disease prevention is one where we must factor in the entire Canadian society. Certainly, preventing disease is better than not preventing it, but what happens when only a subset of the population is given access to this option? Such was the dilemma in Canada when it came to IVF and it was decided in Ontario that it should be publicly funded for the purposes of equality (Ferguson, 2015). This line of reasoning is in line with utilitarian thinking. To minimize the harm of inequality the Canadian health care establishment must offer the service to all citizens and pick up the bill.&lt;&#x2F;p&gt;
&lt;p&gt;Should it be the same in the case of gene editing? Certainly if it is permissible to prevent disease, we must provide the technology, but it would be harmful to the ones who cannot afford it if only some are allowed to use it. So the only solution is for Canada to publicly fund the use of CRISPR&#x2F;Cas9 at least for disease prevention.&lt;&#x2F;p&gt;
&lt;p&gt;What if it were the case that it were only available through IVF and not &lt;em&gt;in utero&lt;&#x2F;em&gt;? It then becomes an issue of resource management. Certainly Canada could provide IVF to every citizen who wanted to use CRISPR&#x2F;Cas9, but it may become extremely expensive, as currently ontario taxpayers are already picking up a bill of $50 million a year for publicly funded IVF (Ferguson, 2015), not to mention the additional cost of using CRISPR&#x2F;Cas9 in conjunction with it. So the question becomes does the good of providing CRISPR&#x2F;Cas9 to all citizens outweigh the harm of using all of that taxpayer money? I think in the end the answer would be no. The utilitarian is going to have to argue that only if the service is available &lt;em&gt;in utero,&lt;&#x2F;em&gt; and through IVF, should it be permissible for Canada to use it since we need to be able to provide it to everyone.&lt;&#x2F;p&gt;
&lt;p&gt;As for its use for superficial means, on the one hand, an increase in, for example, the height of the individual may confer some kind of advantage to him&#x2F;her down the line. It might make them more attractive, able to get a better job because of the social climate, etc.. This seems like it would increase their well-being and be ultimately a good thing. But let us look at this through a bit of a wider lens. How would giving one citizen an advantage affect the other individuals of the society? This seems to be leading to an unbalanced society where some are given advantage over others, which decreases the well-being of those individuals who do not have the advantage.&lt;&#x2F;p&gt;
&lt;p&gt;With the above analysis in mind, the utilitarian has to ask the difficult question of whether the harm done by the imbalance outweighs the good of the advantage to the individual being edited. It seems that if you run this experiment for a few generations you may start to see a major inequality in the society as a result of the use of this technology. Compounded with the fact that this would create greater demand for the technology by people who are at a disadvantage, it would create more harm to the government as it needs to use more resources to restore the balance. Ultimately the utilitarian is going to have to conclude that its use for giving advantage to certain individuals is going to do more harm than good, and thus the technology should not be used in this way. Therefore the utilitarian is going to have to argue that Canada should provide this service equally to all citizens, only for disease prevention, and only if it is available through a method that conserves resources.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;principlist-perspective&quot;&gt;Principlist Perspective&lt;&#x2F;h2&gt;
&lt;p&gt;Lastly, let us explore principlism. There are four main principles to be explored with this theory: autonomy, beneficence, non-maleficence, and justice (Beauchamp, 1995). Autonomy, in Canada, tends to be the most important. Neilson (1989) argued that it is inseparable from equality (another fundamental value of Canadian society). So let us first analyse this question with respect to autonomy.&lt;&#x2F;p&gt;
&lt;p&gt;One who takes autonomy to be the most important might argue that if a technology exists and is reliable, that it would be wrong to not let your citizens use it. So in the case of CRISPR&#x2F;Cas9, the technology is there to be used, and if the person or the state has the money to pay for it, then why should we be the ones to prohibit them from using it? In the case of the government paying for it, it becomes a little more tricky. In this case it is appropriate to make a judgement about our own resources as with utilitarianism, but if we have the resources available, and all we care about is autonomy, then it should be the case that we can provide this service to the patient even if it is for superficial use. This is essentially why IVF is publicly funded in Ontario (Ferguson, 2015).&lt;&#x2F;p&gt;
&lt;p&gt;Let us see whether the autonomy-respecting framework indicated above conflicts with the other principles at play in this ethical theory. Beginning with beneficence, the concept of promoting the good of others (Beauchamp, 2008). It would certainly benefit the patient to be able to edit her child’s DNA to whatever specifications she pleases. It would also benefit the child. However, like the utilitarian argument, the worry is that in promoting the good of one or two individuals you are simultaneously not promoting the good of several others, and therefore beneficence may be in conflict with Autonomy here in the case of superficial use, and in the case of only using IVF.&lt;&#x2F;p&gt;
&lt;p&gt;Turning to non-maleficence (the “least harm possible” principle (Beauchamp, 2008)), it seems that the only harm that can done in this case is the unfair disadvantage which we saw with the utilitarian perspective. So again with this principle it seems that the only problematic scenario ethically is one in which we are using this technology for superficial purposes or where we are only able to use it for IVF patients.&lt;&#x2F;p&gt;
&lt;p&gt;Finally, we turn to justice. Justice is a principle that is about equality for all (Arras, 2010). Giving certain advantages genetically to a child directly goes against this principle as the physician is wilfully creating inequality by giving the child an advantage over others. Thus if we are to take justice into account, it is clearly wrong to use this technology for superficial purposes as well as if we are only treating people who are using IVF. Disease prevention would seem to actually create more justice as long as it is available to everyone, since it would be preventing disease that may give the individual an obvious disadvantage as compared to others in the society.&lt;&#x2F;p&gt;
&lt;p&gt;Having examined all four main principles, we see that three out of the four see it immoral to use this technology for superficial reasons and all four see it as moral to use it for disease prevention as long as it can be used both for IVF and &lt;em&gt;in utero&lt;&#x2F;em&gt;. Even though Canadians do seem to value autonomy over the other three in many cases, it seems that in this case it should be outweighed by the other three principles when it comes to uses that create inequality. It seems quite clear that we will have to give up some autonomy in favor of justice, beneficence, and nonmaleficence. Thus the principlist must also concede that CRISPR&#x2F;Cas9 in this scenario would be perfectly permissible to use in a Canadian health care setting so long as it is only used for disease prevention and available both &lt;em&gt;in utero&lt;&#x2F;em&gt; and through IVF treatment.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;discussion&quot;&gt;Discussion&lt;&#x2F;h2&gt;
&lt;p&gt;So having examined three of the main ethical theories that are typically used in the literature today, what can we conclude from this? It seems as though no matter if you are a deontologist, a utilitarian, or a principlist, you will in all three cases come to the conclusion that this technology is morally permissible in a Canadian health care context so long as it is only used for disease prevention and not for any kind of superficial use such as changing eye color, height, and so on, and only if the service can be equally distributed.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;critique&quot;&gt;Critique&lt;&#x2F;h3&gt;
&lt;p&gt;A critic of the view being presented here might bring up a scenario where a superficial use of the technology would actually bring more equality and not have any of the consequences discussed earlier with the utilitarian perspective. Take the fact that the average height of an individual in Canada is 175.1cm (Shields et al. 2011). Also take that someone who is tall is statistically more likely be successful in a business context (Judge &amp;amp; Cable 2004). It follows that a person shorter than average would be at a disadvantage in this aspect of society, and that if everyone were the same height, this inequality would not exist. It follows from this that if a child is to be born who we know is likely to be shorter than the average height, that changing his height would not be putting him at an advantage to his peers but would be taking away his disadvantage, and therefore have the same effect as disease prevention discussed above. Thus, we have found a case where a superficial change such as height may have the same moral value as disease prevention, and so these hard and fast regulations may not be so morally sound after all.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;reply&quot;&gt;Reply&lt;&#x2F;h3&gt;
&lt;p&gt;In order to get around the fact that there are cases in which a superficial change may actually be beneficial to the individual and not cause any harm down the road, we need to look at two main points. The first is that the disease prevention is distinct from the above case because it is likely drastically reducing the suffering that the individual and his&#x2F;her family may have as a result of the genetic disease. It may be the case that the short man is at a disadvantage to his peers, but it would be a bit of a stretch to say that he was really suffering because of it.&lt;&#x2F;p&gt;
&lt;p&gt;Secondly, we must address a worry that comes up when we discuss true equality. In order be truly equal, either there has to be no social bias whatsoever with regard to people’s looks and demeanor, or everyone has to look the same and have the same personality. It should seem intuitively obvious that both of these possible outcomes are not in reality possible nor would we want them to be possible. Therefore we must accept that a degree of inequality will always exist and we cannot use a technology like this to make us all look and act the same. That is not to go against the point that a drastic change in equality would be bad, but to a degree, we want some diversity in our society.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;&#x2F;h2&gt;
&lt;p&gt;In conclusion, CRISPR&#x2F;Cas9 is a promising gene editing technology that can be used to edit the DNA of human embryos. The technology is not in a state yet where we can reliably produce predictable changes that allow us to change an embryo’s DNA to whatever specifications we like. However this will be a possibility in the future whether is it CRISPR&#x2F;Cas9 or some other technology. When that day comes we are going to have to deal with the ethical questions that surround it.&lt;&#x2F;p&gt;
&lt;p&gt;In this paper I have taken on this question, running it through three of the main ethical theories. Within the Canadian health care context, which Nielsen (1989) describes as an autonomy respecting egalitarianism, I have shown that even if you are a deontologist, a utilitarian, or a principlist you will still come to the conclusion that it will be morally permissible to use this technology in a clinical setting in Canada so long as it is restricted only to disease prevention, and so long as it can be provided to each citizen equally without using too many resources. Using the technology outside of these conditions would go against all established ethical theory.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;references&quot;&gt;References&lt;&#x2F;h2&gt;
&lt;p&gt;Arras, J. (2010, May 18). Theory and Bioethics. Retrieved February 25, 2017, from &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;plato.stanford.edu&#x2F;entries&#x2F;theory-bioethics&#x2F;&quot;&gt;https:&#x2F;&#x2F;plato.stanford.edu&#x2F;entries&#x2F;theory-bioethics&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Beauchamp, T. (2008, January 02). The Principle of Beneficence in Applied Ethics. Retrieved February 25, 2017, from &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;plato.stanford.edu&#x2F;entries&#x2F;principle-beneficence&#x2F;&quot;&gt;https:&#x2F;&#x2F;plato.stanford.edu&#x2F;entries&#x2F;principle-beneficence&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Beauchamp, T. L. (1995). Principlism and Its Alleged Competitors. &lt;em&gt;Kennedy Institute of Ethics Journal,&lt;&#x2F;em&gt; &lt;em&gt;5&lt;&#x2F;em&gt;(3), 181-198. doi:10.1353&#x2F;ken.0.0111&lt;&#x2F;p&gt;
&lt;p&gt;Butler, N. M., Atkins, P. A., Voytas, D. F., &amp;amp; Douches, D. S. (2015, 12). Generation and Inheritance of Targeted Mutations in Potato (Solanum tuberosum L.) Using the CRISPR&#x2F;Cas System. &lt;em&gt;Plos One,&lt;&#x2F;em&gt; &lt;em&gt;10&lt;&#x2F;em&gt;(12). doi:10.1371&#x2F;journal.pone.0144591&lt;&#x2F;p&gt;
&lt;p&gt;Callaway, E. (2015, 02). World hails UK vote on three-person embryos. &lt;em&gt;Nature,&lt;&#x2F;em&gt; &lt;em&gt;518&lt;&#x2F;em&gt;(7538), 145-146. doi:10.1038&#x2F;518145a&lt;&#x2F;p&gt;
&lt;p&gt;Ferguson, R. (2015, October 01). Ontario to cover in-vitro fertilization treatments. Retrieved February 22, 2017, from &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.thestar.com&#x2F;news&#x2F;queenspark&#x2F;2015&#x2F;10&#x2F;01&#x2F;ohip-to-cover-in-vitro-fertization-treatments.html&quot;&gt;https:&#x2F;&#x2F;www.thestar.com&#x2F;news&#x2F;queenspark&#x2F;2015&#x2F;10&#x2F;01&#x2F;ohip-to-cover-in-vitro-fertization-treatments.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Gagarin, M., &amp;amp; Fantham, E. (2010). &lt;em&gt;The Oxford encyclopedia of ancient Greece and Rome&lt;&#x2F;em&gt;. Oxford: Oxford University Press.&lt;&#x2F;p&gt;
&lt;p&gt;Heavey, P. (2013, 09). Synthetic Biology Ethics: A Deontological Assessment. &lt;em&gt;Bioethics,&lt;&#x2F;em&gt; &lt;em&gt;27&lt;&#x2F;em&gt;(8), 442-452. doi:10.1111&#x2F;bioe.12052&lt;&#x2F;p&gt;
&lt;p&gt;Jinek, M., Chylinski, K., Fonfara, I., Hauer, M., Doudna, J. A., &amp;amp; Charpentier, E. (2012, 06). A Programmable Dual-RNA-Guided DNA Endonuclease in Adaptive Bacterial Immunity. &lt;em&gt;Science,&lt;&#x2F;em&gt; &lt;em&gt;337&lt;&#x2F;em&gt;(6096), 816-821. doi:10.1126&#x2F;science.1225829&lt;&#x2F;p&gt;
&lt;p&gt;Judge, T. A., &amp;amp; Cable, D. M. (2004). The Effect of Physical Height on Workplace Success and Income: Preliminary Test of a Theoretical Model. &lt;em&gt;Journal of Applied Psychology,&lt;&#x2F;em&gt; &lt;em&gt;89&lt;&#x2F;em&gt;(3), 428-441. doi:10.1037&#x2F;0021-9010.89.3.428&lt;&#x2F;p&gt;
&lt;p&gt;Kant, I., &amp;amp; Paton, H. J. (2009). &lt;em&gt;Groundwork of the metaphysic of morals&lt;&#x2F;em&gt;. New York: Harper Perennial Modern Thought.&lt;&#x2F;p&gt;
&lt;p&gt;Lanphier, E., Urnov, F., Haecker, S. E., Werner, M., &amp;amp; Smolenski, J. (2015, 03). Don’t edit the human germ line. &lt;em&gt;Nature,&lt;&#x2F;em&gt; &lt;em&gt;519&lt;&#x2F;em&gt;(7544), 410-411. doi:10.1038&#x2F;519410a&lt;&#x2F;p&gt;
&lt;p&gt;Liang, P., Xu, Y., Zhang, X., Ding, C., Huang, R., Zhang, Z., . . . Huang, J. (2015, 04). CRISPR&#x2F;Cas9-mediated gene editing in human tripronuclear zygotes. &lt;em&gt;Protein &amp;amp; Cell,&lt;&#x2F;em&gt; &lt;em&gt;6&lt;&#x2F;em&gt;(5), 363-372. doi:10.1007&#x2F;s13238-015-0153-5&lt;&#x2F;p&gt;
&lt;p&gt;Mill, J. S., &amp;amp; Bailey, A. (2016). &lt;em&gt;Utilitarianism&lt;&#x2F;em&gt;. Peterborough, Ontario: Broadview Press.&lt;&#x2F;p&gt;
&lt;p&gt;Nielsen, K. (1989). Autonomy, Equality And A Just Health Care System. &lt;em&gt;International Journal of Applied Philosophy,&lt;&#x2F;em&gt; &lt;em&gt;4&lt;&#x2F;em&gt;(3), 39-44. doi:10.5840&#x2F;ijap19894316&lt;&#x2F;p&gt;
&lt;p&gt;Reardon, S. (2016, 06). First CRISPR clinical trial gets green light from US panel. &lt;em&gt;Nature&lt;&#x2F;em&gt;. doi:10.1038&#x2F;nature.2016.20137&lt;&#x2F;p&gt;
&lt;p&gt;Roth, F. P., &amp;amp; Wakeley, J. (2016, 10). Taking Exception to Human Eugenics. &lt;em&gt;Genetics,&lt;&#x2F;em&gt; &lt;em&gt;204&lt;&#x2F;em&gt;(2), 821-823. doi:10.1534&#x2F;genetics.116.192096&lt;&#x2F;p&gt;
&lt;p&gt;Shields, M., Gorber, S. C., Janssen, I., &amp;amp; Tremblay, M. (2011, 01). The bias in self-reported estimates of obesity in Canadian health surveys: An update on establishing correction equations for adults. &lt;em&gt;Canadian Journal of Diabetes,&lt;&#x2F;em&gt; &lt;em&gt;35&lt;&#x2F;em&gt;(2), 200. doi:10.1016&#x2F;s1499-2671(11)52226-9&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
