{"id":5850,"date":"2020-09-28T02:15:41","date_gmt":"2020-09-28T06:15:41","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/?page_id=5850"},"modified":"2020-09-28T03:17:40","modified_gmt":"2020-09-28T07:17:40","slug":"glitch-and-soli-to-ifttt","status":"publish","type":"page","link":"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/resources\/glitch-and-soli-to-ifttt\/","title":{"rendered":"Glitch (and Soli) to IFTTT"},"content":{"rendered":"<p><em><strong>In this guide, a button in a p5.js program hosted at Glitch.com will be used to trigger an IFTTT recipe that sends a tweet from a connected Twitter account.<\/strong><\/em><\/p>\n<hr \/>\n<h2>p5.js in Glitch \u2192 IFTTT \u2192 Twitter<\/h2>\n<p><a href=\"https:\/\/glitch.com\/~glitch-p5-to-ifttt-webhooks\">Here<\/a> is a p5.js program hosted at Glitch.com which sends a signal that serves as an IFTTT trigger: <a href=\"https:\/\/glitch.com\/~glitch-p5-to-ifttt-webhooks\">https:\/\/glitch.com\/~glitch-p5-to-ifttt-webhooks<\/a>. (You can experience the project without its code and project files at <a href=\"https:\/\/glitch-p5-to-ifttt-webhooks.glitch.me\/\">https:\/\/glitch-p5-to-ifttt-webhooks.glitch.me\/<\/a>): To use this project as a template for your own work, log in to Glitch.com and click on the &#8220;Remix This&#8221; button in the lower right:<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.16.57-AM.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-5851\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.16.57-AM-640x463.png\" alt=\"\" width=\"640\" height=\"463\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.16.57-AM-640x463.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.16.57-AM-1024x741.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.16.57-AM-768x556.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.16.57-AM-1536x1112.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.16.57-AM-2048x1483.png 2048w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.16.57-AM-1200x869.png 1200w\" sizes=\"(max-width: 640px) 85vw, 640px\" \/><\/a><\/p>\n<p>Once you&#8217;re logged in and editing the project, you should see this, assuming you&#8217;re editing the p5.js code, sketch.js. Note that I have selected the &#8220;Next to the Code&#8221; preview mode by clicking on the &#8220;Show&#8221; sunglasses button in the upper left.<\/p>\n<p>The program has two &#8220;buttons&#8221;, red and blue, and a variable, <em>RorB<\/em>, which stores a string (&#8220;RED&#8221; or &#8220;BLUE&#8221;) representing the user&#8217;s most recent choice. When the user clicks, this variable is stored (in line 44) as a property called &#8220;Value1&#8221; in a small JSON object called <em>data<\/em>. This JSON object is then packed up and sent to IFTTT.<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.19.47-AM.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-5852\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.19.47-AM-640x371.png\" alt=\"\" width=\"640\" height=\"371\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.19.47-AM-640x371.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.19.47-AM-1024x594.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.19.47-AM-768x446.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.19.47-AM-1536x891.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.19.47-AM-2048x1188.png 2048w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.19.47-AM-1200x696.png 1200w\" sizes=\"(max-width: 640px) 85vw, 640px\" \/><\/a><\/p>\n<p>The p5.js sketch works in cooperation with some additional JavaScript code in the <em>server.js<\/em> file, which is also part of the same project on Glitch.com. All of the communications magic happens in line 21 of this file, where a special URL string is constructed, and line 24, which executes a <a href=\"https:\/\/curl.haxx.se\/docs\/httpscripting.html\">curl<\/a> command containing that string. That&#8217;s the trigger to IFTTT.<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.27.43-AM.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-5853\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.27.43-AM-640x324.png\" alt=\"\" width=\"640\" height=\"324\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.27.43-AM-640x324.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.27.43-AM-1024x518.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.27.43-AM-768x388.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.27.43-AM-1536x777.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.27.43-AM-2048x1036.png 2048w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.27.43-AM-1200x607.png 1200w\" sizes=\"(max-width: 640px) 85vw, 640px\" \/><\/a><\/p>\n<p>As you can see, there are some special string values that get substituted into the URL string: <span style=\"color: #bc03ff;\">EVENT_NAME<\/span> and <span style=\"color: #bc03ff;\">API_KEY<\/span>. Where are they stored and where do they come from? They are stored in your project&#8217;s special key file, <em>\ud83d\udddd.env<\/em>:<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.46.08-AM.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-5858\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.46.08-AM-557x480.png\" alt=\"\" width=\"557\" height=\"480\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.46.08-AM-557x480.png 557w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.46.08-AM-1024x883.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.46.08-AM-768x662.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.46.08-AM-1536x1325.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.46.08-AM-1200x1035.png 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-12.46.08-AM.png 1642w\" sizes=\"(max-width: 557px) 85vw, 557px\" \/><\/a><\/p>\n<p>Note that when you forked my copy of the Glitch project to create your own, this private information was <em>scrubbed<\/em>. You&#8217;ll have to get your own API key (and make your own <span style=\"color: #bc03ff;\">EVENT_NAME<\/span>) at IFTTT. Skip on over to IFTTT.com, create your account, log in, and click &#8220;Create&#8221;. You&#8217;ll be able to make 3 &#8220;applets&#8221; (recipes) with your free account.<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.04.47-AM.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-5861\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.04.47-AM-640x458.png\" alt=\"\" width=\"640\" height=\"458\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.04.47-AM-640x458.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.04.47-AM-1024x732.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.04.47-AM-768x549.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.04.47-AM-1536x1099.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.04.47-AM-2048x1465.png 2048w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.04.47-AM-1200x858.png 1200w\" sizes=\"(max-width: 640px) 85vw, 640px\" \/><\/a><\/p>\n<p>First, you&#8217;ll specify the service that is the &#8220;trigger&#8221;. IFTTT offers hundreds of different services; we&#8217;ll select <a href=\"https:\/\/ifttt.com\/maker_webhooks\">WebHooks<\/a>. IFTTT&#8217;s WebHooks service allows you to &#8220;create Applets that work with any device or app that can make or receive a web request.&#8221;<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.07.13-AM.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-5862\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.07.13-AM-640x443.png\" alt=\"\" width=\"640\" height=\"443\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.07.13-AM-640x443.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.07.13-AM-1024x708.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.07.13-AM-768x531.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.07.13-AM-1536x1062.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.07.13-AM-2048x1416.png 2048w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.07.13-AM-1200x830.png 1200w\" sizes=\"(max-width: 640px) 85vw, 640px\" \/><\/a><\/p>\n<p>Then click &#8220;Receive a web request&#8221;; you&#8217;ll be able to specify details about how IFTTT should receive a web request, i.e., specific details about the trigger to which IFTTT will respond. <a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.09.43-AM.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-5863\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.09.43-AM-560x480.png\" alt=\"\" width=\"560\" height=\"480\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.09.43-AM-560x480.png 560w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.09.43-AM-1024x877.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.09.43-AM-768x658.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.09.43-AM-1536x1316.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.09.43-AM-2048x1755.png 2048w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.09.43-AM-1200x1028.png 1200w\" sizes=\"(max-width: 560px) 85vw, 560px\" \/><\/a><\/p>\n<p>You&#8217;ll have a field where you can enter the &#8220;Event Name&#8221;. Earlier, I named my event <em>glitch_ping<\/em>, but you could call yours whatever you want, such as <em>my_glitch_event<\/em>. Make a note of this, because this is the string you will use for the <span style=\"color: #bc03ff;\">EVENT_NAME<\/span>\u00a0property in the <em>\ud83d\udddd.env<\/em> file in your Glitch project!<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.13.23-AM.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-5864\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.13.23-AM-619x480.png\" alt=\"\" width=\"619\" height=\"480\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.13.23-AM-619x480.png 619w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.13.23-AM-1024x794.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.13.23-AM-768x595.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.13.23-AM-1536x1190.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.13.23-AM-2048x1587.png 2048w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.13.23-AM-1200x930.png 1200w\" sizes=\"(max-width: 619px) 85vw, 619px\" \/><\/a><\/p>\n<p>We&#8217;ve told IFTTT what trigger to respond to (&#8230;the &#8220;<em>if this<\/em>&#8220;). Now it&#8217;s time to tell it how to act in the world (&#8230;the &#8220;<em>then that<\/em>&#8220;). In my case, I&#8217;ll use IFTTT to send a tweet from my spare Twitter account, @golancourses, but IFTTT has lots of possible services; for example, instead of sending a tweet, your trigger could save a file to a Google spreadsheet, or cause a pizza to be ordered and delivered from Domino&#8217;s&#8230;.<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.35.24-AM.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-5867\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.35.24-AM-521x480.png\" alt=\"\" width=\"521\" height=\"480\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.35.24-AM-521x480.png 521w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.35.24-AM-1024x944.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.35.24-AM-768x708.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.35.24-AM-1536x1416.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.35.24-AM-1200x1106.png 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.35.24-AM.png 1976w\" sizes=\"(max-width: 521px) 85vw, 521px\" \/><\/a><\/p>\n<p><em>I&#8217;ve made sure to log in to my Twitter account<\/em> within the same web browser that&#8217;s logged into my IFTTT account. In my IFTTT applet wizard, I select Twitter, and I connect up my Twitter account (giving IFTTT permission to send tweets from my account). I then choose to have IFTTT &#8220;Post a tweet&#8221; whenever it receives the trigger.<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.39.40-AM.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-5868\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.39.40-AM-615x480.png\" alt=\"\" width=\"615\" height=\"480\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.39.40-AM-615x480.png 615w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.39.40-AM-1024x799.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.39.40-AM-768x599.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.39.40-AM-1536x1198.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.39.40-AM-2048x1598.png 2048w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.39.40-AM-1200x936.png 1200w\" sizes=\"(max-width: 615px) 85vw, 615px\" \/><\/a><\/p>\n<p>IFTTT provides a modest editor that allows you to compose the specific textual phrasing of this tweet. This includes a small number of special strings, including the event name, the current time (<em>OccurredAt<\/em>) and up to three generic values \u2014 <em>Value1<\/em>, <em>Value2<\/em>, and <em>Value3<\/em>\u00a0\u2014 that are presumed to be coming in from the trigger event.<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.41.41-AM.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-5869\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.41.41-AM-615x480.png\" alt=\"\" width=\"615\" height=\"480\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.41.41-AM-615x480.png 615w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.41.41-AM-1024x799.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.41.41-AM-768x599.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.41.41-AM-1536x1198.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.41.41-AM-2048x1598.png 2048w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.41.41-AM-1200x936.png 1200w\" sizes=\"(max-width: 615px) 85vw, 615px\" \/><\/a><\/p>\n<p>At this point you&#8217;ve created the IFTTT applet! You should see a screen that looks like this,<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.49.44-AM.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-5872\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.49.44-AM-640x466.png\" alt=\"\" width=\"640\" height=\"466\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.49.44-AM-640x466.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.49.44-AM-1024x746.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.49.44-AM-768x560.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.49.44-AM-1536x1120.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.49.44-AM-1200x875.png 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.49.44-AM.png 2014w\" sizes=\"(max-width: 640px) 85vw, 640px\" \/><\/a><\/p>\n<p>&#8230;and clicking on &#8220;Settings&#8221; (in the upper right) will pull up a summary of your applet which looks something like this:<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-27-at-11.30.39-PM.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-5873\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-27-at-11.30.39-PM-405x1024.png\" alt=\"\" width=\"405\" height=\"1024\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-27-at-11.30.39-PM-405x1024.png 405w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-27-at-11.30.39-PM-190x480.png 190w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-27-at-11.30.39-PM-608x1536.png 608w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-27-at-11.30.39-PM.png 748w\" sizes=\"(max-width: 405px) 85vw, 405px\" \/><\/a><\/p>\n<p>There&#8217;s just one last thing to do, which is to locate your API key, and provide it to your Glitch project. In IFTTT, click on your account icon (in the upper right), select &#8220;My services&#8221; from the dropdown menu, choose WebHooks,<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.58.34-AM.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-5874\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.58.34-AM-1024x677.png\" alt=\"\" width=\"840\" height=\"555\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.58.34-AM-1024x677.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.58.34-AM-640x423.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.58.34-AM-768x508.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.58.34-AM-1536x1016.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.58.34-AM-2048x1354.png 2048w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-1.58.34-AM-1200x793.png 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>&#8230;and select &#8220;Documentation&#8221; or &#8220;Settings&#8221;<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.00.11-AM.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-5875\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.00.11-AM-1024x623.png\" alt=\"\" width=\"840\" height=\"511\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.00.11-AM-1024x623.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.00.11-AM-640x389.png 640w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.00.11-AM-768x467.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.00.11-AM-1536x934.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.00.11-AM-2048x1245.png 2048w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.00.11-AM-1200x730.png 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>You&#8217;ll see a page that looks like this. The crazy-looking string is the <span style=\"color: #bc03ff;\">API_KEY<\/span> for your IFTTT WebHooks trigger. Copy-paste this in the key file in your Glitch project!<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.01.17-AM.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-5876\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.01.17-AM-1024x955.png\" alt=\"\" width=\"840\" height=\"783\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.01.17-AM-1024x955.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.01.17-AM-515x480.png 515w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.01.17-AM-768x716.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.01.17-AM-1536x1432.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.01.17-AM-1200x1119.png 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-28-at-2.01.17-AM.png 2042w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>Run your project at Glitch.com and press the button on the p5.js canvas. If all goes well, you&#8217;ll have sent a Tweet! Here&#8217;s what it looks like for me:<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-27-at-11.26.50-PM-1.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-5880\" src=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-27-at-11.26.50-PM-1-1024x792.png\" alt=\"\" width=\"840\" height=\"650\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-27-at-11.26.50-PM-1-1024x792.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-27-at-11.26.50-PM-1-621x480.png 621w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-27-at-11.26.50-PM-1-768x594.png 768w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-27-at-11.26.50-PM-1-1200x928.png 1200w, https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-27-at-11.26.50-PM-1.png 1258w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<hr \/>\n<h2>Soli \u2192 IFTTT \u2192 ???<\/h2>\n<p>It&#8217;s straightforward to extend the above template to use Soli events. For example, you could make an app which, when someone approached the phone, it placed an order for a pizza, etc. My assistant Lingdong has made a Soli-to-IFTTT template project for you along these lines:<\/p>\n<ul>\n<li><a href=\"https:\/\/glitch.com\/~solifttt\">https:\/\/glitch.com\/~solifttt<\/a> (code)<\/li>\n<li><a href=\"http:\/\/solifttt.glitch.me\/\">http:\/\/solifttt.glitch.me\/<\/a> (live)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, a button in a p5.js program hosted at Glitch.com will be used to trigger an IFTTT recipe that sends a tweet from a connected Twitter account. p5.js in Glitch \u2192 IFTTT \u2192 Twitter Here is a p5.js program hosted at Glitch.com which sends a signal that serves as an IFTTT trigger: https:\/\/glitch.com\/~glitch-p5-to-ifttt-webhooks. &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/resources\/glitch-and-soli-to-ifttt\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Glitch (and Soli) to IFTTT&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":3913,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-json\/wp\/v2\/pages\/5850"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-json\/wp\/v2\/comments?post=5850"}],"version-history":[{"count":12,"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-json\/wp\/v2\/pages\/5850\/revisions"}],"predecessor-version":[{"id":5891,"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-json\/wp\/v2\/pages\/5850\/revisions\/5891"}],"up":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-json\/wp\/v2\/pages\/3913"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-212\/f2020\/wp-json\/wp\/v2\/media?parent=5850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}