<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kevin Brimmerman on Medium]]></title>
        <description><![CDATA[Stories by Kevin Brimmerman on Medium]]></description>
        <link>https://medium.com/@brimm_reaper?source=rss-dd4c29e9620e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*xsfbF0C8N9OHly1wW8Dsqw.jpeg</url>
            <title>Stories by Kevin Brimmerman on Medium</title>
            <link>https://medium.com/@brimm_reaper?source=rss-dd4c29e9620e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 19:06:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@brimm_reaper/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Build a Slack App to Keep a Slack Channel Topic Locked with Airtable and Standard Library]]></title>
            <link>https://medium.com/@brimm_reaper/how-to-build-a-slack-app-to-keep-a-slack-channel-topic-locked-with-airtable-and-standard-library-dddea4b9ca03?source=rss-dd4c29e9620e------2</link>
            <guid isPermaLink="false">https://medium.com/p/dddea4b9ca03</guid>
            <category><![CDATA[slackbot]]></category>
            <category><![CDATA[node]]></category>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Kevin Brimmerman]]></dc:creator>
            <pubDate>Wed, 25 Sep 2019 07:00:52 GMT</pubDate>
            <atom:updated>2019-09-27T17:15:04.046Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever wanted to lock your Slack channel topics? A friend of ours, <a href="https://medium.com/u/1e799dd24f88">Ben Tossell</a>, recently posed this question on Twitter:</p><h3>Ben Tossell on Twitter</h3><p>so how do you stop members changing your channel topic on @SlackHQ ? https://t.co/WYYpWiOVUR seems anyone can change it...😬</p><p>If you’re reading this, then odds are that you use <a href="https://slack.com/">Slack</a> for internal communication when at work. It is likely that you also know that Slack Channel topics can set the tone for how users interact with one another in a given channel. They are a constant reminder that a channel is meant for serious business, reserved for horseplay, or falls somewhere in between. And while they are undeniably important, they are also extremely fragile, subjected to the will of the masses who make up the channel. At any moment your topic can be replaced, willy-nilly, by any member of the channel, and you are powerless to prevent it. That is, until now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*KTtFl5yH6qck5o63Y-Qg2Q.gif" /><figcaption>There is always one.</figcaption></figure><p>Today we are going to see how you can retake control of your Slack channel topics by deploying a Slack bot on <a href="https://stdlib.com/">Standard Library</a> that uses <a href="https://www.airtable.com/">Airtable</a> to lock a channel’s topic to a stored value. So let’s dive in!</p><blockquote>For those who just want to deploy a finished project, navigate to this <a href="https://github.com/stdlib-examples/project-slack-topic-bot">Github repo</a>. You will still need to set up Airtable and have a Standard Library account, but no other setup will be required on your part.</blockquote><h3><strong>What You’ll Need Beforehand</strong></h3><ul><li>1x Airtable Account — <a href="https://www.airtable.com/">https://www.airtable.com</a></li><li>1x Slack Account — <a href="https://www.slack.com/">https://www.slack.com</a></li><li>1x Standard Library Account — <a href="https://www.stdlib.com/">https://www.stdlib.com</a></li></ul><h3><strong>Step 1: Setting Up Airtable</strong></h3><p>First thing’s first. We want to set up some way to persist our desired channel topics. Airtable, while it looks like a spreadsheet, works a lot like a database, and is simple to use and easy to set up. Get a free account by <a href="https://www.airtable.com/">clicking here</a>, and then click<a href="https://airtable.com/addBaseFromShare/shruHRGfYKFcyU4U4"> here to add our template</a> to your workspace. You should end up with something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_liYZJ_xpbYUm-ohdqrncg.png" /><figcaption>Highlighted: Table Name.</figcaption></figure><p>Feel free to add as many channels as you would like here! For this tutorial, I would recommend adding the #random channel and a topic of your choosing to the Base (this will be used in our test event later on). Just note that you <strong>must </strong>include the <strong># </strong>before all channel names in the first columns, and that <strong><em>topics are limited to 250 characters</em></strong>. You are now ready to move on to setting up your workflow.</p><h3><strong>Step 2: Set up Your Workflow &amp; Link Airtable</strong></h3><p>Head over to <a href="https://build.stdlib.com/">Build on Standard Library</a> and begin setting up your project. Choose the following options for your project:</p><h4>Event:</h4><p>Slack → messages.channels</p><h4>Actions:</h4><p>Airtable → Select Rows by querying a Base</p><p>Slack → Set a Channel’s Topic</p><p>It should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IWtIqBII1pQKA5WbeUfTPg.png" /><figcaption>You are ready to <strong>Create Workflow!</strong></figcaption></figure><p>The next screen that you see will ask you to link your Airtable and Slack resources. We already set up an Airtable account in the previous step, so let’s start there. Click on the blue <strong>Link Resource</strong> button next to Airtable. On the following dialog page, click <strong>Link New Resource</strong> to select your new table. If you have used Airtable with Standard Library before, click <strong>Finish </strong>to link your previous account. If you are new to Airtable, you will see a different dialog box asking you to <strong>Enter a Name for Your Account </strong>(I recommend your account email) and to <strong>Retrieve the API Key from Your Account Page </strong>(found <a href="https://airtable.com/account">here</a>). The screen should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m6SIpjaX1pi54nU50pqpvQ.png" /><figcaption>Click on <strong>Finish </strong>to proceed!</figcaption></figure><p>Click on<strong> Finish</strong>, and on the next screen find and select the Base that we created earlier, <strong>Channel Topics</strong>,<strong> </strong>and click <strong>Finish </strong>here as well. That’s it for Airtable. Let’s move on to Slack!</p><h3><strong>Step 3: Set up Your Slack Bot</strong></h3><p>To begin, click on the <strong>Link Resource </strong>button next to Slack. If you already have a bot set up in your desired workspace, find it and select it on this first dialog screen. That’s it! You’re ready to move on to the next step. If you do not have a bot currently set up in the desired workspace, then continue along in this section.</p><p>Once you click <strong>Link New Resource</strong>, you will arrive at our new Slack workspace linking process. Your screen should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WMo3iDT4DWwR5ZgMTGaQLw.png" /><figcaption>Choose <strong>Install Standard Library App</strong> to proceed.</figcaption></figure><p>Select the Standard Library Bot option and a pop-up will ask you to install Standard Library into your Slack workspace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*G2MsLOg6pGKLi-poJUjd7w.png" /><figcaption>Slack workspace OAuth page.</figcaption></figure><p>On the following page, you will have the option to customize your bot. Feel free to be as creative as you would like here, but keep in mind that if you choose to add additional functionality to your bot down the road, other users in your channel may be exposed to the name of your bot and the thumbnail image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pZFZsX67LCqX0MKn1WS0Ow.png" /><figcaption>Our Topic Bot.</figcaption></figure><p>Click on <strong>Finish </strong>and you should now see a green circle with a message <strong>Identity Generated</strong> underneath your two resources. If you do, click on the blue <strong>Next </strong>at the bottom of the dialog box and move on to Step 4.</p><h3><strong>Step 4: Set up Your Workflow</strong></h3><p>For this step, we will be using Build on Standard Library’s intuitive interface to generate Node.js code that will drive the functionality of our bot. The first order of business is setting up our Airtable query. Fill in the following details:</p><p>Table → Topics</p><p>Where → Channel → is equal to → #${result.step1.channel.name}</p><p>We can now give this a test run. Click the <strong>pause</strong> button next to the <strong>Set a Channel’s Topic</strong> row in our workflow, as pictured below, and click on the green <strong>Run with Test Event </strong>button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*omGFzqraLeB8RRqopccyEQ.png" /><figcaption>Finding our channel in Airtable.</figcaption></figure><p>Scroll down to the very bottom of the test result and find the portion that includes <strong>“step3”</strong>. It should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*DCM0NvrPKv3-bkqjlooG9A.png" /><figcaption>Your topic may vary.</figcaption></figure><p>If you see this, then we are ready to move on to the next step! Unpause the row that we paused earlier, and click on the six dots next to the <strong>Set a Channel’s Topic</strong> step in the workflow. Fill in the two fields as follows:</p><p>channel → ${result.step3.selectQueryResult.rows[0].fields.Channel}</p><p>topic → ${result.step3.selectQueryResult.rows[0].fields.Topic}</p><p>It should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T-ZaH60V0k1f4Vj4tKK2gg.png" /><figcaption>We are ready to change some topics!</figcaption></figure><p>Click on the <strong>Run with Test Event </strong>button and watch your bot go! Check your Slack workspace’s #random channel and you should see a message informing you that the channel’s topic has been changed to the value you input in Airtable. Pretty neat!</p><h3>Step 5: The Finishing Touch</h3><p>As it currently stands, our bot will attempt to change the topic in any channel that it receives any message in. But we really only want to perform this action when a user changes the channel topic in a channel that we are monitoring, not whenever Janice in accounting asks everyone to submit their expense reports. To do this, click on the <strong>Developer Mode </strong>button under your workflow to get a behind the scenes look at the code that we have been generating.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WCBWY1eShJXgoJKS2TGd7Q.png" /><figcaption>Developer Mode: ON.</figcaption></figure><p>Here you will want to replace all of the code with the following snippet to make sure that things are running smoothly.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/29d3ea6c6e65540719513bc6514d5669/href">https://medium.com/media/29d3ea6c6e65540719513bc6514d5669/href</a></iframe><p>This looks like a lot, so let’s take a closer look at what it is that we are doing.</p><ul><li>We are setting up some conditional logic to tell our project that if the message that is received is not an alert that the channel topic has been changed, then return a message to our logs (‘Status unchanged.’)</li><li>If the message is an alert that the status has been changed, then we preform our query as written and perform one more conditional check before updating the channel topic</li><li>Our conditional check looks to see if the channel is part of our Airtable Base, and then validates the topic length. If the channel is being monitored and the topic is valid, then we perform the set topic action using the value stored in Airtable for the respective channel</li></ul><p>If you<strong> Run with Test Event </strong>now, the project should simply return a message informing you that the status was unchanged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AUgGNz3YOenr_u7RPN-iyA.png" /><figcaption>You should see a <strong>“Status unchanged”</strong> message.</figcaption></figure><p>You will also notice that you received no message in your #random Slack channel regarding a topic change. This means that our checks are working as intended. Click on the blue <strong>Next </strong>button, give your app a name, and click <strong>Alright, Ship it!</strong> That’s all you have to do! Feel free to test it out. Happy patrolling, Topic Bot!</p><p><em>Kevin Brimmerman is a Software Engineer at Standard Library. Outside of work he is an avid runner and a die-hard Chicago sports fan. Go Cubs!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dddea4b9ca03" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build an App to Send SMS Surveys with Twilio + Airtable on Standard Library]]></title>
            <link>https://medium.com/@brimm_reaper/build-an-app-to-send-sms-surveys-with-twilio-airtable-on-standard-library-ef5be1cd4f0b?source=rss-dd4c29e9620e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef5be1cd4f0b</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[twilio]]></category>
            <category><![CDATA[airtable]]></category>
            <dc:creator><![CDATA[Kevin Brimmerman]]></dc:creator>
            <pubDate>Thu, 19 Sep 2019 06:59:55 GMT</pubDate>
            <atom:updated>2019-09-19T06:59:55.410Z</atom:updated>
            <content:encoded><![CDATA[<p>We live in an era of collaboration and teamwork. Meaning that even the most straightforward task in this day and age (think ordering lunch, for example) is often brought before a committee vote. Thankfully, ours is also an era of great technological achievement, and there is perhaps no better way to arrive at a consensus than through the use of polling and surveys. Today we are going to see how we can use <a href="https://build.stdlib.com/">Build on Standard Library</a> to deploy a quick and easy-to-use polling app that uses your <a href="https://twilio.com/">Twilio</a> number to dispatch SMS messages to your group, and then logs their replies in one convenient <a href="https://airtable.com/">Airtable</a> Base.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*805LddiSsiMftzqZ3Aw0Bw.png" /><figcaption>What our Airtable Base will look like upon completion!</figcaption></figure><h3><strong>What You’ll Need Beforehand</strong></h3><ul><li>1x Airtable account — <a href="https://www.airtable.com/">https://www.airtable.com</a></li><li>1x Twilio account — <a href="https://www.twilio.com/">https://www.twilio.com</a></li><li>1x Standard Library Account — <a href="https://www.stdlib.com/">https://www.stdlib.com</a></li></ul><h3><strong>Step 1: Setting Up Airtable</strong></h3><p>The first thing that we want to do is set up our Airtable Base so that it is ready to begin receiving data. If you are a new user, sign up for an account by <a href="https://www.airtable.com/">visiting this link</a>, and then <a href="https://airtable.com/addBaseFromShare/shrf3W1JpexdDzfio">click here to add our Base template to your Airtable Workspace.</a> You should see a Base that looks like the above screenshot, but without the polarizing question already populated. As you can see, our base has three tables, two of which require some input from you, and one that will be entirely populated by Standard Library. Let’s take a closer look at what each of these tables is responsible for tracking.</p><ul><li><strong>Questions</strong> —This table tracks your current and past questions. Questions go in column one, and the other columns will be handled by our application</li><li><strong>Contacts</strong> — This will be a table of individuals who are a part of your group. The only required field here is the phone number(<em>country code</em> + <em>area code</em> + <em>phone number.</em> 14155309876 for example). The name field is optional</li><li><strong>Replies</strong> — This table will be entirely populated by our application. It stores the returned text message, along with who sent the reply, and which question the reply was meant for</li></ul><p>For the sake of this tutorial, you will need to add at least one number to the contacts table (I would recommend testing with your own cell phone number) and one question to the questions table (feel free to continue the GOAT debate if you would like). Now that the Base is set up, let’s start our workflow on Standard Library!</p><h3><strong>Step 2: Build Your Workflow on Standard Library</strong></h3><p>If you haven’t done so yet, get yourself a <a href="https://www.stdlib.com/">Standard Library account</a> (it’s free!) and head on over to <a href="https://build.stdlib.com/">https://build.stdlib.com</a> to begin building out your workflow. For this project we will want to trigger our survey by visiting a URL, so underneath <strong>When This Event Happens </strong>choose <strong>HTTP or Webhook</strong> as your event, and proceed to put in the following options:</p><p><strong>When This Event Happens</strong></p><ul><li>HTTP or Webhook → HTTP Request is sent to Project Endpoint → <strong>send-survey</strong></li></ul><p><strong>This Workflow Will be Triggered</strong></p><ul><li>Airtable → Select Rows by querying a Base</li><li>Airtable → Select Rows by querying a Base</li><li>Twilio → Send a message</li></ul><p>When you have finished, your screen should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZpPd8B2sce7vTH9KISlv2Q.png" /><figcaption>You are now ready to click <strong>Create Workflow!</strong></figcaption></figure><h3><strong>Step 3: Link Your Resources</strong></h3><p>The next order of business is linking your Twilio and Airtable accounts with an Identity on Standard Library. For those unfamiliar, linking a resource on Standard Library allows you to securely set up your accounts once, and then makes them available to you across all of your workflows. Let’s start by linking an Airtable account and choosing a Base. Click on the <strong>Link Resource</strong> button to be presented with the following screen:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NnpJHr00HbBHavBtMZqHfA.png" /><figcaption>If you have previously linked Airtable Bases, they will appear here.</figcaption></figure><p>If this is your first time linking your Airtable account, click the <strong>Add New Account </strong>button and input a display name on the following screen. You will also need to <a href="https://www.airtable.com/account">retrieve your API key from Airtable</a> and include that here as well. It should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m6SIpjaX1pi54nU50pqpvQ.png" /><figcaption>Click on <strong>Finish </strong>and proceed to choose your Base!</figcaption></figure><p>Now you will arrive at a screen presenting you with all of your Bases. Choose the one that you added earlier from our template called <strong>Twilio Survey, </strong>and then click <strong>Finish [Link Base].</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zo3ip9A8L9bKDYYRsme0lw.png" /><figcaption>An inventory of all your Airtable Bases.</figcaption></figure><p>That takes care of Airtable, so now you can proceed to link a Twilio number to your project. The process will look very similar to the Airtable process at first, and you will see the same pop-up screen asking you to <strong>Add New Account </strong>or <strong>Link New Resource</strong>, depending on whether or not you have used Twilio on Standard Library in the past. If you see a number that you would like to use for this project here, click on the green <strong>Choose </strong>button and move on to the next step.</p><p>If you do not have a number linked yet, proceed to click either <strong>Add New Account </strong>or <strong>Link New Resource. </strong>After the loading screen finishes, you should see something like the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1QE5VVbrUAI5icBU_gWF3A.png" /><figcaption>Twilio numbers purchased on Standard Library will show up here.</figcaption></figure><p><strong>Note: </strong>If you have numbers that you have purchased on Twilio outside of Standard Library, you will notice that they are absent from this screen. This is the result how Twilio Connect apps work. To read more about Twilio Connect apps and sub-accounts, <a href="https://support.twilio.com/hc/en-us/articles/223135007-What-is-Twilio-Connect-">click here.</a></p><p>You can now either select a previously linked number that you have purchased through Standard Library, or purchase a new number to use for this project. Once you have done that, click on the blue <strong>Finish [Link Phone Number] </strong>button, and you will see the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B-2ZMliAIS2qEYzT8PRlcA.png" /><figcaption>With your <strong>Identity Generated </strong>you can now click on <strong>Next </strong>button.</figcaption></figure><h3><strong>Part 4: Set Up Your Workflow</strong></h3><p>The following screen is where we will configure the workflow APIs that we selected earlier. We will start with our initial query. Where the interface asks for a ‘<strong>table</strong>’ fill in ‘<strong>Contacts</strong>’. Leave all other fields blank, since we want the query to return all of the numbers in the table. Your window should now look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BTD2zzRDu3swURkc-0zcLg.png" /><figcaption>Our first query to grab all of the numbers in our <strong>Contacts </strong>table.</figcaption></figure><p>Now click on the six dots next to the second row of our workflow, that says <strong>Airtable </strong>→ <strong>Select Rows by querying a Base. </strong>You will see a new blank query. Fill it in with the following:</p><ul><li>table → <strong>Questions</strong></li><li>where → key: <strong>wasSent</strong> → select: <strong>is NULL</strong></li><li>Click on the <strong>blue plus sign</strong> next to <strong>Add a new AND clause to this KeyQL Query operation</strong></li><li>In this new box, enter: where → key: <strong>Status </strong>→ select: <strong>is equal to </strong>→ type in:<strong> Pending</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zkyoErVBucg7ERgD3EcLYw.png" /><figcaption>Searching <strong>Questions </strong>for an eligible question.</figcaption></figure><p>Next, click on the six dots to the left of <strong>Twilio</strong> at the top of our dialog box. We have the option to enter up to four values here, but we only need two. In the <strong>to: </strong>field enter:</p><pre>${result.step1.selectQueryResult.rows[0].fields.Number}</pre><p>Then, in the <strong>body: </strong>field enter:</p><pre>${result.step2.selectQueryResult.rows[0].fields.Question}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*73YuS0svGZpUDDGNPzv_rw.png" /><figcaption>Set up the Twilio workflow like this.</figcaption></figure><p>Click on the green <strong>Run with Test Event </strong>button at the bottom of the dialog box and you should receive a text with the question that you entered into Airtable. If you did, then it is working!</p><p>While it is possible to do most of what we need to do in the Build interface, we will need to make some customizations to our code to store the results of multiple queries (what if our Contacts table has more than one number?). In order to do all of these things, we will need to briefly dive under the hood of Build by switching the <strong>Developer Mode </strong>button to <strong>On</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qyP-TxAkMlJmsCDVDw4org.png" /></figure><p>Here you have a behind the scenes look at what all your hard work has been producing. This is the code that has been generated by our workflow. Replace everything inside of here with the following snippet.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7747c435cc634325cc9f0a5c33267ac4/href">https://medium.com/media/7747c435cc634325cc9f0a5c33267ac4/href</a></iframe><p><strong>Note: </strong>Please be aware that toggling <strong>Developer Mode </strong>to <strong>Off </strong>will cause all of your changes to be lost, so best to keep it activated until we have shipped the project.</p><p>The first half of this will allow us to grab 1. all of the numbers that we have included in the <strong>Contacts </strong>table, and 2. the question that we want to send from the <strong>Questions</strong> table. Note that the criteria for selecting a question is that the <strong>wasSent </strong>column is <strong>unchecked</strong> (null), and that the <strong>Status </strong>column reads <strong>Pending.</strong> In the event that there are two or more questions that match this query, <em>only the most recently added one will be sent.</em></p><p>This second half of this code allows us to perform the <strong>Send a message</strong> action from our linked Twilio account to every user that we have inserted into our <strong>Contacts </strong>table, and then changes the <strong>wasSent</strong> value for the question to <strong>true</strong>.<strong> </strong>Now click on the green <strong>Run with Test Event </strong>button again, and you should receive a message with your first question!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*TBIH_pu-wucStS88EA2HJA.png" /><figcaption>Let the debate begin.</figcaption></figure><p>If you received the text message, and if the <strong>wasSent</strong> column in your table was updated to <strong>true</strong> (that is to say, the column now has a green check!), then proceed to click on the blue <strong>Next </strong>button. On this final page you will name your project (name it <strong>twilio-survey</strong>) and then go ahead and click on the blue <strong>Alright, Ship It!</strong> button. You will receive a message informing you that you are awesome. Well done!</p><p>It is important to note before moving ahead to the next section that in order to conduct our survey going forward, <em>you will need to ping the URL that is being generated during this step</em>. If you recall, when we began setting up our workflow we decided that <strong>HTTP Request is sent to Project Endpoint </strong>would be the event that triggers these actions. Meaning that if you ever want to conduct another survey, you will need to ping the URL generated by this workflow. It will look like this:</p><pre><a href="https://kevinb.api.stdlib.com/send-twilio-survey@dev/send-message/">https://&lt;Your-Username&gt;.api.stdlib.com/twilio-survey@dev/send-message/</a></pre><p>Where &lt;Your-Username&gt; is replaced with your Standard Library account name. <strong>twilio-survey</strong> is the name of our project, and <strong>send-message </strong>is the name of the endpoint that we set up when we determined our event.</p><h3><strong>Part 5: Storing Replies</strong></h3><p>We now need some way to track replies. This will require setting up a new event in our project to insert SMS messages to our Twilio number into our Airtable Base. Navigate back into your project by clicking on the <strong>dev (click to manage) </strong>link on your project’s homepage:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rb2iTPszw9P1lJfvwbZP6g.png" /></figure><p>Find the box that enables you to add new events. It will be located just under the previous workflow that you created. You will see greyed out text that reads <strong>Event Source </strong>and <strong>When this Event happens…</strong></p><p>For this workflow, we want to choose:</p><ul><li>Twilio → sms.received</li></ul><p>Your <strong>Integrations </strong>section should now look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*35rRmxYGiLHPv4mxrYYs-Q.png" /><figcaption>Click on <strong>[+] Add New Workflow</strong> to set up events!</figcaption></figure><p>After you have clicked on <strong>[+] Add New Workflow, </strong>set your workflow up as follows on the dialog page:</p><ul><li>Airtable → Select Rows by querying a Base</li><li>Airtable → Select Rows by querying a Base</li><li>Airtable → Insert a row into a Base</li></ul><p>Proceed by clicking <strong>Next</strong>, and you should see the previously linked resources. Feel free to simply click <strong>Next</strong>. Here, we will once again be taking the plunge into <strong>Developer Mode</strong>. Toggle this to <strong>On</strong>, and paste the following snippet into the editable portion of the box:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/435f5f8a30a777c8041ffaea284638fc/href">https://medium.com/media/435f5f8a30a777c8041ffaea284638fc/href</a></iframe><p>Let’s cover quickly what we are doing here.</p><ol><li>We are querying the Base to determine which question is currently active</li><li>We are finding the user associated with the responding phone number</li><li>We are creating a new record in the <strong>Replies </strong>table, and linking this reply to the previously selected question and user, respectively</li></ol><p>Testing this code will result in an error, however, so we need to make one change to the test event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jl5TmP292K2vvEZh5OPPGA.png" /></figure><p>If you click the gear icon next to the <strong>Run with Test Environment </strong>button, you will see something that looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N3RPW3eTAmX2bBUh5_wE1g.png" /><figcaption>Here, we need to update our <strong>From</strong> phone number.</figcaption></figure><p>Our workflow is attempting to find a user that has the number associated with the ‘<strong>From</strong>’ key inside this event. Change this value (<strong>“+15555555555”</strong>), to a number that is present in your <strong>Contacts</strong> table (i.e. your phone number with a preceding “+”, like so: <strong>“+18155451993”</strong>. The “+” and the country code are required here). Leave all the other values as they are, and attempt to run the test again. If you now see the message “<strong>Hello from Twilio!</strong>” in your <strong>Replies </strong>table, then congrats! You’re all finished. Proceed to click on <strong>Next</strong>, and finally <strong>Ship It!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*tf1ANObCwLloqNsoR2hoUA.png" /><figcaption>Only the first reply sent by each user will be acknowledged and stored.</figcaption></figure><h3><strong>You’re All Set!</strong></h3><p>That is it! Sit back and watch the replies come rolling in. As we mentioned earlier in this tutorial, ensure that there is only one question that carries a Status of <strong>Pending, </strong>with a wasSent value of <strong>true</strong>, as the first question to meet both of these criteria will be the one that replies are logged to. When you feel that a question has ample replies, simply change the Status field for that question to <strong>Finished</strong>, and then proceed to add a new question. Navigate to your URL endpoint to deliver the new question. Happy polling!</p><p><em>Kevin Brimmerman is a Software Engineer at Standard Library. Outside of work he is an avid runner and a die-hard Chicago sports fan. Go Cubs!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef5be1cd4f0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Set up a Custom Status Page with Build on Standard Library & Airtable]]></title>
            <link>https://medium.com/@brimm_reaper/set-up-a-custom-status-page-with-build-on-standard-library-airtable-5b7f2144536?source=rss-dd4c29e9620e------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b7f2144536</guid>
            <category><![CDATA[airtable]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[standard-library]]></category>
            <dc:creator><![CDATA[Kevin Brimmerman]]></dc:creator>
            <pubDate>Thu, 12 Sep 2019 07:04:09 GMT</pubDate>
            <atom:updated>2019-09-12T07:04:09.792Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello and welcome! Today we’re going to build a Status Page to keep track of page uptime using a new tool, <a href="https://build.stdlib.com/">Build on Standard Library</a>. Build allows you to ship powerful application logic using a visual workflow editor, and then generates and hosts Node.js code for you automatically. We’ll be storing our data in Airtable — conveniently, Standard Library automatically handles authentication for your favorite SaaS apps as well! Let’s get started.</p><p>Our objective here is to create a Status Page, powered by Airtable as a central database, to track your website’s performance throughout the day, and over a rolling period of one week. This includes a visually pleasing webpage that displays the results.</p><p>(<em>Note: For advanced users who want to skip straight to deploying a frontend, skip to the final section of the tutorial by </em><a href="https://medium.com/p/5b7f2144536#b3c1"><em>clicking here</em></a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QfLi71pX98izPZwwydZB7Q.png" /><figcaption>What’s Uptime?</figcaption></figure><h3><strong>What You’ll Need Beforehand</strong></h3><ul><li>1x Standard Library Account — <a href="https://stdlib.com/">https://stdlib.com</a></li><li>1x Airtable Account — <a href="https://airtable.com/">https://airtable.com</a></li></ul><h3><strong>Step 1: Set up Your Airtable Base</strong></h3><p>The first thing that we will need to do is set up our <a href="https://airtable.com/">Airtable</a> base to store the URLs that we want to monitor, and to format our tables so that we are gathering the correct information. We went ahead and set up a template that will track all of the necessary information. You can <a href="https://airtable.com/addBaseFromShare/shrQLyQ6TOa9txVXT">add the proper base to your workspace by clicking here.</a> The resulting base should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OAGMcop762miZtB80ADJ4Q.png" /><figcaption>Our base has two tables: Log &amp; URIs.</figcaption></figure><p>Our main focus at this stage is on populating the URIs table with the web address of sites to be monitored. Input the URL in the first column, and a short description of what the site is in the last column. When you’re finished, it should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zfzGgue8cU_acblg5bzSPw.png" /><figcaption>Enter your URLs and a short description in the URIs table.</figcaption></figure><h3><strong>Step 2: Build Your Workflow</strong></h3><p>Once you have your Base ready to go, navigate to <a href="https://build.stdlib.com/">https://build.stdlib.com</a> to begin setting up your workflow. Click the <strong>Create New Project </strong>button from the left-hand menu, and select the following:</p><h4><strong>When This Event Happens</strong></h4><ul><li>Choose <strong>Scheduler</strong> → Pick <strong>Once a minute</strong></li></ul><h4><strong>This Workflow Will be Triggered</strong></h4><ul><li>Choose <strong>Airtable</strong> → Pick <strong>Select rows by querying a Base</strong></li><li>Choose <strong>HTTP</strong> → Pick <strong>Make an HTTP Request</strong></li><li>Choose <strong>Airtable</strong> → Pick <strong>Insert a Row Into a Base</strong></li></ul><p>Your setup should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4JLCw0dLCtc1XxPpOXSpNQ.png" /><figcaption>Create New Project screen.</figcaption></figure><p>So, what’s going on here? First, we are using Standard Library’s <strong>scheduler</strong> to define the event that we want to trigger our workflow. For this project, we want to perform our tasks once every minute, so choose this option from the dropdown menu. The actions that we want to perform are:</p><ul><li>Query our Airtable base and pull all of our URLs from the URI table. Then:</li><li>Perform an HTTP call to each of those URLs, and record certain information about the response body, such as the status code and the duration of the request. Finally:</li><li>Log that information into our Airtable base on the Log table.</li></ul><p>That’s all that we need to do for now! Click on the<strong> Create Workflow </strong>button and move on to Step 3.</p><h3><strong>Step 3: Link Resources to Your Identity</strong></h3><p>Once you have set up your event and tasks, you will be presented with a screen asking you to <strong>Link Accounts</strong> to an <strong>Identity</strong>. You can think of your <strong>Identity </strong>or <strong>Identity Token </strong>as a keychain that tracks all of your API keys securely and allows you to authenticate yourself with Connector APIs on Standard Library. You will need to have completed <strong>Step 1</strong> above before you will be able to perform this step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*og55Ug8fS7U6xmyOGBjzZg.png" /><figcaption>Click on ‘Link Resource’ to authenticate your Airtable account.</figcaption></figure><p>We can now click on the <strong>Link Account</strong> button inside of the Airtable box. This will bring up an additional dialog box:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NnpJHr00HbBHavBtMZqHfA.png" /><figcaption>Any previously linked accounts will appear here.</figcaption></figure><p>If you have previously linked an Airtable account and base with your Standard Library account, that will show up here. However, if you have not, no worries! We can add new accounts on the fly. Click on <strong>Add New Account </strong>and you will be presented with the following screen:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qMU1Y7D-vR_hqAWPyow4wA.png" /><figcaption>Your API key can be found by visiting https://airtable.com/account.</figcaption></figure><p>Here you will need to input the email address associated with your Airtable account, as well as an API key. Simply visit <a href="https://airtable.com/account">airtable.com/account</a> and follow the provided instructions to retrieve your API key. Once this is in place, feel free to click on the <strong>Finish</strong> button to proceed. In the next screen you will be presented with a menu listing all of your available bases that should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sZ9EgLMSZoNo0moI62nj8g.png" /><figcaption>Select ‘Status Page’ from the list of resources, and then click Finish.</figcaption></figure><p>Choose the base that we created from the template earlier, <strong>Status Page</strong>, and click <strong>Finish.</strong> In the following screen you should now see your Airtable base listed under <strong>Accounts Linked to this Identity</strong>. Congratulations! We are now ready to move on to the last step of this tutorial.</p><h3><strong>Step 4: Configure Your Workflow APIs</strong></h3><p>Now that we have our account linked to Standard Library, we can finish setting up our workflow. The pop-up provides an easy to use interface for making specific queries leveraging Standard Library and Airtable, but what we require for this particular application is a little bit more involved. If you click on <strong>Developer Mode, </strong>you can get a look at what these actions are doing under the hood. The resulting screen should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mbL5mt_Rrpcfq6LlNBCq_A.png" /><figcaption>The code that drives our workflow, revealed!</figcaption></figure><p>Replace everything in the text box (the greyed out areas will not be overwritten) with the following snippet.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/14123edab305bbe7746a2734e70c6beb/href">https://medium.com/media/14123edab305bbe7746a2734e70c6beb/href</a></iframe><p>This code will drive all three of the tasks that we scheduled at the outset of our project. First we query the URIs table to gather the URLs we want to track. Then we perform an HTTP request to each of them and record the response in the Logs table. After you’ve clicked <strong>Run with Test Environment</strong>, the blue <strong>Next</strong> button will become active. Click on that to arrive at our final step — naming your project and shipping it. If all goes well, you should see the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yrL2as1MJEpn9FcjzSbZ9Q.png" /><figcaption>It’s true. You are. And it is.</figcaption></figure><p>Congrats, you can now track your website’s performance in one easy-to-navigate base on Airtable. Feel free to add as many URLs as you would like to keep track of.</p><h3><strong>Bonus — Launch Your Very Own Frontend!</strong></h3><p>What we have so far is a great way to get a feel for how things are running at a high level, but wouldn’t it be even better if we had some way to visualize this information? In this last section, we are going to put the finishing touches on our project and deploy a status page similar to those that we have built in previous projects.</p><p>When your base has collected enough data, navigate to <a href="https://build.stdlib.com/from-github/?repo=k-2tha-brimm/buildStatus">this page</a>, or visit the <a href="https://github.com/k-2tha-brimm/buildStatus">repository on GitHub</a> and click on the <strong>Deploy</strong> button. You will find yourself on this page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uwfZMVurGAk0NMxPMskuYA.png" /><figcaption>Almost done!</figcaption></figure><p>You have the option to provide a logo for your URL, as well as a field to provide a link to your homepage. You can also set your latency threshold (in milliseconds), which will be used to gauge your site’s performance. After you have filled in these variables, click on the <strong>Link Resource </strong>button and choose the Airtable base that you have been using to log your data (if using our template, this will be called <strong>Status Page</strong>). Click on <strong>Deploy</strong>, and you will now have a live status page like the one below!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QfLi71pX98izPZwwydZB7Q.png" /><figcaption>Look at all that green!</figcaption></figure><p>You can visit your status page at any time by navigating to the following URL:</p><pre><a href="https://kevinb.api.stdlib.com/statuspage@dev/">https://&lt;Your-StdLib-Username&gt;.api.stdlib.com/&lt;Project-Name&gt;@dev/</a></pre><p>Hopefully this was an informative and fun project! To learn more about what the team is working on or to stay up to date with new projects and products, check out our blog at <a href="https://stdlib.com/blog">https://stdlib.com/blog</a>, or follow us on <a href="https://twitter.com/stdlibhq">Twitter @StdLibHQ</a>.</p><p><em>Kevin Brimmerman is a Software Engineer at Standard Library. Outside of work he is an avid runner and a die-hard Chicago sports fan. Go Cubs!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b7f2144536" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>