-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflows.json
1 lines (1 loc) · 107 KB
/
flows.json
1
[{"id":"d2143b4e.692a38","type":"tab","label":"Message Broker","disabled":false,"info":""},{"id":"a032bf06.43f62","type":"tab","label":"devops-projects.de","disabled":false,"info":""},{"id":"f560aa61.449308","type":"tab","label":"Submission Broker","disabled":false,"info":""},{"id":"5a5a273b.f680c8","type":"tab","label":"Project Broker","disabled":false,"info":"# Receive Projects\nThe Broker receives incoming parsed projects from the Parsers and updates the project index.\n\n# Keep Lists\nThe Broker updates the index (/all) with new projectes from the Parsers.\n\n# Receive Commands\n## All\nReturn all projects in the index\n\n## $n\nReturn $n or all projects\n\n## Latest\nReturn 10 latest projects\n\n## Subscribe\nSubscribe to the Bot and receive new Projects as they're being parsed\n\n\n\n\n## "},{"id":"e605a94f.9a4968","type":"tab","label":"RSS Broker","disabled":true,"info":""},{"id":"7f677ad1.038694","type":"tab","label":"freelancermap.de","disabled":false,"info":""},{"id":"43ce739f.db083c","type":"tab","label":"freelancer.de","disabled":true,"info":""},{"id":"47ac7602.dc7818","type":"tab","label":"freelance.de","disabled":false,"info":""},{"id":"4fe6f092.4ba19","type":"tab","label":"Project Scraper","disabled":false,"info":""},{"id":"9ffdae8c.a3b8a","type":"tab","label":"Measurements","disabled":false,"info":""},{"id":"277a1fd9.7eb88","type":"tab","label":"Google Maps","disabled":true,"info":""},{"id":"bf1fa67d.661748","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"541f6324.99a4bc","type":"chatbot-context-store","z":"","name":"Telegram","contextStorage":"plain-file","contextParams":"{ \"path\": \"/data/telegram-context\" }"},{"id":"a2636dba.09499","type":"mqtt-broker","z":"","name":"","broker":"mqtt","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"1d161765.a25dc9","type":"mongodb","z":"","hostname":"mongodb","port":"27017","db":"devops","name":"MongoDB"},{"id":"7b3bc72b.d79f28","type":"influxdb","z":"","hostname":"influxdb","port":"8086","protocol":"http","database":"devops","name":"","usetls":false,"tls":""},{"id":"261672c5.53165e","type":"chatbot-telegram-node","z":"","botname":"DevOps Projects","usernames":"","providerToken":"","polling":"1000","store":"541f6324.99a4bc","log":"","parseMode":"HTML","debug":true,"webHook":"","connectMode":"polling"},{"id":"61419cd.6325264","type":"chatbot-slack-node","z":"","d":true,"botname":"DevOps Projects Slack","usernames":"derfabianpeter","username":"DevOps","iconEmoji":"","store":"541f6324.99a4bc","log":"","debug":true},{"id":"7baccb8.5801834","type":"chatbot-slack-node","z":"","botname":"DevOps Projects Bot","usernames":"","username":"DevOps Projects","iconEmoji":"","store":"541f6324.99a4bc","log":"","debug":true},{"id":"d0b765b.3a95f98","type":"influxdb","z":"a032bf06.43f62","hostname":"127.0.0.1","port":"8086","database":"aTimeSeries","name":"aTimeSeries"},{"id":"5e2ed975.696b08","type":"chatbot-telegram-receive","z":"d2143b4e.692a38","bot":"261672c5.53165e","botProduction":"261672c5.53165e","x":110,"y":60,"wires":[["a8598592.95cd28","57c09e95.7a55b"]]},{"id":"910469ea.e66448","type":"chatbot-telegram-send","z":"d2143b4e.692a38","bot":"261672c5.53165e","botProduction":"261672c5.53165e","track":true,"passThrough":true,"outputs":1,"x":1790,"y":160,"wires":[[]]},{"id":"b3ab4216.36e4e","type":"http request","z":"7f677ad1.038694","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://www.freelancermap.de/projektboerse.html?pq=Devops&profisuche=1&pq_vertragsart%5Bcontract_type.on_site%5D=CONTRACT&pq_vertragsart%5Bcontract_type.remote%5D=REMOTE&pq_projekteinstellung=14&pq_sorttype=1&mCats%5B0%5D=1&mCats%5B1%5D=3&mCats%5B2%5D=4&mCats%5B3%5D=6","tls":"","persist":true,"proxy":"","authType":"","x":130,"y":80,"wires":[["b3cecb53.f39d08"]]},{"id":"976ce92b.a74528","type":"inject","z":"7f677ad1.038694","name":"freelancermap.de","topic":"","payload":"","payloadType":"date","repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":40,"wires":[["b3ab4216.36e4e"]]},{"id":"b3cecb53.f39d08","type":"html","z":"7f677ad1.038694","name":"Get Projects","property":"payload","outproperty":"payload","tag":".list-unstyled li","ret":"html","as":"multi","x":110,"y":120,"wires":[["4b9000b0.a75c4"]]},{"id":"f8b24dc4.8e278","type":"html","z":"7f677ad1.038694","name":"","property":"payload","outproperty":"payload","tag":".title a","ret":"attr","as":"multi","x":90,"y":160,"wires":[["9cc7f206.67423"]]},{"id":"9cc7f206.67423","type":"function","z":"7f677ad1.038694","name":"Get Project URL","func":"msg.url = \"https://www.freelancermap.de\"+msg.payload.href;\nmsg.payload = {};\nmsg.payload.submission_url = msg.url;\nmsg.payload.transport = \"nodered\";\nreturn msg;","outputs":1,"noerr":0,"x":120,"y":200,"wires":[["c687aa76.a49638"]]},{"id":"2d91c5b8.26115a","type":"mqtt out","z":"7f677ad1.038694","name":"","topic":"scraper","qos":"","retain":"","broker":"a2636dba.09499","x":520,"y":180,"wires":[]},{"id":"bacaecaa.65e8","type":"mqtt in","z":"5a5a273b.f680c8","name":"","topic":"broker","qos":"2","datatype":"json","broker":"a2636dba.09499","x":110,"y":80,"wires":[["9816344f.b94a08"]]},{"id":"37c0d7b9.b886f8","type":"http request","z":"47ac7602.dc7818","name":"","method":"POST","ret":"txt","paytoqs":false,"url":"","tls":"","persist":true,"proxy":"","authType":"","x":130,"y":120,"wires":[["e02036ee.74ac58"]]},{"id":"35f7128c.011efe","type":"inject","z":"47ac7602.dc7818","name":"freelance.de","topic":"parser/freelancede","payload":"","payloadType":"date","repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":40,"wires":[["2ad7a883.d0e548"]]},{"id":"e8f89e7b.c9ca9","type":"html","z":"47ac7602.dc7818","name":"Get Projects","property":"payload","outproperty":"payload","tag":".project-list div","ret":"html","as":"multi","x":110,"y":200,"wires":[["d0f53091.7bdf2"]]},{"id":"d0f53091.7bdf2","type":"html","z":"47ac7602.dc7818","name":"","property":"payload","outproperty":"payload","tag":".freelancer-content h3 a","ret":"attr","as":"multi","x":150,"y":240,"wires":[["53002fe7.6a8f"]]},{"id":"53002fe7.6a8f","type":"function","z":"47ac7602.dc7818","name":"Get Project URL","func":"msg.url = \"https://www.freelance.de\"+msg.payload.href;\nmsg.payload = {};\nmsg.payload.submission_url = msg.url;\nmsg.payload.transport = \"nodered\";\nreturn msg;","outputs":1,"noerr":0,"x":120,"y":280,"wires":[["629add64.0e5ae4"]]},{"id":"12cb18a2.8f1907","type":"http request","z":"43ce739f.db083c","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://www.freelancer.de/jobs/?keyword=DevOps","tls":"","persist":true,"proxy":"","authType":"","x":130,"y":80,"wires":[["38f66cd5.8aef64"]]},{"id":"b58717c9.4f21c8","type":"inject","z":"43ce739f.db083c","name":"freelancer.de","topic":"parser/freelancerde","payload":"","payloadType":"date","repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":40,"wires":[["12cb18a2.8f1907"]]},{"id":"38f66cd5.8aef64","type":"html","z":"43ce739f.db083c","name":"Get Projects","property":"payload","outproperty":"payload","tag":"#project-list","ret":"html","as":"multi","x":110,"y":120,"wires":[["498a21a7.bf8b2"]]},{"id":"498a21a7.bf8b2","type":"html","z":"43ce739f.db083c","name":"","property":"payload","outproperty":"payload","tag":".JobSearchCard-primary-heading a","ret":"attr","as":"multi","x":180,"y":160,"wires":[["b79304ba.0c2188"]]},{"id":"b79304ba.0c2188","type":"function","z":"43ce739f.db083c","name":"Get Project URL","func":"msg.url = \"https://www.freelancer.de\"+msg.payload.href;\nmsg.payload = {};\nmsg.payload.submission_url = msg.url;\nmsg.payload.transport = \"nodered\";\nreturn msg;\n","outputs":1,"noerr":0,"x":120,"y":200,"wires":[["e83e6b88.6657c8"]]},{"id":"2ad7a883.d0e548","type":"function","z":"47ac7602.dc7818","name":"Multipart/Form-Data","func":"msg.headers = {\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n //\"Accept\": \"application/json\"\n}\nmsg.url = \"https://www.freelance.de/Projekte/K/IT-Entwicklung-Projekte/\";\nmsg.payload = {\n \"__search_freetext\": \"DevOps\"\n}\n//msg.payload = \"__search_sort_by=2&__search_project_age=0&__search_profile_availability=0&__search_profile_update=0&__search_project_start_date=&__search_profile_ac=&__search_additional_filter=&__seo_search=search&__seo_search_extended=0&__search_freetext=DevOps&__search_city=&seal=cfb570dd4985fc38fe0536dcd80\";\nreturn msg;","outputs":1,"noerr":0,"x":140,"y":80,"wires":[["37c0d7b9.b886f8"]]},{"id":"e02036ee.74ac58","type":"function","z":"47ac7602.dc7818","name":"Check if Blocked","func":"if (msg.payload === \"\" && msg.statusCode == 302) {\n // We have been blocked\n node.error(\"We have been blocked at freelance.de\", msg)\n return;\n}\nreturn msg;","outputs":1,"noerr":0,"x":130,"y":160,"wires":[["e8f89e7b.c9ca9"]]},{"id":"195789aa.b12cb6","type":"comment","z":"47ac7602.dc7818","name":"","info":"We could proxy all calls through a Lambda function (should get a new IP on each call)","x":330,"y":160,"wires":[]},{"id":"916cc98d.46f8e8","type":"mqtt in","z":"4fe6f092.4ba19","name":"","topic":"scraper","qos":"2","datatype":"auto","broker":"a2636dba.09499","x":90,"y":180,"wires":[["5034e9b0.bb5348","18ca28ab.cb38b7"]]},{"id":"b0ef177e.e063e8","type":"unfluff","z":"4fe6f092.4ba19","name":"Scrape","url":"","x":260,"y":420,"wires":[["9d5b27dd.b5b1d8"]]},{"id":"c7db550d.49f3e8","type":"mqtt out","z":"4fe6f092.4ba19","name":"","topic":"broker","qos":"","retain":"","broker":"a2636dba.09499","x":650,"y":420,"wires":[]},{"id":"b6fdae52.ae1eb","type":"inject","z":"4fe6f092.4ba19","name":"Trigger Queue","topic":"control","payload":"trigger","payloadType":"str","repeat":"2","crontab":"","once":false,"onceDelay":0.1,"x":480,"y":320,"wires":[["18ca28ab.cb38b7"]]},{"id":"18ca28ab.cb38b7","type":"q-gate","z":"4fe6f092.4ba19","name":"Queue Conversions","controlTopic":"control","defaultState":"queueing","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","queueCmd":"queue","defaultCmd":"default","triggerCmd":"trigger","flushCmd":"flush","resetCmd":"reset","maxQueueLength":"1000","keepNewest":false,"qToggle":true,"persist":true,"x":490,"y":360,"wires":[["8cc18883.4601f8"]]},{"id":"8cc18883.4601f8","type":"function","z":"4fe6f092.4ba19","name":"Prepare URL Lookup","func":"msg.url = msg.payload;\nmsg.payload = {}\nmsg.payload.url = msg.url;\n//msg.payload.canonicalLink = msg.url;\n//msg.payload = [{},{}];\nreturn msg;","outputs":1,"noerr":0,"x":760,"y":220,"wires":[["63698938.0c7208"]]},{"id":"abb8d1b7.6dfc3","type":"inject","z":"4fe6f092.4ba19","name":"Demo Data","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":420,"wires":[["7fdf6520.efe03c"]]},{"id":"7fdf6520.efe03c","type":"function","z":"4fe6f092.4ba19","name":"[test] Set msg.url","func":"msg.url = \"https://webscraper.io/test-sites/tables\";\n\nreturn msg;","outputs":1,"noerr":0,"x":90,"y":460,"wires":[[]]},{"id":"430b1885.9113c8","type":"catch","z":"4fe6f092.4ba19","name":"","scope":null,"uncaught":false,"x":100,"y":40,"wires":[["56999d21.dcaed4"]]},{"id":"56999d21.dcaed4","type":"debug","z":"4fe6f092.4ba19","name":"Scraper Errors","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":280,"y":40,"wires":[]},{"id":"83856be9.2e6638","type":"switch","z":"4fe6f092.4ba19","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"false","repair":false,"outputs":2,"x":710,"y":340,"wires":[[],["b0ef177e.e063e8"]]},{"id":"9d5b27dd.b5b1d8","type":"function","z":"4fe6f092.4ba19","name":"Add Infos","func":"if (msg.payload.title === \"\" || msg.payload.title == \"504 Gateway Time-out\") {\n // Parsing Error or Deadlink\n return;\n}\n\nif (msg.payload.canonicalLink === \"\" || !msg.payload.canonicalLink) {\n msg.payload.canonicalLink = msg.url; \n}\n\nif (msg.payload.url === \"\" || !msg.payload.url) {\n msg.payload.url = msg.url;\n}\n\nvar url = \"\";\nvar match = msg.url.match(/:\\/\\/(www[0-9]?\\.)?(.[^/:]+)/i);\nif (match !== null && match.length > 2 && typeof match[2] === 'string' && match[2].length > 0) {\n msg.payload.source = match[2];\n}\nelse {\n msg.payload.source = \"\";\n}\n\nmsg.payload.creation_date = new Date(Date.now());\n\nreturn msg;","outputs":1,"noerr":0,"x":460,"y":420,"wires":[["c7db550d.49f3e8","fa45b46d.09f7f8"]]},{"id":"9816344f.b94a08","type":"function","z":"5a5a273b.f680c8","name":"Cleanup","func":"if (msg.payload.title === \"\") {\n node.warn(\"Empty Project Title. Discarding URL \"+msg.payload.canonicalLink);\n node.warn(msg.payload);\n return;\n}\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":80,"wires":[["2bb92c22.75d794","5671d258.c92e2c","c6dbf32e.44c12"]]},{"id":"95b768a4.5189b8","type":"debug","z":"5a5a273b.f680c8","name":"MongoDB Insert Status","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":730,"y":40,"wires":[]},{"id":"9474b4eb.27bce8","type":"influxdb out","z":"9ffdae8c.a3b8a","influxdb":"7b3bc72b.d79f28","name":"project_count","measurement":"project_count","precision":"","retentionPolicy":"","x":480,"y":200,"wires":[]},{"id":"2c6be50e.2608ba","type":"function","z":"9ffdae8c.a3b8a","name":"Prepare Measurement","func":"msg.measurement = \"project_count\";\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":60,"wires":[[]]},{"id":"2ae51a06.7882b6","type":"mqtt in","z":"9ffdae8c.a3b8a","name":"","topic":"measurements","qos":"2","datatype":"json","broker":"a2636dba.09499","x":120,"y":60,"wires":[["2c6be50e.2608ba"]]},{"id":"3a118505.b5008a","type":"catch","z":"5a5a273b.f680c8","name":"","scope":null,"uncaught":false,"x":120,"y":40,"wires":[["c8e14a79.30aae8"]]},{"id":"c8e14a79.30aae8","type":"debug","z":"5a5a273b.f680c8","name":"Broker Errors","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":270,"y":40,"wires":[]},{"id":"63698938.0c7208","type":"mongodb in","z":"4fe6f092.4ba19","mongodb":"1d161765.a25dc9","name":"","collection":"projects","operation":"find","x":750,"y":260,"wires":[["83856be9.2e6638"]]},{"id":"2bb92c22.75d794","type":"mongodb out","z":"5a5a273b.f680c8","mongodb":"1d161765.a25dc9","name":"Store project","collection":"projects","payonly":true,"upsert":false,"multi":false,"operation":"insert","x":470,"y":80,"wires":[]},{"id":"9030e8fe.8605b8","type":"status","z":"5a5a273b.f680c8","name":"MongoDB Insert Status","scope":["2bb92c22.75d794"],"x":500,"y":40,"wires":[["95b768a4.5189b8"]]},{"id":"f8dbfe8a.4be5f","type":"mongodb in","z":"9ffdae8c.a3b8a","mongodb":"1d161765.a25dc9","name":"projects.count()","collection":"projects","operation":"count","x":300,"y":200,"wires":[["9474b4eb.27bce8"]]},{"id":"299cf649.bf11ea","type":"inject","z":"9ffdae8c.a3b8a","name":"Project Count","topic":"","payload":"{}","payloadType":"json","repeat":"60","crontab":"","once":true,"onceDelay":0.1,"x":120,"y":200,"wires":[["f8dbfe8a.4be5f"]]},{"id":"893ec26c.5cc91","type":"catch","z":"7f677ad1.038694","name":"","scope":null,"uncaught":false,"x":340,"y":40,"wires":[["98822252.2723c"]]},{"id":"98822252.2723c","type":"debug","z":"7f677ad1.038694","name":"freelancermap.de Errors","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":550,"y":40,"wires":[]},{"id":"5034e9b0.bb5348","type":"function","z":"4fe6f092.4ba19","name":"Count URLs found by Scrapers","func":"msg.payload = 1;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":100,"wires":[["15e158e6.62e9b7"]]},{"id":"15e158e6.62e9b7","type":"influxdb out","z":"4fe6f092.4ba19","influxdb":"7b3bc72b.d79f28","name":"urls_scraped","measurement":"urls_scraped","precision":"","retentionPolicy":"","x":550,"y":100,"wires":[]},{"id":"eb1f85fc.f01bc8","type":"catch","z":"43ce739f.db083c","name":"","scope":null,"uncaught":false,"x":340,"y":40,"wires":[["b500862a.022358"]]},{"id":"b500862a.022358","type":"debug","z":"43ce739f.db083c","name":"freelancer.de Errors","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":530,"y":40,"wires":[]},{"id":"6bab666f.f04b98","type":"catch","z":"47ac7602.dc7818","name":"","scope":null,"uncaught":false,"x":320,"y":40,"wires":[["1f72c50e.a2b91b"]]},{"id":"1f72c50e.a2b91b","type":"debug","z":"47ac7602.dc7818","name":"freelance.de Errors","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":510,"y":40,"wires":[]},{"id":"5671d258.c92e2c","type":"function","z":"5a5a273b.f680c8","name":"Count saved Projects","func":"if (msg.payload.title === \"\" || msg.payload.title == \"504 Gateway Time-out\") {\n return;\n}\n\nmsg.payload = [\n{\n value: 1,\n links: (\"links\" in msg.payload ? msg.payload.links.length : 0),\n videos: (\"videos\" in msg.payload ? msg.payload.videos.length : 0),\n text: (\"text\" in msg.payload ? msg.payload.text.length : 0),\n title: (\"title\" in msg.payload ? msg.payload.title.length : 0),\n description: (\"description\" in msg.payload ? msg.payload.description.length : 0),\n},\n{\n // Dirrty! https://stackoverflow.com/questions/13506460/how-to-extract-the-host-from-a-url-in-javascript\n source: msg.payload.source\n}\n];\nreturn msg;","outputs":1,"noerr":0,"x":500,"y":140,"wires":[["2e72d51f.cbe09a","43847b45.3a5fd4"]]},{"id":"2e72d51f.cbe09a","type":"influxdb out","z":"5a5a273b.f680c8","influxdb":"7b3bc72b.d79f28","name":"projects_saved","measurement":"projects_saved","precision":"","retentionPolicy":"","x":700,"y":140,"wires":[]},{"id":"f8d689a3.070c68","type":"mqtt in","z":"4fe6f092.4ba19","name":"","topic":"broker","qos":"2","datatype":"json","broker":"a2636dba.09499","x":110,"y":360,"wires":[["451d9ff0.038d"]]},{"id":"451d9ff0.038d","type":"change","z":"4fe6f092.4ba19","name":"Trigger Scraping","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"trigger","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":360,"wires":[["18ca28ab.cb38b7"]]},{"id":"fa45b46d.09f7f8","type":"debug","z":"4fe6f092.4ba19","name":"scraping output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":680,"y":560,"wires":[]},{"id":"43847b45.3a5fd4","type":"debug","z":"5a5a273b.f680c8","name":"projects_saved","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":700,"y":180,"wires":[]},{"id":"4bcc58a3.88e5f8","type":"http in","z":"a032bf06.43f62","name":"[GET] /devops","url":"/devops","method":"get","upload":false,"swaggerDoc":"","x":130,"y":60,"wires":[["1ec8a76a.f53e99","aa22e7e1.e31bd8"]]},{"id":"71b5352f.31e23c","type":"template","z":"a032bf06.43f62","name":"devops-projects.de","field":"payload","fieldType":"msg","format":"html","syntax":"mustache","template":"<html>\n <head>\n <title>DevOps Projects</title>\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\" integrity=\"sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm\" crossorigin=\"anonymous\">\n <meta name=\"slack-app-id\" content=\"AS0E9BZS5\">\n <!-- Bootstrap core CSS -->\n\n <!-- Custom fonts for this template -->\n <link href=\"https://fonts.googleapis.com/css?family=Catamaran:100,200,300,400,500,600,700,800,900\" rel=\"stylesheet\">\n <link href=\"https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i\" rel=\"stylesheet\">\n\n\n <style>\n body {\n font-family: 'Lato';\n }\n \n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-family: 'Catamaran';\n font-weight: 800 !important;\n }\n \n .btn-xl {\n text-transform: uppercase;\n padding: 1.5rem 3rem;\n font-size: 0.9rem;\n font-weight: 700;\n letter-spacing: 0.1rem;\n }\n \n .bg-black {\n background-color: #000 !important;\n }\n \n .rounded-pill {\n border-radius: 5rem;\n }\n \n .navbar-custom {\n padding-top: 1rem;\n padding-bottom: 1rem;\n background-color: rgba(0, 0, 0, 0.7);\n }\n \n .navbar-custom .navbar-brand {\n text-transform: uppercase;\n font-size: 1rem;\n letter-spacing: 0.1rem;\n font-weight: 700;\n }\n \n .navbar-custom .navbar-nav .nav-item .nav-link {\n text-transform: uppercase;\n font-size: 0.8rem;\n font-weight: 700;\n letter-spacing: 0.1rem;\n }\n \n header.masthead {\n position: relative;\n overflow: hidden;\n padding-top: calc(7rem + 72px);\n padding-bottom: 7rem;\n /*background: linear-gradient(0deg, #ff6a00 0%, #ee0979 100%);*/\n background-repeat: no-repeat;\n background-position: center center;\n background-attachment: scroll;\n background-size: cover;\n background-image: url(\"https://source.unsplash.com/NWmcp5fE_4M/\");\n }\n header.masthead:before {\n content: \"\";\n position: absolute;\n left: 0; right: 0;\n top: 0; bottom: 0;\n background: rgba(0,0,0,.5);\n }\n \n header.masthead .masthead-content {\n z-index: 1;\n position: relative;\n }\n \n header.masthead .masthead-content .masthead-heading {\n font-size: 4rem;\n }\n \n header.masthead .masthead-content .masthead-subheading {\n font-size: 2rem;\n }\n \n header.masthead .bg-circle {\n z-index: 0;\n position: absolute;\n border-radius: 100%;\n /*background: linear-gradient(0deg, #ee0979 0%, #ff6a00 100%);*/\n }\n \n header.masthead .bg-circle-1 {\n height: 90rem;\n width: 90rem;\n bottom: -55rem;\n left: -55rem;\n }\n \n header.masthead .bg-circle-2 {\n height: 50rem;\n width: 50rem;\n top: -25rem;\n right: -25rem;\n }\n \n header.masthead .bg-circle-3 {\n height: 20rem;\n width: 20rem;\n bottom: -10rem;\n right: 5%;\n }\n \n header.masthead .bg-circle-4 {\n height: 30rem;\n width: 30rem;\n top: -5rem;\n right: 35%;\n }\n \n @media (min-width: 992px) {\n header.masthead {\n padding-top: calc(10rem + 55px);\n padding-bottom: 10rem;\n }\n header.masthead .masthead-content .masthead-heading {\n font-size: 6rem;\n }\n header.masthead .masthead-content .masthead-subheading {\n font-size: 4rem;\n }\n }\n \n .bg-primary {\n background-color: #ee0979 !important;\n }\n \n .btn-primary {\n /*background-color: #ee0979;\n border-color: #ee0979;*/\n }\n \n .btn-primary:active, .btn-primary:focus, .btn-primary:hover {\n /*background-color: #bd0760 !important;\n border-color: #bd0760 !important;*/\n }\n \n .btn-primary:focus {\n /*box-shadow: 0 0 0 0.2rem rgba(238, 9, 121, 0.5);*/\n }\n \n .btn-secondary {\n /*background-color: #ff6a00;\n border-color: #ff6a00;*/\n }\n \n .btn-secondary:active, .btn-secondary:focus, .btn-secondary:hover {\n /*background-color: #cc5500 !important;\n border-color: #cc5500 !important;*/\n }\n \n .btn-secondary:focus {\n /*box-shadow: 0 0 0 0.2rem rgba(255, 106, 0, 0.5);*/\n }\n \n .submissions {\n list-style-type: none;\n }\n </style>\n\n </head>\n <body>\n <!-- Navigation -->\n <!--<nav class=\"navbar navbar-expand-lg navbar-dark navbar-custom fixed-top\">\n <div class=\"container\">\n <a class=\"navbar-brand\" href=\"https://devops-projects.de\">DevOps Projects</a>\n <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarResponsive\" aria-controls=\"navbarResponsive\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <!--<div class=\"collapse navbar-collapse\" id=\"navbarResponsive\">\n <ul class=\"navbar-nav ml-auto\">\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"#\">Sign Up</a>\n </li>\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"#\">Log In</a>\n </li>\n </ul>\n </div>\n </div>\n </nav>-->\n <header class=\"masthead text-center text-white\">\n <div class=\"masthead-content\">\n <div class=\"container-fluid\">\n <h1 class=\"masthead-heading mb-0\">DevOps Projects</h1>\n <h2 class=\"masthead-subheading mb-0\">an interactive DevOps Board</h2>\n <a href=\"#submissions\" class=\"btn btn-dark btn-xl mt-5\">Knowledge</a> <a href=\"#projects\" class=\"btn btn-secondary btn-xl mt-5\">Projects</a>\n </div>\n </div>\n <div class=\"bg-circle-1 bg-circle\"></div>\n <div class=\"bg-circle-2 bg-circle\"></div>\n <div class=\"bg-circle-3 bg-circle\"></div>\n <div class=\"bg-circle-4 bg-circle\"></div>\n </header>\n <section>\n <div class=\"container-fluid\">\n <div class=\"row no-gutters align-items-center\">\n <div class=\"col-lg-12 order-lg-2\">\n <div class=\"p-5\">\n <h2 class=\"text-center\">What is this?</h2>\n <p class=\"text-center\"><b>DevOps Projects</b> is an information Broker inspired by HackerNews. It currently features DevOps Jobs and additional Resources like Tools, Repositories, Frameworks, Methodologies and anything else that adds to the overall topic.</p>\n <p class=\"text-center\">Like HackerNews, it's all about brokering <b>URLs</b> to useful content and heavily relies on user contribution. Unlike HackerNews (and more in the spirit of DevOps and portability), one of the goals of the project is to ease access and the submission workflow by implementing unified modern endpoints for submission and consumption, like:</p>\n <p class=\"text-center\">\n <ul class=\"text-center list-inline mx-auto justify-content-center\">\n <li class=\"list-inline-item\"><span class=\"badge badge-success\">DONE</span> Slack</li>\n <li class=\"list-inline-item\"><span class=\"badge badge-success\">DONE</span> Telegram</li>\n <li class=\"list-inline-item\"><span class=\"badge badge-warning\">TODO</span> REST API</li>\n <li class=\"list-inline-item\"><span class=\"badge badge-warning\">TODO</span> RSS</li>\n <li class=\"list-inline-item\"><span class=\"badge badge-primary\">PLANNED</span> Websocket</li>\n <li class=\"list-inline-item\"><span class=\"badge badge-primary\">PLANNED</span> Facebook Messenger</li>\n </ul>\n </p>\n <p class=\"text-center\">Sharing a useful <b>DevOps</b> Resource is as easy as submitting the Link to the respective Endpoint. In the simplest case this means sharing a single URL with the Slack or Telegram Bot.</p>\n <p class=\"text-center\">You can subscribe to <b>DevOps Projects</b> through the following channels:</p>\n <p class=\"text-center\">\n <a class=\"btn btn-primary\" href=\"https://telegram.me/devops_projects_bot?start=start\" target=\"_blank\">Telegram</a>\n <a href=\"https://slack.com/oauth/authorize?client_id=894714422528.915123643254&scope=bot,incoming-webhook,commands\"><img alt=\"Add to Slack\" height=\"40\" width=\"139\" src=\"https://platform.slack-edge.com/img/add_to_slack.png\" srcset=\"https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/[email protected] 2x\"></a>\n </p>\n <p class=\"text-center\">Once you talk to the Bot, use <code>/start</code> to see your options.</p>\n <p class=\"text-center\">This site has been served <b>{{access_log}}</b> times. <b>{{messages_sent}}</b> messages have been sent to Subscribers.</p>\n </div>\n </div>\n </div>\n </div>\n </section>\n \n <section>\n <div class=\"container-fluid\" id=\"submissions\">\n <div class=\"row align-items-center\">\n <div class=\"col-lg-12 order-lg-2\">\n <div class=\"p-5\">\n <h1 class=\"text-center\">{{submission_count}} DevOps Resources</h1>\n \n <ul class=\"submissions list-group-flush p-0\">\n {{#submissions}}\n <li class=\"submission {{type}} list-group-item\">\n <p class=\"p-0 m-0\"><a target=\"_blank\" class=\"text-dark\" href=\"{{url}}\">{{title}}</a></p>\n <p class=\"p-0 m-0\">\n <!--<span class=\"badge badge-success\">{{#upvotes.length}}{{upvotes.length}} Upvotes{{/upvotes.length}}</span>\n <span class=\"badge badge-danger\">{{#downvotes.length}}{{downvotes.length}} Downvotes{{/downvotes.length}}</span>-->\n <ul class=\"meta list-inline\">\n <li class=\"karma list-inline-item\"><span class=\"badge badge-dark\">{{karma}}</span></li>\n <li class=\"source list-inline-item\"><a class=\"badge badge-secondary\" href=\"{{url}}\">{{source}}</a></li>\n {{#tags}}\n <li class=\"tag list-inline-item\"><span class=\"badge badge-dark\">{{.}}</span></li>\n {{/tags}}\n </ul>\n </p>\n </li>\n {{/submissions}}\n </ul>\n </div>\n </div>\n </div>\n </div>\n </section>\n \n <section>\n <div class=\"container-fluid\" id=\"projects\">\n <div class=\"row align-items-center\">\n <div class=\"col-lg-12 order-lg-2\">\n <div class=\"p-5\">\n <h1 class=\"text-center\">{{project_count}} DevOps Projects</h1>\n <ul class=\"submissions list-group-flush p-0\">\n {{#projects}}\n <li class=\"submission {{type}} list-group-item\">\n <p class=\"p-0 m-0\"><a target=\"_blank\" class=\"text-dark\" href=\"{{url}}\">{{title}}</a></p>\n <p class=\"p-0 m-0\">\n <!--<span class=\"badge badge-success\">{{#upvotes.length}}{{upvotes.length}} Upvotes{{/upvotes.length}}</span>\n <span class=\"badge badge-danger\">{{#downvotes.length}}{{downvotes.length}} Downvotes{{/downvotes.length}}</span>-->\n <ul class=\"meta list-inline\">\n <li class=\"karma list-inline-item\"><span class=\"badge badge-dark\">{{karma}}</span></li>\n <li class=\"source list-inline-item\"><a class=\"badge badge-secondary\" href=\"{{url}}\">{{source}}</a></li>\n {{#tags}}\n <li class=\"tag list-inline-item\"><span class=\"badge badge-dark\">{{.}}</span></li>\n {{/tags}}\n </ul>\n </p>\n <!--<span class=\"badge badge-secondary\">{{human_date}}</span> -->\n </li>\n {{/projects}}\n </ul>\n </div>\n </div>\n </div>\n </div>\n </section>\n \n <section>\n <div class=\"container-fluid\">\n <div class=\"row align-items-center\">\n <div class=\"col-lg-12 order-lg-2\">\n <div class=\"p-5\">\n <h2 class=\"text-center\">Subscribe</h2>\n <p class=\"text-center\">You can subscribe to <b>DevOps Projects</b> through the following channels:</p>\n <p class=\"text-center\">\n <a class=\"btn btn-primary\" href=\"https://telegram.me/devops_projects_bot?start=start\" target=\"_blank\">Telegram</a>\n <a href=\"https://slack.com/oauth/authorize?client_id=894714422528.915123643254&scope=bot,incoming-webhook,commands\"><img alt=\"Add to Slack\" height=\"40\" width=\"139\" src=\"https://platform.slack-edge.com/img/add_to_slack.png\" srcset=\"https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/[email protected] 2x\"></a>\n </p>\n <p class=\"text-center\">Use <code>/start</code> to see your options.</p>\n <p class=\"text-center\">This site has been served <b>{{access_log}}</b> times. <b>{{messages_sent}}</b> messages have been sent to Subscribers.</p>\n </div>\n </div>\n </div>\n </div>\n </section>\n <section>\n <div class=\"container-fluid\">\n <div class=\"row align-items-center\">\n <div class=\"col-lg-12 order-lg-2\">\n <div class=\"p-5\">\n <p class=\"text-center\">\n This is <b>Alpha Software</b>. Use at your own risk.\n </p>\n </div>\n </div>\n </div>\n </div>\n </section>\n <section>\n <div class=\"container-fluid\">\n <div class=\"row align-items-center\">\n <div class=\"col-lg-12 order-lg-2\">\n <div class=\"p-5\">\n <p class=\"text-center\">© 2020 <a href=\"https://www.peter.saarland\">Peter.SAARLAND</a>. Join our <a href=\"https://join.slack.com/t/devopsprojectsde/shared_invite/enQtODk0Mjc4MDcwMzcyLWFjNTI1OWUzOGFjZWZiMTI3NzFjNmViZWU3NDgxZmE0NTZkNzc4Nzc0MzRiMzM5NjEwNmZjMTk0Yjg1Njk5MTU\">Slack Workspace</a>. Get Support on <a href=\"https://github.com/derfabianpeter/devops-projects\">GitHub</a>.</p>\n <p class=\"text-center\"><a style=\"background-color:black;color:white;text-decoration:none;padding:4px 6px;font-family:-apple-system, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Helvetica, Ubuntu, Roboto, Noto, "Segoe UI", Arial, sans-serif;font-size:12px;font-weight:bold;line-height:1.2;display:inline-block;border-radius:3px\" href=\"https://unsplash.com/@headwayio?utm_medium=referral&utm_campaign=photographer-credit&utm_content=creditBadge\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Download free do whatever you want high-resolution photos from Headway\"><span style=\"display:inline-block;padding:2px 3px\"><svg xmlns=\"http://www.w3.org/2000/svg\" style=\"height:12px;width:auto;position:relative;vertical-align:middle;top:-2px;fill:white\" viewBox=\"0 0 32 32\"><title>unsplash-logo</title><path d=\"M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z\"></path></svg></span><span style=\"display:inline-block;padding:2px 3px\">Headway</span></a></p>\n </div>\n </div>\n </div>\n </div>\n </section>\n </body>\n</html>","output":"str","x":1170,"y":180,"wires":[["15e6d931.d4cfd7"]]},{"id":"15e6d931.d4cfd7","type":"http response","z":"a032bf06.43f62","name":"","statusCode":"","headers":{},"x":1330,"y":180,"wires":[]},{"id":"1ec8a76a.f53e99","type":"function","z":"a032bf06.43f62","name":"Get Projects","func":"msg.payload = {\n \"type\": \"project\"\n}\nmsg.limit = 20;\nmsg.collection = \"submission\";\nmsg.sort = { \"creation_date\": -1 }\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":100,"wires":[["9f56b73d.8b1828"]]},{"id":"9f56b73d.8b1828","type":"mongodb in","z":"a032bf06.43f62","mongodb":"1d161765.a25dc9","name":"Projects","collection":"","operation":"find","x":640,"y":100,"wires":[["5c63f26e.ddb53c"]]},{"id":"e199c440.1542c8","type":"inject","z":"5a5a273b.f680c8","name":"Clean Projects","topic":"","payload":"{}","payloadType":"json","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":140,"y":460,"wires":[["5f4d3530.4b8b0c"]]},{"id":"5f4d3530.4b8b0c","type":"mongodb in","z":"5a5a273b.f680c8","mongodb":"1d161765.a25dc9","name":"projects.find()","collection":"projects","operation":"find","x":320,"y":460,"wires":[["3574dc34.c1ee94"]]},{"id":"570b11d4.68746","type":"debug","z":"5a5a273b.f680c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":810,"y":500,"wires":[]},{"id":"bac09b6e.a7bf78","type":"function","z":"5a5a273b.f680c8","name":"Prepare Query","func":"// We delete projects from the index after 10 days\n//var d = new Date();\n//d.setDate(d.getDate()-10);\n//msg.payload.creation_date = {\n// \"$gte\": d\n//}\n\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":540,"wires":[[]]},{"id":"aa22e7e1.e31bd8","type":"function","z":"a032bf06.43f62","name":"Log Access to /devops","func":"msg.payload.value = 1;\n\nvar referer = \"none\";\nif (\"referer\" in msg.req.headers && msg.req.headers.referer !== \"\") {\n node.warn(msg.req.headers.referer);\n // Get Referer\n var match = msg.req.headers.referer.match(/:\\/\\/(www[0-9]?\\.)?(.[^/:]+)/i);\n if (match !== null && match.length > 2 && typeof match[2] === 'string' && match[2].length > 0) {\n referer = match[2];\n }\n else {\n referer = \"\";\n }\n}\nmsg.payload = [\n{\n value: 1,\n user_agent: msg.req.headers[\"user-agent\"]\n},\n{\n // Dirrty! https://stackoverflow.com/questions/13506460/how-to-extract-the-host-from-a-url-in-javascript\n referer: referer\n \n}\n];\n\nreturn msg;","outputs":1,"noerr":0,"x":450,"y":60,"wires":[["12ee5857.14b4a8"]]},{"id":"12ee5857.14b4a8","type":"influxdb out","z":"a032bf06.43f62","influxdb":"7b3bc72b.d79f28","name":"access_log","measurement":"access_log","precision":"","retentionPolicy":"","x":650,"y":60,"wires":[]},{"id":"2bc299b1.b89246","type":"chatbot-message","z":"d2143b4e.692a38","name":"Message","message":[{"message":"You have been successfully subscribed to DevOps Projects."}],"answer":false,"silent":false,"x":1260,"y":100,"wires":[["7239a31b.c09cac"]]},{"id":"8822ec04.1ce98","type":"mongodb in","z":"d2143b4e.692a38","mongodb":"1d161765.a25dc9","name":"","collection":"chats","operation":"find","x":180,"y":500,"wires":[["43c3af57.45ad6"]]},{"id":"3dcf2816.df8728","type":"function","z":"d2143b4e.692a38","name":"Subscribe Prepare User Lookup","func":"msg.originalPayload = msg.payload;\n\nvar chatId = msg.payload.chatId;\nmsg.payload = {};\nmsg.payload.chatId = chatId;\n\nreturn msg;","outputs":1,"noerr":0,"x":230,"y":460,"wires":[["8822ec04.1ce98"]]},{"id":"43c3af57.45ad6","type":"switch","z":"d2143b4e.692a38","name":"","property":"payload","propertyType":"msg","rules":[{"t":"empty"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":330,"y":500,"wires":[["3beb59f3.35a506"],[]]},{"id":"327398de.6b5748","type":"mongodb out","z":"d2143b4e.692a38","mongodb":"1d161765.a25dc9","name":"Subscribe ChatId","collection":"chats","payonly":true,"upsert":true,"multi":false,"operation":"store","x":410,"y":560,"wires":[]},{"id":"3beb59f3.35a506","type":"function","z":"d2143b4e.692a38","name":"Save and Subscribe","func":"//msg.payload = msg.originalPayload;\nmsg.payload =\n{\n chatId: msg.originalPayload.chatId,\n userId: msg.originalPayload.userId,\n transport: msg.originalPayload.transport\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":200,"y":560,"wires":[["327398de.6b5748","1c4da1f9.e0003e","4ea18698.f878c8"]]},{"id":"411ada87.a30f74","type":"chatbot-command","z":"d2143b4e.692a38","name":"","command":"/subscribe","x":470,"y":100,"wires":[["2bc299b1.b89246","11b10e08.79f7d2"]]},{"id":"cf396173.d90db","type":"link in","z":"d2143b4e.692a38","name":"/subscribe","links":["11b10e08.79f7d2"],"x":55,"y":460,"wires":[["3dcf2816.df8728"]]},{"id":"11b10e08.79f7d2","type":"link out","z":"d2143b4e.692a38","name":"/subscribe","links":["cf396173.d90db","196ed090.4b8d3f"],"x":575,"y":120,"wires":[]},{"id":"340c48e6.9a0198","type":"link in","z":"d2143b4e.692a38","name":"Telegram Sender","links":["7239a31b.c09cac","6c370172.7fd7a","2f70c172.1adfae","d5de9ffa.4aff7","976826b5.cd7178","8c59e218.f54bc"],"x":1475,"y":260,"wires":[["c39e44c6.b97228"]]},{"id":"7239a31b.c09cac","type":"link out","z":"d2143b4e.692a38","name":"Telegram Sender","links":["340c48e6.9a0198"],"x":1375,"y":100,"wires":[]},{"id":"b46a53e5.00c45","type":"chatbot-command","z":"d2143b4e.692a38","name":"","command":"/latest","x":110,"y":1160,"wires":[["b026b6f4.68b9a8"]]},{"id":"27899235.71de2e","type":"mongodb in","z":"d2143b4e.692a38","mongodb":"1d161765.a25dc9","name":"Find /latest projects","collection":"projects","operation":"find","x":500,"y":1160,"wires":[["fa13710b.9d3d2"]]},{"id":"b026b6f4.68b9a8","type":"function","z":"d2143b4e.692a38","name":"Prepare /latest Lookup","func":"msg.originalPayload = msg.payload;\n\nmsg.payload = {};\nmsg.limit = 10;\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":1160,"wires":[["27899235.71de2e"]]},{"id":"6c370172.7fd7a","type":"link out","z":"d2143b4e.692a38","name":"Telegram Sender","links":["340c48e6.9a0198"],"x":1035,"y":1160,"wires":[]},{"id":"fa13710b.9d3d2","type":"function","z":"d2143b4e.692a38","name":"Prepare /latest Message","func":"var header = \"Here are the \"+msg.payload.length+\" latest DevOps Projects:\\n\\n\";\nvar body = \"\";\n\nmsg.payload.forEach(function(project){\n console.log(project);\n body = body+project.title+\": \";\n \n body = body + \" \"+project.url+\"\\n\\n\";\n \n //body = body + \"\\n\";\n});\nmsg.payload = header+body;\nreturn msg;","outputs":1,"noerr":0,"x":730,"y":1160,"wires":[["bd520498.5f7e38"]]},{"id":"bd520498.5f7e38","type":"chatbot-message","z":"d2143b4e.692a38","name":"Message","message":[],"answer":false,"silent":false,"x":920,"y":1160,"wires":[["6c370172.7fd7a"]]},{"id":"c528dd56.9939f8","type":"chatbot-command","z":"d2143b4e.692a38","name":"","command":"/start","x":450,"y":60,"wires":[["98330c4b.f981e"]]},{"id":"98330c4b.f981e","type":"chatbot-inline-buttons","z":"d2143b4e.692a38","name":"Welcome","buttons":[{"type":"postback","label":"Subscribe","value":"/subscribe ","answer":"You subscribed to DevOps Projects","alert":false,"style":"primary"}],"message":"Welcome to the DevOps Projects Bot.\n\nAvailable commands:\n\n- /subscribe\n- /unsubscribe\n- /latest","x":1260,"y":60,"wires":[["2f70c172.1adfae"]]},{"id":"2f70c172.1adfae","type":"link out","z":"d2143b4e.692a38","name":"Telegram Sender","links":["340c48e6.9a0198"],"x":1375,"y":60,"wires":[]},{"id":"c250196c.76bfc8","type":"chatbot-command","z":"d2143b4e.692a38","name":"","command":"/unsubscribe","x":470,"y":160,"wires":[["744894a0.a7b94c","163e24e8.17611b"]]},{"id":"744894a0.a7b94c","type":"link out","z":"d2143b4e.692a38","name":"/unsubscribe","links":["5604f892.b1bd08"],"x":575,"y":180,"wires":[]},{"id":"6b52ae97.280d6","type":"mongodb in","z":"d2143b4e.692a38","mongodb":"1d161765.a25dc9","name":"","collection":"chats","operation":"find","x":620,"y":500,"wires":[["c563a567.b17308"]]},{"id":"1d8a5bc6.1eb1a4","type":"function","z":"d2143b4e.692a38","name":"Unsubscribe Prepare User Lookup","func":"msg.originalPayload = msg.payload;\n\nvar chatId = msg.payload.chatId;\nmsg.payload = {};\nmsg.payload.chatId = chatId;\n\nreturn msg;","outputs":1,"noerr":0,"x":680,"y":460,"wires":[["6b52ae97.280d6"]]},{"id":"c563a567.b17308","type":"switch","z":"d2143b4e.692a38","name":"","property":"payload","propertyType":"msg","rules":[{"t":"empty"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":770,"y":500,"wires":[[],["f7c7ab37.865d98"]]},{"id":"a91b2ae4.3c54d8","type":"mongodb out","z":"d2143b4e.692a38","mongodb":"1d161765.a25dc9","name":"Unsubscribe chatId","collection":"chats","payonly":true,"upsert":true,"multi":false,"operation":"delete","x":810,"y":560,"wires":[]},{"id":"f7c7ab37.865d98","type":"function","z":"d2143b4e.692a38","name":"Unsubscribe","func":"//msg.payload = msg.originalPayload;\nmsg.payload =\n{\n chatId: msg.originalPayload.chatId,\n userId: msg.originalPayload.userId,\n transport: msg.originalPayload.transport\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":610,"y":560,"wires":[["a91b2ae4.3c54d8","c90c0509.7326e8"]]},{"id":"5604f892.b1bd08","type":"link in","z":"d2143b4e.692a38","name":"/unsubscribe","links":["744894a0.a7b94c"],"x":495,"y":460,"wires":[["1d8a5bc6.1eb1a4"]]},{"id":"163e24e8.17611b","type":"chatbot-message","z":"d2143b4e.692a38","name":"Message","message":[{"message":"You have been successfully unsubscribed from DevOps Projects."}],"answer":false,"silent":false,"x":1260,"y":160,"wires":[["d5de9ffa.4aff7"]]},{"id":"d5de9ffa.4aff7","type":"link out","z":"d2143b4e.692a38","name":"Telegram Sender","links":["340c48e6.9a0198"],"x":1375,"y":160,"wires":[]},{"id":"3b8e4f1d.4ae6a","type":"inject","z":"d2143b4e.692a38","name":"Chat Subscriber","topic":"","payload":"{}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":840,"wires":[["78aee33b.bad91c"]]},{"id":"1f84847.f9ddc7c","type":"mongodb in","z":"d2143b4e.692a38","mongodb":"1d161765.a25dc9","name":"chats.find()","collection":"chats","operation":"find","x":290,"y":760,"wires":[["9a9de71b.235fd8","9cf89118.b2c6d"]]},{"id":"9a9de71b.235fd8","type":"split","z":"d2143b4e.692a38","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":440,"y":760,"wires":[["9cf89118.b2c6d","d6c5728e.9885"]]},{"id":"f5e574f2.913a08","type":"chatbot-conversation","z":"d2143b4e.692a38","name":"Telegram","botDevelopment":"261672c5.53165e","botProduction":"261672c5.53165e","chatId":"","userId":"","transport":"telegram","store":"541f6324.99a4bc","x":700,"y":720,"wires":[["383c9e07.9f7c32","9cf89118.b2c6d"]]},{"id":"c6dbf32e.44c12","type":"mqtt out","z":"5a5a273b.f680c8","name":"","topic":"subscribers/project_saved","qos":"","retain":"","broker":"a2636dba.09499","x":520,"y":220,"wires":[]},{"id":"4719381d.87a328","type":"mqtt in","z":"d2143b4e.692a38","name":"","topic":"subscribers/project_saved","qos":"2","datatype":"json","broker":"a2636dba.09499","x":130,"y":700,"wires":[["78aee33b.bad91c"]]},{"id":"78aee33b.bad91c","type":"function","z":"d2143b4e.692a38","name":"Prepare Message","func":"if (Array.isArray(msg.payload)) {\n msg.submission = msg.payload[0];\n}\nelse {\n msg.submission = msg.payload;\n}\n\nmsg.message = msg.submission.url;\nmsg.payload = {};\nreturn msg;","outputs":1,"noerr":0,"x":110,"y":760,"wires":[["1f84847.f9ddc7c","3362bf6d.164d3"]]},{"id":"ca6e6c34.311af","type":"debug","z":"d2143b4e.692a38","name":"Subscription Message","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1420,"y":720,"wires":[]},{"id":"976826b5.cd7178","type":"link out","z":"d2143b4e.692a38","name":"Telegram Sender","links":["340c48e6.9a0198"],"x":1335,"y":760,"wires":[]},{"id":"383c9e07.9f7c32","type":"change","z":"d2143b4e.692a38","name":"Message","rules":[{"t":"set","p":"payload","pt":"msg","to":"message","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":900,"y":760,"wires":[["1410b638.7d65aa"]]},{"id":"95dd012c.1e41c","type":"function","z":"d2143b4e.692a38","name":"messages.sent","func":"msg.measurement = \"messages\";\nmsg.payload = [\n{\n sent: 1,\n},\n{\n // Dirrty! https://stackoverflow.com/questions/13506460/how-to-extract-the-host-from-a-url-in-javascript\n transport: msg.originalMessage.transport,\n type: msg.submission.type,\n source: msg.submission.source\n}\n];\nreturn msg;","outputs":1,"noerr":0,"x":1240,"y":800,"wires":[["8eca501d.67724"]]},{"id":"8eca501d.67724","type":"influxdb out","z":"d2143b4e.692a38","influxdb":"7b3bc72b.d79f28","name":"messages.sent","measurement":"","precision":"","retentionPolicy":"","x":1240,"y":840,"wires":[]},{"id":"5c63f26e.ddb53c","type":"function","z":"a032bf06.43f62","name":"Format Output","func":"msg.payload.forEach(function(item){\n var d = new Date(item.creation_date).toISOString();\n //var date_format_str = (d.getDate().toString().length==2?d.getDate().toString():\"0\"+d.getDate().toString())+\".\"+((d.getMonth()+1).toString().length==2?(d.getMonth()+1).toString():\"0\"+(d.getMonth()+1).toString())+\".\"+d.getFullYear().toString()+\" \"+(d.getHours().toString().length==2?d.getHours().toString():\"0\"+d.getHours().toString())+\":\"+((parseInt(d.getMinutes()/5)*5).toString().length==2?(parseInt(d.getMinutes()/5)*5).toString():\"0\"+(parseInt(d.getMinutes()/5)*5).toString())+\":00\";\n item.human_date = d;\n var upvotes = 0;\n if (\"upvotes\" in item) {\n upvotes = item.upvotes.length;\n }\n var downvotes = 0;\n if (\"downvotes\" in item) {\n downvotes = item.downvotes.length;\n }\n item.karma = upvotes - downvotes;\n});\nmsg.projects = msg.payload;\nmsg.project_count = msg.payload.length;\nmsg.payload = {};\nreturn msg;","outputs":1,"noerr":0,"x":820,"y":100,"wires":[["300fd786.cce768"]]},{"id":"5b685f2.714e0a","type":"chatbot-slack-receive","z":"d2143b4e.692a38","bot":"7baccb8.5801834","botProduction":"61419cd.6325264","x":100,"y":160,"wires":[["a8598592.95cd28","57c09e95.7a55b","720ca4dc.c5322c"]]},{"id":"179f424b.d8145e","type":"chatbot-slack-send","z":"d2143b4e.692a38","bot":"7baccb8.5801834","botProduction":"61419cd.6325264","track":false,"passThrough":false,"outputs":0,"x":1750,"y":280,"wires":[]},{"id":"9cf89118.b2c6d","type":"debug","z":"d2143b4e.692a38","name":"Message Routing","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":950,"y":940,"wires":[]},{"id":"c39e44c6.b97228","type":"chatbot-rules","z":"d2143b4e.692a38","name":"Sender","rules":[{"type":"transport","transport":"telegram"},{"type":"transport","transport":"slack"}],"outputs":2,"x":1560,"y":260,"wires":[["910469ea.e66448"],["179f424b.d8145e"]]},{"id":"b09d6a85.e82a68","type":"link in","z":"d2143b4e.692a38","name":"RedBot IN","links":["a8598592.95cd28"],"x":335,"y":60,"wires":[["c528dd56.9939f8","411ada87.a30f74","c250196c.76bfc8","bbc58f04.ae3","800539af.f022c8","32332439.3adc3c","c8b0b899.b0abc8"]]},{"id":"a8598592.95cd28","type":"link out","z":"d2143b4e.692a38","name":"RedBot IN","links":["b09d6a85.e82a68"],"x":275,"y":60,"wires":[]},{"id":"1c4da1f9.e0003e","type":"function","z":"d2143b4e.692a38","name":"Subscriptions","func":"msg.payload = [\n{\n subscribe: 1,\n},\n{\n // Dirrty! https://stackoverflow.com/questions/13506460/how-to-extract-the-host-from-a-url-in-javascript\n transport: msg.originalMessage.transport\n}\n];\nmsg.measurement = \"subscriptions\";\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":620,"wires":[["aaa69a60.4c3318"]]},{"id":"aaa69a60.4c3318","type":"influxdb out","z":"d2143b4e.692a38","influxdb":"7b3bc72b.d79f28","name":"subscriptions","measurement":"","precision":"","retentionPolicy":"","x":400,"y":660,"wires":[]},{"id":"c90c0509.7326e8","type":"function","z":"d2143b4e.692a38","name":"Unsubscriptions","func":"msg.payload = [\n{\n unsubscribe: 1,\n},\n{\n // Dirrty! https://stackoverflow.com/questions/13506460/how-to-extract-the-host-from-a-url-in-javascript\n transport: msg.originalMessage.transport\n}\n];\nmsg.measurement = \"subscriptions\";\nreturn msg;","outputs":1,"noerr":0,"x":800,"y":620,"wires":[["68dc7c28.438b94"]]},{"id":"68dc7c28.438b94","type":"influxdb out","z":"d2143b4e.692a38","influxdb":"7b3bc72b.d79f28","name":"subscriptions","measurement":"","precision":"","retentionPolicy":"","x":800,"y":660,"wires":[]},{"id":"1cda8fdf.71f7f","type":"http in","z":"a032bf06.43f62","name":"[GET] /devops/install/slack","url":"/devops/install/slack","method":"get","upload":false,"swaggerDoc":"","x":170,"y":260,"wires":[["ec00a2ea.299d7"]]},{"id":"1cd0db7e.754555","type":"http response","z":"a032bf06.43f62","name":"","statusCode":"","headers":{},"x":670,"y":260,"wires":[]},{"id":"ec00a2ea.299d7","type":"function","z":"a032bf06.43f62","name":"Redirect to Slack OAuth Flow","func":"msg.statusCode = 302;\nmsg.headers = {\n Location: \"https://slack.com/oauth/authorize?client_id=894714422528.915123643254&scope=bot,incoming-webhook,commands\"\n}\ndelete msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":470,"y":260,"wires":[["1cd0db7e.754555"]]},{"id":"2e5e950b.543a0a","type":"http in","z":"a032bf06.43f62","name":"[GET] /devops/install/slack/oauth","url":"/devops/install/slack/oauth","method":"get","upload":false,"swaggerDoc":"","x":190,"y":320,"wires":[["57489023.5de47"]]},{"id":"ee44a606.11ade8","type":"http request","z":"a032bf06.43f62","name":"Get OAuth Token from Slack","method":"POST","ret":"obj","paytoqs":false,"url":"https://slack.com/api/oauth.access","tls":"","persist":false,"proxy":"","authType":"","x":740,"y":320,"wires":[["cb80fc03.dd968"]]},{"id":"57489023.5de47","type":"function","z":"a032bf06.43f62","name":"Redirect to Slack OAuth Flow","func":"msg.headers = {\n \"Content-Type\": \"application/x-www-form-urlencoded\"\n}\nmsg.payload.client_id = \"894714422528.915123643254\";\nmsg.payload.client_secret = \"4cafe598232a19e46168fbb695b76c56\";\nreturn msg;","outputs":1,"noerr":0,"x":470,"y":320,"wires":[["ee44a606.11ade8"]]},{"id":"f73ff732.8ab148","type":"http response","z":"a032bf06.43f62","name":"","statusCode":"","headers":{},"x":710,"y":380,"wires":[]},{"id":"3e187ec4.982682","type":"template","z":"a032bf06.43f62","name":"Success","field":"payload","fieldType":"msg","format":"html","syntax":"mustache","template":"<html>\n <head>\n <title>DevOps Projects</title>\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\" integrity=\"sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm\" crossorigin=\"anonymous\">\n <meta name=\"slack-app-id\" content=\"AS0E9BZS5\">\n <!-- Bootstrap core CSS -->\n\n <!-- Custom fonts for this template -->\n <link href=\"https://fonts.googleapis.com/css?family=Catamaran:100,200,300,400,500,600,700,800,900\" rel=\"stylesheet\">\n <link href=\"https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i\" rel=\"stylesheet\">\n\n\n <style>\n body {\n font-family: 'Lato';\n }\n \n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-family: 'Catamaran';\n font-weight: 800 !important;\n }\n \n .btn-xl {\n text-transform: uppercase;\n padding: 1.5rem 3rem;\n font-size: 0.9rem;\n font-weight: 700;\n letter-spacing: 0.1rem;\n }\n \n .bg-black {\n background-color: #000 !important;\n }\n \n .rounded-pill {\n border-radius: 5rem;\n }\n \n .navbar-custom {\n padding-top: 1rem;\n padding-bottom: 1rem;\n background-color: rgba(0, 0, 0, 0.7);\n }\n \n .navbar-custom .navbar-brand {\n text-transform: uppercase;\n font-size: 1rem;\n letter-spacing: 0.1rem;\n font-weight: 700;\n }\n \n .navbar-custom .navbar-nav .nav-item .nav-link {\n text-transform: uppercase;\n font-size: 0.8rem;\n font-weight: 700;\n letter-spacing: 0.1rem;\n }\n \n header.masthead {\n position: relative;\n overflow: hidden;\n padding-top: calc(7rem + 72px);\n padding-bottom: 7rem;\n /*background: linear-gradient(0deg, #ff6a00 0%, #ee0979 100%);*/\n background-repeat: no-repeat;\n background-position: center center;\n background-attachment: scroll;\n background-size: cover;\n background-image: url(\"https://source.unsplash.com/wh-RPfR_3_M/\");\n }\n \n header.masthead .masthead-content {\n z-index: 1;\n position: relative;\n }\n \n header.masthead .masthead-content .masthead-heading {\n font-size: 4rem;\n }\n \n header.masthead .masthead-content .masthead-subheading {\n font-size: 2rem;\n }\n \n header.masthead .bg-circle {\n z-index: 0;\n position: absolute;\n border-radius: 100%;\n /*background: linear-gradient(0deg, #ee0979 0%, #ff6a00 100%);*/\n }\n \n header.masthead .bg-circle-1 {\n height: 90rem;\n width: 90rem;\n bottom: -55rem;\n left: -55rem;\n }\n \n header.masthead .bg-circle-2 {\n height: 50rem;\n width: 50rem;\n top: -25rem;\n right: -25rem;\n }\n \n header.masthead .bg-circle-3 {\n height: 20rem;\n width: 20rem;\n bottom: -10rem;\n right: 5%;\n }\n \n header.masthead .bg-circle-4 {\n height: 30rem;\n width: 30rem;\n top: -5rem;\n right: 35%;\n }\n \n @media (min-width: 992px) {\n header.masthead {\n padding-top: calc(10rem + 55px);\n padding-bottom: 10rem;\n }\n header.masthead .masthead-content .masthead-heading {\n font-size: 6rem;\n }\n header.masthead .masthead-content .masthead-subheading {\n font-size: 4rem;\n }\n }\n \n .bg-primary {\n background-color: #ee0979 !important;\n }\n \n .btn-primary {\n /*background-color: #ee0979;\n border-color: #ee0979;*/\n }\n \n .btn-primary:active, .btn-primary:focus, .btn-primary:hover {\n background-color: #bd0760 !important;\n border-color: #bd0760 !important;\n }\n \n .btn-primary:focus {\n box-shadow: 0 0 0 0.2rem rgba(238, 9, 121, 0.5);\n }\n \n .btn-secondary {\n background-color: #ff6a00;\n border-color: #ff6a00;\n }\n \n .btn-secondary:active, .btn-secondary:focus, .btn-secondary:hover {\n background-color: #cc5500 !important;\n border-color: #cc5500 !important;\n }\n \n .btn-secondary:focus {\n box-shadow: 0 0 0 0.2rem rgba(255, 106, 0, 0.5);\n }\n \n .project_list {\n list-style-type: none;\n }\n </style>\n\n </head>\n <body>\n <section>\n <div class=\"container\" id=\"projects\">\n <div class=\"row align-items-center\">\n <div class=\"col-lg-12 order-lg-2\">\n <div class=\"p-5\">\n <h1 class=\"text-center\">Slack successfully authorized</h1>\n </div>\n </div>\n </div>\n </div>\n </section>\n </body>\n</html>","output":"str","x":580,"y":380,"wires":[["f73ff732.8ab148"]]},{"id":"cb80fc03.dd968","type":"switch","z":"a032bf06.43f62","name":"","property":"payload.ok","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":390,"y":380,"wires":[["3e187ec4.982682"],["3cee5205.387d5e"]]},{"id":"3cee5205.387d5e","type":"template","z":"a032bf06.43f62","name":"Error","field":"payload","fieldType":"msg","format":"html","syntax":"mustache","template":"<html>\n <head>\n <title>DevOps Projects</title>\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\" integrity=\"sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm\" crossorigin=\"anonymous\">\n <meta name=\"slack-app-id\" content=\"AS0E9BZS5\">\n <!-- Bootstrap core CSS -->\n\n <!-- Custom fonts for this template -->\n <link href=\"https://fonts.googleapis.com/css?family=Catamaran:100,200,300,400,500,600,700,800,900\" rel=\"stylesheet\">\n <link href=\"https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i\" rel=\"stylesheet\">\n\n\n <style>\n body {\n font-family: 'Lato';\n }\n \n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-family: 'Catamaran';\n font-weight: 800 !important;\n }\n \n .btn-xl {\n text-transform: uppercase;\n padding: 1.5rem 3rem;\n font-size: 0.9rem;\n font-weight: 700;\n letter-spacing: 0.1rem;\n }\n \n .bg-black {\n background-color: #000 !important;\n }\n \n .rounded-pill {\n border-radius: 5rem;\n }\n \n .navbar-custom {\n padding-top: 1rem;\n padding-bottom: 1rem;\n background-color: rgba(0, 0, 0, 0.7);\n }\n \n .navbar-custom .navbar-brand {\n text-transform: uppercase;\n font-size: 1rem;\n letter-spacing: 0.1rem;\n font-weight: 700;\n }\n \n .navbar-custom .navbar-nav .nav-item .nav-link {\n text-transform: uppercase;\n font-size: 0.8rem;\n font-weight: 700;\n letter-spacing: 0.1rem;\n }\n \n header.masthead {\n position: relative;\n overflow: hidden;\n padding-top: calc(7rem + 72px);\n padding-bottom: 7rem;\n /*background: linear-gradient(0deg, #ff6a00 0%, #ee0979 100%);*/\n background-repeat: no-repeat;\n background-position: center center;\n background-attachment: scroll;\n background-size: cover;\n background-image: url(\"https://source.unsplash.com/wh-RPfR_3_M/\");\n }\n \n header.masthead .masthead-content {\n z-index: 1;\n position: relative;\n }\n \n header.masthead .masthead-content .masthead-heading {\n font-size: 4rem;\n }\n \n header.masthead .masthead-content .masthead-subheading {\n font-size: 2rem;\n }\n \n header.masthead .bg-circle {\n z-index: 0;\n position: absolute;\n border-radius: 100%;\n /*background: linear-gradient(0deg, #ee0979 0%, #ff6a00 100%);*/\n }\n \n header.masthead .bg-circle-1 {\n height: 90rem;\n width: 90rem;\n bottom: -55rem;\n left: -55rem;\n }\n \n header.masthead .bg-circle-2 {\n height: 50rem;\n width: 50rem;\n top: -25rem;\n right: -25rem;\n }\n \n header.masthead .bg-circle-3 {\n height: 20rem;\n width: 20rem;\n bottom: -10rem;\n right: 5%;\n }\n \n header.masthead .bg-circle-4 {\n height: 30rem;\n width: 30rem;\n top: -5rem;\n right: 35%;\n }\n \n @media (min-width: 992px) {\n header.masthead {\n padding-top: calc(10rem + 55px);\n padding-bottom: 10rem;\n }\n header.masthead .masthead-content .masthead-heading {\n font-size: 6rem;\n }\n header.masthead .masthead-content .masthead-subheading {\n font-size: 4rem;\n }\n }\n \n .bg-primary {\n background-color: #ee0979 !important;\n }\n \n .btn-primary {\n /*background-color: #ee0979;\n border-color: #ee0979;*/\n }\n \n .btn-primary:active, .btn-primary:focus, .btn-primary:hover {\n background-color: #bd0760 !important;\n border-color: #bd0760 !important;\n }\n \n .btn-primary:focus {\n box-shadow: 0 0 0 0.2rem rgba(238, 9, 121, 0.5);\n }\n \n .btn-secondary {\n background-color: #ff6a00;\n border-color: #ff6a00;\n }\n \n .btn-secondary:active, .btn-secondary:focus, .btn-secondary:hover {\n background-color: #cc5500 !important;\n border-color: #cc5500 !important;\n }\n \n .btn-secondary:focus {\n box-shadow: 0 0 0 0.2rem rgba(255, 106, 0, 0.5);\n }\n \n .project_list {\n list-style-type: none;\n }\n </style>\n\n </head>\n <body>\n <section>\n <div class=\"container\" id=\"projects\">\n <div class=\"row align-items-center\">\n <div class=\"col-lg-12 order-lg-2\">\n <div class=\"p-5\">\n <h1 class=\"text-center\">Slack not authorized: {{payload.error}}</h1>\n </div>\n </div>\n </div>\n </div>\n </section>\n </body>\n</html>","output":"str","x":570,"y":420,"wires":[["957f6f70.8e385"]]},{"id":"957f6f70.8e385","type":"http response","z":"a032bf06.43f62","name":"","statusCode":"","headers":{},"x":710,"y":420,"wires":[]},{"id":"4ea18698.f878c8","type":"debug","z":"d2143b4e.692a38","name":"Save Subscriber","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":180,"y":600,"wires":[]},{"id":"86d1ad44.f6746","type":"chatbot-conversation","z":"d2143b4e.692a38","name":"Slack","botDevelopment":"7baccb8.5801834","botProduction":"7baccb8.5801834","chatId":"","userId":"","transport":"slack","store":"541f6324.99a4bc","x":690,"y":800,"wires":[["383c9e07.9f7c32","9cf89118.b2c6d"]]},{"id":"d6c5728e.9885","type":"switch","z":"d2143b4e.692a38","name":"","property":"payload.transport","propertyType":"msg","rules":[{"t":"eq","v":"telegram","vt":"str"},{"t":"eq","v":"slack","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":570,"y":760,"wires":[["f5e574f2.913a08"],["86d1ad44.f6746"]]},{"id":"bbc58f04.ae3","type":"chatbot-listen","z":"d2143b4e.692a38","name":"Submit URL","showdebug":true,"rules":["[url]->submission_url"],"outputs":1,"x":470,"y":360,"wires":[["815b2677.448758"]]},{"id":"815b2677.448758","type":"function","z":"d2143b4e.692a38","name":"Parse URL","func":"var chat = msg.chat();\nchat.get('submission_url')\n .then(function(value) {\n msg.payload.submission_url = value;\n })\n .then(function() {\n node.send(msg); // pass thru when the chat.set is over\n });\n//return msg;","outputs":1,"noerr":0,"x":630,"y":360,"wires":[["9e79eba6.7ff848"]]},{"id":"3d47303f.99425","type":"chatbot-message","z":"d2143b4e.692a38","name":"Message","message":[{"message":"You submitted {{submission_url}}"}],"answer":false,"silent":false,"x":800,"y":360,"wires":[["8c59e218.f54bc"]]},{"id":"8c59e218.f54bc","type":"link out","z":"d2143b4e.692a38","name":"Telegram Sender","links":["340c48e6.9a0198"],"x":895,"y":360,"wires":[]},{"id":"9e79eba6.7ff848","type":"mqtt out","z":"d2143b4e.692a38","name":"","topic":"submission","qos":"","retain":"","broker":"a2636dba.09499","x":810,"y":400,"wires":[]},{"id":"acf735f4.5d6dc8","type":"mqtt in","z":"f560aa61.449308","name":"","topic":"submission","qos":"2","datatype":"json","broker":"a2636dba.09499","x":90,"y":80,"wires":[["a3af9b79.c7c3f8"]]},{"id":"ffa5019.2e3bc","type":"unfluff","z":"f560aa61.449308","name":"Scrape","url":"","x":380,"y":260,"wires":[["8e3e7f71.ce05c","81887dec.3de56","5112e61b.7dbc18"]]},{"id":"87b70901.c852c8","type":"function","z":"f560aa61.449308","name":"Prepare URL Lookup","func":"msg.url = msg.payload.submission_url;\n\nif (msg.url.includes(\"peter.saarland\")) {\n node.error(\"peter.saarland submitted\");\n return;\n}\n\nmsg.context = msg.payload;\nmsg.payload = {}\nmsg.payload.url = msg.url;\nmsg.collection = \"submission\";\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":120,"wires":[["920a27c6.4eee28"]]},{"id":"9010f0be.9809e","type":"catch","z":"f560aa61.449308","name":"","scope":null,"uncaught":true,"x":100,"y":40,"wires":[["afcb3e5c.4b075"]]},{"id":"afcb3e5c.4b075","type":"debug","z":"f560aa61.449308","name":"Submission Errors","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":410,"y":40,"wires":[]},{"id":"200ada40.820b56","type":"switch","z":"f560aa61.449308","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"false","repair":false,"outputs":2,"x":370,"y":220,"wires":[["55f5c8b3.e4e868"],["ffa5019.2e3bc"]]},{"id":"50f0b9bf.1143a8","type":"function","z":"f560aa61.449308","name":"Enrich","func":"if (msg.payload.title === \"\" || msg.payload.title == \"504 Gateway Time-out\") {\n // Parsing Error or Deadlink\n node.error(\"Empty Project Title. Discarding URL \"+msg.payload.url, msg);\n \n // Output 2\n return [null,msg]\n}\n\nif (msg.payload.tags.length < 1) {\n node.error(\"No Tags have been parsed; Discarding: \"+msg.payload.url, msg);\n \n // Output 2\n return [null,msg]\n}\n\nif (\"festanstellung\" in msg.payload.tags) {\n node.error(\"Festanstellung; Discarding: \"+msg.payload.url, msg);\n \n // Output 2\n return [null,msg]\n}\n\ndelete msg.payload.softTitle;\ndelete msg.payload.date;\ndelete msg.payload.copyright;\ndelete msg.payload.favicon;\ndelete msg.payload.description;\ndelete msg.payload.lang;\ndelete msg.payload.image;\ndelete msg.payload.videos;\ndelete msg.payload.links;\ndelete msg.payload.text;\ndelete msg.payload.author;\ndelete msg.payload.publisher;\n\nif (msg.payload.canonicalLink === \"\" || !msg.payload.canonicalLink) {\n msg.payload.canonicalLink = msg.url; \n}\n\nif (msg.payload.url === \"\" || !msg.payload.url) {\n msg.payload.url = msg.url;\n}\n\nvar url = \"\";\nvar match = msg.url.match(/:\\/\\/(www[0-9]?\\.)?(.[^/:]+)/i);\nif (match !== null && match.length > 2 && typeof match[2] === 'string' && match[2].length > 0) {\n msg.payload.source = match[2];\n}\nelse {\n msg.payload.source = \"\";\n}\n\nmsg.payload.creation_date = new Date(Date.now());\nmsg.payload.type = msg.topic;\nmsg.collection = \"submission\";\n\nreturn [msg,null]","outputs":2,"noerr":0,"x":370,"y":360,"wires":[["5112e61b.7dbc18","4c7e6e1d.d8a2a","c5e34ac6.853df8","b7f41d1e.47913"],["55f5c8b3.e4e868"]]},{"id":"920a27c6.4eee28","type":"mongodb in","z":"f560aa61.449308","mongodb":"1d161765.a25dc9","name":"","collection":"","operation":"find","x":390,"y":160,"wires":[["200ada40.820b56"]]},{"id":"6f8dd55b.7ec71c","type":"function","z":"f560aa61.449308","name":"submissions.received","func":"msg.measurement = \"submissions\";\nmsg.payload = [\n{\n received: 1,\n},\n{\n // Dirrty! https://stackoverflow.com/questions/13506460/how-to-extract-the-host-from-a-url-in-javascript\n transport: msg.payload.transport,\n type: msg.topic\n}\n];\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":80,"wires":[["4413b173.e466b"]]},{"id":"4413b173.e466b","type":"influxdb out","z":"f560aa61.449308","influxdb":"7b3bc72b.d79f28","name":"submissions.received","measurement":"","precision":"","retentionPolicy":"","x":660,"y":80,"wires":[]},{"id":"5112e61b.7dbc18","type":"debug","z":"f560aa61.449308","name":"scraping output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":640,"y":240,"wires":[]},{"id":"3574dc34.c1ee94","type":"split","z":"5a5a273b.f680c8","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":480,"y":460,"wires":[["9dcef64b.3ac618"]]},{"id":"9dcef64b.3ac618","type":"function","z":"5a5a273b.f680c8","name":"Prepare Query","func":"// We delete projects from the index after 10 days\n//var d = new Date();\n//d.setDate(d.getDate()-10);\n//msg.payload.creation_date = {\n// \"$gte\": d\n//}\nvar now = Date.now();\nvar d = new Date(msg.payload.creation_date);\n\nvar diff = Math.abs(now - d)/1000/60/60/24;\n\nmsg.age = diff;\n\nif (diff > 30) {\n msg.payload = {};\n msg.payload._id = msg.payload._id;\n return msg;\n}\n\n\n","outputs":1,"noerr":0,"x":640,"y":460,"wires":[["570b11d4.68746","fc641242.a4361"]]},{"id":"fc641242.a4361","type":"mongodb out","z":"5a5a273b.f680c8","mongodb":"1d161765.a25dc9","name":"Delete project","collection":"projects","payonly":true,"upsert":false,"multi":false,"operation":"delete","x":840,"y":460,"wires":[]},{"id":"13bc0568.cdd13b","type":"influxdb in","z":"a032bf06.43f62","influxdb":"7b3bc72b.d79f28","name":"","query":"select * from access_log;","rawOutput":false,"precision":"","retentionPolicy":"","x":1260,"y":100,"wires":[["c5689175.660af"]]},{"id":"750b9fc9.ec275","type":"inject","z":"a032bf06.43f62","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":200,"y":520,"wires":[[]]},{"id":"c5689175.660af","type":"function","z":"a032bf06.43f62","name":"Format Output","func":"msg.access_log = msg.payload.length;\nmsg.payload = {};\nreturn msg;","outputs":1,"noerr":0,"x":1540,"y":100,"wires":[["2486f51f.2df67a"]]},{"id":"618a1d11.0211f4","type":"debug","z":"a032bf06.43f62","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":990,"y":260,"wires":[]},{"id":"2486f51f.2df67a","type":"influxdb in","z":"a032bf06.43f62","influxdb":"7b3bc72b.d79f28","name":"","query":"select sent from messages;","rawOutput":false,"precision":"","retentionPolicy":"","x":1270,"y":140,"wires":[["815da24e.a5067"]]},{"id":"815da24e.a5067","type":"function","z":"a032bf06.43f62","name":"Format Output","func":"msg.messages_sent = msg.payload.length;\nmsg.payload = {};\nreturn msg;","outputs":1,"noerr":0,"x":1560,"y":140,"wires":[["71b5352f.31e23c"]]},{"id":"9bb7e4eb.4fa438","type":"http in","z":"277a1fd9.7eb88","name":"","url":"/traveltime","method":"get","upload":false,"swaggerDoc":"","x":119.99999237060547,"y":113.33332824707031,"wires":[["a7113238.121d5"]]},{"id":"a7113238.121d5","type":"http request","z":"277a1fd9.7eb88","name":"Travel to work","method":"GET","ret":"txt","paytoqs":false,"url":"https://maps.googleapis.com/maps/api/distancematrix/json?origins=353+Uxbridge+Road+London+W3+9RH&destinations=Bridgehouse+Oxford Rd+Uxbridge+UB8+1HS&key=your_api_key&mode=driving&units=metric&departure_time=now","tls":"","persist":false,"proxy":"","authType":"","x":344.9000244140625,"y":111.73336791992188,"wires":[["1954be4c.cb9912"]]},{"id":"1954be4c.cb9912","type":"json","z":"277a1fd9.7eb88","name":"","x":545.9000511169434,"y":110.73336791992188,"wires":[["3e4df300.d1f2bc","62502ffa.1694e"]]},{"id":"3e4df300.d1f2bc","type":"function","z":"277a1fd9.7eb88","name":"Parse data","func":"msg.payload = \"Driving time to work is \" + msg.payload.rows[0].elements[0].duration_in_traffic.text.replace(\"mins\",\"minutes\");\n\nreturn msg;","outputs":1,"noerr":0,"x":720.9000091552734,"y":110.73336791992188,"wires":[["3019442e.d01c7c"]]},{"id":"3019442e.d01c7c","type":"http response","z":"277a1fd9.7eb88","name":"","statusCode":"","headers":{},"x":898.0000152587891,"y":110.13336849212646,"wires":[]},{"id":"1e4b6021.2154f","type":"http in","z":"277a1fd9.7eb88","name":"","url":"/traveltime2","method":"get","upload":false,"swaggerDoc":"","x":118.23346710205078,"y":286.7333984375,"wires":[["6e137ace.c0e374","e4e28fc3.66d83"]]},{"id":"cdcc9dc7.6f912","type":"json","z":"277a1fd9.7eb88","name":"","x":548.1335182189941,"y":286.13339042663574,"wires":[["94afbc8e.bba17"]]},{"id":"94afbc8e.bba17","type":"function","z":"277a1fd9.7eb88","name":"Parse data","func":"msg.topic = \"work\";\nmsg.payload = msg.payload.rows[0].elements[0].duration_in_traffic.text.replace(\"mins\",\"minutes\");\n\nreturn msg;","outputs":1,"noerr":0,"x":720.1335792541504,"y":285.13339710235596,"wires":[["b356d22c.bfe01"]]},{"id":"f8568b42.72b6a8","type":"http response","z":"277a1fd9.7eb88","name":"","statusCode":"","headers":{},"x":1227.2335929870605,"y":284.53339862823486,"wires":[]},{"id":"c96fdd4b.6449a","type":"json","z":"277a1fd9.7eb88","name":"","x":540.2334594726562,"y":332.7333507537842,"wires":[["6c00c6bb.070f68"]]},{"id":"6c00c6bb.070f68","type":"function","z":"277a1fd9.7eb88","name":"Parse data","func":"msg.topic = \"airport\";\nmsg.payload = msg.payload.rows[0].elements[0].duration_in_traffic.text.replace(\"mins\",\"minutes\");\n\nreturn msg;","outputs":1,"noerr":0,"x":722.2334594726562,"y":332.7333507537842,"wires":[["b356d22c.bfe01"]]},{"id":"b356d22c.bfe01","type":"join","z":"277a1fd9.7eb88","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":882.7334861755371,"y":283.93339920043945,"wires":[["fe463642.225468","b793f8f0.4bc578"]]},{"id":"fe463642.225468","type":"function","z":"277a1fd9.7eb88","name":"Parse data","func":"msg.payload = \"Driving time to work is \" + msg.payload.work + \", and to Heathrow T5 is \" + msg.payload.airport;\n\nreturn msg;","outputs":1,"noerr":0,"x":1054.2334594726562,"y":284.7333507537842,"wires":[["f8568b42.72b6a8"]]},{"id":"60aa245c.1522dc","type":"comment","z":"277a1fd9.7eb88","name":"Get travel time","info":"This flow uses the travel distance API to get the \ntravel time in between to places.","x":117.5,"y":55.33334255218506,"wires":[]},{"id":"62502ffa.1694e","type":"debug","z":"277a1fd9.7eb88","name":"","active":true,"console":"false","complete":"false","x":717.5000228881836,"y":165.66668796539307,"wires":[]},{"id":"6b542ad3.f0ebf4","type":"comment","z":"277a1fd9.7eb88","name":"Get multiple travel times","info":"This flow is similar to the above, but executes\ntwo queries for two different routes and later \ncombines the results to one single message.","x":139.99999237060547,"y":239.99998474121094,"wires":[]},{"id":"6e137ace.c0e374","type":"http request","z":"277a1fd9.7eb88","name":"Travel to work","method":"GET","ret":"txt","url":"https://maps.googleapis.com/maps/api/distancematrix/json?origins=353+Uxbridge+Road+London+W3+9RH&destinations=Bridgehouse+Oxford Rd+Uxbridge+UB8+1HS&key=your_api_key&mode=driving&units=metric&departure_time=now","tls":"","x":354.9999885559082,"y":286.66664028167725,"wires":[["cdcc9dc7.6f912"]]},{"id":"e4e28fc3.66d83","type":"http request","z":"277a1fd9.7eb88","name":"Travel to work","method":"GET","ret":"txt","url":"https://maps.googleapis.com/maps/api/distancematrix/json?origins=353+Uxbridge+Road+London+W3+9RH&destinations=Heathrow+Business+Parking+Terminal+5&key=your_api_key&mode=driving&units=metric&departure_time=now","tls":"","x":353.33331298828125,"y":331.6666450500488,"wires":[["c96fdd4b.6449a"]]},{"id":"b793f8f0.4bc578","type":"debug","z":"277a1fd9.7eb88","name":"","active":true,"console":"false","complete":"false","x":1060,"y":341.6666564941406,"wires":[]},{"id":"780b5f12.7e4c6","type":"comment","z":"277a1fd9.7eb88","name":"Next tram","info":"This flow uses the directions API to get directions\ndata and in this case using public transport.\nUnfortunately this cannot be used to get a \ntimetable of a stop showing future arrivals\nbut can be used to get the next bus/tram\narriving at a particular stop.","x":96.66665649414062,"y":419.9999694824219,"wires":[]},{"id":"fbefe068.f250d","type":"http in","z":"277a1fd9.7eb88","name":"","url":"/nexttram","method":"get","upload":false,"swaggerDoc":"","x":109.99999237060547,"y":468.33331298828125,"wires":[["b2f6a462.71bef8"]]},{"id":"b2f6a462.71bef8","type":"http request","z":"277a1fd9.7eb88","name":"Next Tram","method":"GET","ret":"txt","url":"https://maps.googleapis.com/maps/api/directions/json?origin=place_id:ChIJa8o4LH7nQUcRo2XNV7Ae-Vs&destination=place_id:ChIJuV9SgJndQUcRJRrgPQ7ajjw&key=your_api_key&mode=transit&units=metric&transit_mode=tram&departure_time=now","tls":"","x":334.9000244140625,"y":466.7333526611328,"wires":[["44d9641c.3b2ffc"]]},{"id":"44d9641c.3b2ffc","type":"json","z":"277a1fd9.7eb88","name":"","x":545.9000511169434,"y":465.7333526611328,"wires":[["d2a4d649.443588","571e6002.4be4f"]]},{"id":"d2a4d649.443588","type":"function","z":"277a1fd9.7eb88","name":"Parse data","func":"msg.payload = \"Next tram is number \" + msg.payload.routes[0].legs[0].steps[0].transit_details.line.short_name + \" leaving at \" + msg.payload.routes[0].legs[0].steps[0].transit_details.departure_time.text;\n\nreturn msg;","outputs":1,"noerr":0,"x":720.9000091552734,"y":465.7333526611328,"wires":[["856b1c26.a85fd"]]},{"id":"856b1c26.a85fd","type":"http response","z":"277a1fd9.7eb88","name":"","statusCode":"","headers":{},"x":898.0000152587891,"y":465.1333532333374,"wires":[]},{"id":"571e6002.4be4f","type":"debug","z":"277a1fd9.7eb88","name":"","active":true,"console":"false","complete":"false","x":717.5000228881836,"y":520.666672706604,"wires":[]},{"id":"9172adb8.4b5cf","type":"inject","z":"277a1fd9.7eb88","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":260,"y":180,"wires":[["a7113238.121d5"]]},{"id":"4c7e6e1d.d8a2a","type":"mongodb out","z":"f560aa61.449308","mongodb":"1d161765.a25dc9","name":"Store Submission","collection":"","payonly":true,"upsert":false,"multi":false,"operation":"insert","x":650,"y":340,"wires":[]},{"id":"c5e34ac6.853df8","type":"function","z":"f560aa61.449308","name":"submissions.saved","func":"msg.measurement = \"submissions\";\nmsg.payload = [\n{\n saved: 1\n},\n{\n // Dirrty! https://stackoverflow.com/questions/13506460/how-to-extract-the-host-from-a-url-in-javascript\n source: msg.payload.source,\n transport: msg.context.transport,\n type: msg.topic\n}\n];\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":400,"wires":[["493218cd.8a1348"]]},{"id":"493218cd.8a1348","type":"influxdb out","z":"f560aa61.449308","influxdb":"7b3bc72b.d79f28","name":"submissions.saved","measurement":"","precision":"","retentionPolicy":"","x":650,"y":440,"wires":[]},{"id":"5f6b2f82.267c6","type":"function","z":"a032bf06.43f62","name":"Format Output","func":"msg.payload.forEach(function(item){\n var d = new Date(item.creation_date).toISOString();\n //var date_format_str = (d.getDate().toString().length==2?d.getDate().toString():\"0\"+d.getDate().toString())+\".\"+((d.getMonth()+1).toString().length==2?(d.getMonth()+1).toString():\"0\"+(d.getMonth()+1).toString())+\".\"+d.getFullYear().toString()+\" \"+(d.getHours().toString().length==2?d.getHours().toString():\"0\"+d.getHours().toString())+\":\"+((parseInt(d.getMinutes()/5)*5).toString().length==2?(parseInt(d.getMinutes()/5)*5).toString():\"0\"+(parseInt(d.getMinutes()/5)*5).toString())+\":00\";\n item.human_date = d;\n var upvotes = 0;\n if (\"upvotes\" in item) {\n upvotes = item.upvotes.length;\n }\n var downvotes = 0;\n if (\"downvotes\" in item) {\n downvotes = item.downvotes.length;\n }\n item.karma = upvotes - downvotes;\n});\nmsg.submissions = msg.payload;\nmsg.submission_count = msg.payload.length;\nmsg.payload = {};\nreturn msg;","outputs":1,"noerr":0,"x":820,"y":160,"wires":[["13bc0568.cdd13b","618a1d11.0211f4"]]},{"id":"ad9afaf2.34a488","type":"mongodb in","z":"a032bf06.43f62","mongodb":"1d161765.a25dc9","name":"Submissions","collection":"","operation":"find","x":650,"y":160,"wires":[["5f6b2f82.267c6"]]},{"id":"300fd786.cce768","type":"function","z":"a032bf06.43f62","name":"Get Submissions","func":"msg.payload = {\n \"type\": \"submission\"\n}\nmsg.limit = 20;\nmsg.collection = \"submission\";\nmsg.sort = { \"creation_date\": -1 }\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":160,"wires":[["ad9afaf2.34a488"]]},{"id":"9178a72.fc7b558","type":"mqtt in","z":"f560aa61.449308","name":"","topic":"project","qos":"2","datatype":"json","broker":"a2636dba.09499","x":70,"y":140,"wires":[["a3af9b79.c7c3f8"]]},{"id":"c687aa76.a49638","type":"mqtt out","z":"7f677ad1.038694","name":"","topic":"project","qos":"","retain":"","broker":"a2636dba.09499","x":290,"y":200,"wires":[]},{"id":"10850b3a.bf64a5","type":"mqtt out","z":"f560aa61.449308","name":"","topic":"subscribers/project_saved","qos":"","retain":"","broker":"a2636dba.09499","x":920,"y":380,"wires":[]},{"id":"3362bf6d.164d3","type":"debug","z":"d2143b4e.692a38","name":"Submission","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":370,"y":860,"wires":[]},{"id":"85774e66.1059d","type":"influxdb out","z":"f560aa61.449308","influxdb":"7b3bc72b.d79f28","name":"actions.scrape","measurement":"","precision":"","retentionPolicy":"","x":880,"y":200,"wires":[]},{"id":"8e3e7f71.ce05c","type":"function","z":"f560aa61.449308","name":"actions.scrape","func":"msg.measurement = \"actions\";\nmsg.payload = [\n{\n scrape: 1,\n},\n{\n // Dirrty! https://stackoverflow.com/questions/13506460/how-to-extract-the-host-from-a-url-in-javascript\n transport: msg.context.transport,\n type: msg.topic\n}\n];\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":200,"wires":[["85774e66.1059d"]]},{"id":"abe40f0d.a1849","type":"chatbot-inline-buttons","z":"d2143b4e.692a38","name":"Welcome","buttons":[],"message":"","x":1220,"y":760,"wires":[["976826b5.cd7178","95dd012c.1e41c","ca6e6c34.311af"]]},{"id":"1410b638.7d65aa","type":"function","z":"d2143b4e.692a38","name":"Prepare Button","func":"msg.payload = {\n message: msg.submission.url,\n buttons: [\n {\n type: 'postback',\n value: '/upvote '+msg.submission._id,\n label: 'Upvote',\n alert: true\n },\n {\n type: 'postback',\n value: '/downvote '+msg.submission._id,\n label: 'Downvote',\n alert: true\n },\n ]\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":1060,"y":760,"wires":[["abe40f0d.a1849"]]},{"id":"800539af.f022c8","type":"chatbot-command","z":"d2143b4e.692a38","name":"","command":"/upvote","x":460,"y":220,"wires":[["5a187f12.8644c"]]},{"id":"b7f41d1e.47913","type":"delay","z":"f560aa61.449308","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":650,"y":300,"wires":[["f7f717b3.52f028"]]},{"id":"f7f717b3.52f028","type":"mongodb in","z":"f560aa61.449308","mongodb":"1d161765.a25dc9","name":"","collection":"","operation":"find","x":870,"y":300,"wires":[["3b2d2055.6e75"]]},{"id":"3b2d2055.6e75","type":"switch","z":"f560aa61.449308","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"false","repair":false,"outputs":2,"x":850,"y":340,"wires":[["10850b3a.bf64a5"],[]]},{"id":"d2c66f96.e9123","type":"mongodb in","z":"d2143b4e.692a38","mongodb":"1d161765.a25dc9","name":"","collection":"","operation":"find","x":1470,"y":380,"wires":[["1c05bb76.3ad985"]]},{"id":"7468e80f.99eb18","type":"function","z":"d2143b4e.692a38","name":"Lookup submission","func":"msg.originalPayload = msg.payload;\n\nmsg.payload = {};\n\nif (\"arguments\" in msg.originalPayload) {\n msg.payload._id = msg.originalPayload.arguments[0];\n}\nelse {\n // check content for _id\n var a_million = msg.originalPayload.content.split(' ');\n \n if (1 in a_million) {\n msg.payload._id = a_million[1];\n }\n else {\n node.error(\"No _id found\", msg);\n return;\n }\n}\nmsg.collection = \"submission\";\nreturn msg;","outputs":1,"noerr":0,"x":1170,"y":380,"wires":[["77496072.7f10c"]]},{"id":"1c05bb76.3ad985","type":"switch","z":"d2143b4e.692a38","name":"","property":"payload","propertyType":"msg","rules":[{"t":"empty"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":1610,"y":380,"wires":[[],["3b052de7.8766a2"]]},{"id":"3b052de7.8766a2","type":"function","z":"d2143b4e.692a38","name":"Upvote","func":"//msg.payload = msg.originalPayload;\nmsg.payload = msg.payload[0];\nmsg._id = msg.payload._id;\n\nvar upvote_count = 0;\n\nif (\"upvotes\" in msg.payload) {\n if (! msg.payload.upvotes.includes(msg.originalMessage.chatId)) {\n msg.payload.upvotes.push(msg.originalMessage.chatId);\n }\n upvote_count = msg.payload.upvotes.length;\n}\nelse {\n msg.payload.upvotes = [msg.originalMessage.chatId];\n upvote_count++;\n}\nmsg.query = {};\nmsg.query._id = msg.payload._id;\nmsg.collection = \"submission\";\nreturn msg;","outputs":1,"noerr":0,"x":1740,"y":380,"wires":[["d6ff63d2.10ea6","39bca2c3.bf5a6e"]]},{"id":"509a5d5.d5683a4","type":"link in","z":"d2143b4e.692a38","name":"/upvote","links":["5a187f12.8644c"],"x":1035,"y":380,"wires":[["7468e80f.99eb18"]]},{"id":"d6ff63d2.10ea6","type":"function","z":"d2143b4e.692a38","name":"votes.upvoted","func":"msg.payload = [\n{\n upvoted: 1,\n},\n{\n // Dirrty! https://stackoverflow.com/questions/13506460/how-to-extract-the-host-from-a-url-in-javascript\n transport: msg.originalMessage.transport,\n source: msg.payload.source,\n type: msg.payload.type\n}\n];\nmsg.measurement = \"votes\";\nreturn msg;","outputs":1,"noerr":0,"x":1940,"y":420,"wires":[["788afd57.801a34"]]},{"id":"788afd57.801a34","type":"influxdb out","z":"d2143b4e.692a38","influxdb":"7b3bc72b.d79f28","name":"votes","measurement":"","precision":"","retentionPolicy":"","x":2110,"y":420,"wires":[]},{"id":"5a187f12.8644c","type":"link out","z":"d2143b4e.692a38","name":"/upvote","links":["509a5d5.d5683a4","3b6a9da6.806ba2"],"x":575,"y":220,"wires":[]},{"id":"77496072.7f10c","type":"objectid","z":"d2143b4e.692a38","name":"","selectedProperty":"_id","x":1330,"y":380,"wires":[["d2c66f96.e9123"]]},{"id":"39bca2c3.bf5a6e","type":"mongodb out","z":"d2143b4e.692a38","mongodb":"1d161765.a25dc9","name":"Update Upvotes","collection":"","payonly":true,"upsert":true,"multi":false,"operation":"update","x":1940,"y":380,"wires":[]},{"id":"e83e6b88.6657c8","type":"mqtt out","z":"43ce739f.db083c","name":"","topic":"project","qos":"","retain":"","broker":"a2636dba.09499","x":330,"y":200,"wires":[]},{"id":"629add64.0e5ae4","type":"mqtt out","z":"47ac7602.dc7818","name":"","topic":"project","qos":"","retain":"","broker":"a2636dba.09499","x":310,"y":280,"wires":[]},{"id":"a936a2.0824a96","type":"template","z":"a032bf06.43f62","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"This is the payload: {{payload}} !","output":"str","x":1180,"y":400,"wires":[[]]},{"id":"9999d5e5.afdf48","type":"chatbot-listen-lexicon","z":"bf1fa67d.661748","name":"DevOpsLexicon","values":["terraform","kubernetes","infrastructure as code","iac","ansible","devops","docker","swarm","vault","git","ci/cd","continuous deployment","continuous delivery","continuous integration","gitlab","github","cloud native","cloud-native","openshift","cluster"],"outputs":1,"x":680,"y":120,"wires":[[]]},{"id":"bffb308b.67ffd","type":"debug","z":"bf1fa67d.661748","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":470,"y":60,"wires":[]},{"id":"e5557c5.702048","type":"catch","z":"d2143b4e.692a38","name":"","scope":null,"uncaught":true,"x":120,"y":1040,"wires":[["50596d6c.581924"]]},{"id":"50596d6c.581924","type":"debug","z":"d2143b4e.692a38","name":"Submission Errors","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":370,"y":1040,"wires":[]},{"id":"afe2b4dc.332118","type":"influxdb out","z":"d2143b4e.692a38","influxdb":"7b3bc72b.d79f28","name":"votes","measurement":"","precision":"","retentionPolicy":"","x":2110,"y":540,"wires":[]},{"id":"5a61b23.574a44c","type":"function","z":"d2143b4e.692a38","name":"votes.downvoted","func":"msg.payload = [\n{\n downvoted: 1,\n},\n{\n // Dirrty! https://stackoverflow.com/questions/13506460/how-to-extract-the-host-from-a-url-in-javascript\n transport: msg.originalMessage.transport,\n source: msg.payload.source,\n type: msg.payload.type\n}\n];\nmsg.measurement = \"votes\";\nreturn msg;","outputs":1,"noerr":0,"x":1950,"y":540,"wires":[["afe2b4dc.332118"]]},{"id":"eba1cfc2.10887","type":"function","z":"d2143b4e.692a38","name":"Downvote","func":"//msg.payload = msg.originalPayload;\nmsg.payload = msg.payload[0];\nmsg._id = msg.payload._id;\n\nvar downvote_count = 0;\n\nif (\"downvotes\" in msg.payload) {\n if (! msg.payload.downvotes.includes(msg.originalMessage.chatId)) {\n msg.payload.downvotes.push(msg.originalMessage.chatId);\n }\n downvote_count = msg.payload.downvotes.length;\n}\nelse {\n msg.payload.downvotes = [msg.originalMessage.chatId];\n downvote_count++;\n}\nmsg.query = {};\nmsg.query._id = msg.payload._id;\nmsg.collection = \"submission\";\nreturn msg;","outputs":1,"noerr":0,"x":1740,"y":500,"wires":[["5a61b23.574a44c","3fec6134.ede4ae"]]},{"id":"4e5b1497.e4075c","type":"switch","z":"d2143b4e.692a38","name":"","property":"payload","propertyType":"msg","rules":[{"t":"empty"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":1610,"y":500,"wires":[[],["eba1cfc2.10887"]]},{"id":"3fec6134.ede4ae","type":"mongodb out","z":"d2143b4e.692a38","mongodb":"1d161765.a25dc9","name":"Update Downvotes","collection":"","payonly":true,"upsert":true,"multi":false,"operation":"update","x":1950,"y":500,"wires":[]},{"id":"e832c533.22ddb8","type":"mongodb in","z":"d2143b4e.692a38","mongodb":"1d161765.a25dc9","name":"","collection":"","operation":"find","x":1470,"y":500,"wires":[["4e5b1497.e4075c"]]},{"id":"4047c32f.f1d22c","type":"objectid","z":"d2143b4e.692a38","name":"","selectedProperty":"_id","x":1330,"y":500,"wires":[["e832c533.22ddb8"]]},{"id":"d61a34b.1c814c8","type":"function","z":"d2143b4e.692a38","name":"Lookup submission","func":"msg.originalPayload = msg.payload;\n\nmsg.payload = {};\n\nif (\"arguments\" in msg.originalPayload) {\n msg.payload._id = msg.originalPayload.arguments[0];\n}\nelse {\n // check content for _id\n var a_million = msg.originalPayload.content.split(' ');\n \n if (1 in a_million) {\n msg.payload._id = a_million[1];\n }\n else {\n node.error(\"No _id found\", msg);\n return;\n }\n}\nmsg.collection = \"submission\";\nreturn msg;","outputs":1,"noerr":0,"x":1170,"y":500,"wires":[["4047c32f.f1d22c"]]},{"id":"6fc27246.58a6ec","type":"link in","z":"d2143b4e.692a38","name":"/downvote","links":["12e0303.70c26d"],"x":1035,"y":500,"wires":[["d61a34b.1c814c8"]]},{"id":"32332439.3adc3c","type":"chatbot-command","z":"d2143b4e.692a38","name":"","command":"/downvote","x":470,"y":260,"wires":[["12e0303.70c26d"]]},{"id":"12e0303.70c26d","type":"link out","z":"d2143b4e.692a38","name":"/upvote","links":["6fc27246.58a6ec"],"x":575,"y":260,"wires":[]},{"id":"428fd83a.388358","type":"influxdb out","z":"d2143b4e.692a38","influxdb":"7b3bc72b.d79f28","name":"messages","measurement":"","precision":"","retentionPolicy":"","x":690,"y":20,"wires":[]},{"id":"c8b0b899.b0abc8","type":"function","z":"d2143b4e.692a38","name":"messages","func":"msg.measurement = \"messages\";\nmsg.payload = [\n{\n received: 1,\n},\n{\n // Dirrty! https://stackoverflow.com/questions/13506460/how-to-extract-the-host-from-a-url-in-javascript\n transport: msg.originalMessage.transport\n}\n];\nreturn msg;","outputs":1,"noerr":0,"x":470,"y":20,"wires":[["428fd83a.388358"]]},{"id":"e4f9811e.0bb49","type":"link in","z":"f560aa61.449308","name":"submission.in","links":["a3af9b79.c7c3f8"],"x":275,"y":80,"wires":[["6f8dd55b.7ec71c","87b70901.c852c8"]]},{"id":"a3af9b79.c7c3f8","type":"link out","z":"f560aa61.449308","name":"submission.in","links":["e4f9811e.0bb49"],"x":215,"y":80,"wires":[]},{"id":"55f5c8b3.e4e868","type":"function","z":"f560aa61.449308","name":"submissions.denied","func":"msg.measurement = \"submissions\";\nmsg.payload = [\n{\n denied: 1,\n},\n{\n // Dirrty! https://stackoverflow.com/questions/13506460/how-to-extract-the-host-from-a-url-in-javascript\n transport: msg.context.transport,\n type: msg.topic\n}\n];\nreturn msg;","outputs":1,"noerr":0,"x":660,"y":160,"wires":[["caf2c6dc.9eff58"]]},{"id":"caf2c6dc.9eff58","type":"influxdb out","z":"f560aa61.449308","influxdb":"7b3bc72b.d79f28","name":"submissions.denied","measurement":"","precision":"","retentionPolicy":"","x":900,"y":160,"wires":[]},{"id":"d837b4f8.6a8ba8","type":"function","z":"bf1fa67d.661748","name":"Parse Tags","func":"msg.words = msg.payload.trim().toLowerCase().replace(/[^a-zA-Z_-äÄöÖüÜß ]/g, \"\");\n\n// Wordlist\nvar wordlist = [\n {\"automatisierung\": [\"automation\"]},\n {\"ansible\": [\"ansible\",\"scm\"]},\n {\"puppet\": [\"puppet\",\"scm\"]},\n {\"salt\": [\"salt\",\"scm\"]},\n {\"chef\": [\"chef\",\"scm\"]},\n {\"continuous integration\": [\"cicd\"]},\n {\"continuous deployment\": [\"cicd\"]},\n {\"continuous delivery\": [\"cicd\"]},\n {\"jenkins\": [\"cicd\",\"jenkins\"]},\n {\"travis\": [\"cicd\",\"travis\"]},\n {\"github actions\": [\"cicd\",\"github\"]},\n {\"gitlab ci\": [\"cicd\",\"gitlab\"]},\n {\"iac\": [\"iac\"]},\n {\"infrastructure as code\": [\"iac\"]},\n {\"devops\": [\"devops\"]},\n {\"git\": [\"git\"]},\n {\"github\": [\"git\",\"github\"]},\n {\"gitlab\": [\"git\",\"gitlab\"]},\n {\"monitoring\": [\"monitoring\"]},\n {\"alerting\": [\"monitoring\"]},\n {\"dashboard\": [\"monitoring\"]},\n {\"grafana\": [\"monitoring\",\"grafana\"]},\n {\"logging\": [\"logging\"]},\n {\"logs\": [\"logging\"]},\n {\"metrics\": [\"monitoring\"]},\n {\"prometheus\": [\"monitoring\",\"prometheus\"]},\n {\"terraform\": [\"iac\",\"terraform\"]},\n {\"linux\": [\"linux\"]},\n {\"unix\": [\"linux\"]},\n {\"perl\": [\"perl\"]},\n {\"python\": [\"python\"]},\n {\"bash\": [\"bash\"]},\n {\"java\": [\"java\"]},\n {\"go\": [\"go\"]},\n {\"database\": [\"databases\"]},\n {\"databases\": [\"databases\"]},\n {\"timeseries\": [\"databases\"]},\n {\"postgres\": [\"databases\", \"postgres\"]},\n {\"mysql\": [\"databases\",\"mysql\"]},\n {\"mariadb\": [\"databases\",\"mariadb\"]},\n {\"influx\": [\"databases\", \"influxdb\"]},\n {\"elastic\": [\"databases\",\"elasticsearch\"]},\n {\"logstash\": [\"monitoring\", \"elk\"]},\n {\"kibana\": [\"monitoring\", \"elk\"]},\n {\"logstash\": [\"monitoring\", \"elk\"]},\n {\"kubernes\": [\"container\", \"kubernetes\"]},\n {\"helm\": [\"container\", \"kubernetes\"]},\n {\"docker\": [\"container\", \"docker\"]},\n {\"openshift\": [\"container\", \"openshift\"]},\n {\"aws\": [\"cloud\", \"aws\"]},\n {\"amazon web services\": [\"cloud\", \"aws\"]},\n {\"gcp\": [\"cloud\", \"gcp\"]},\n {\"azure\": [\"cloud\", \"azure\"]},\n {\"digital ocean\": [\"cloud\", \"digitalocean\"]},\n]\nmsg.tags = [];\nwordlist.forEach(item => { \n var word = Object.keys(item)[0];\n var re = new RegExp(word,\"g\");\n if (re.test(msg.words)) {\n node.warn(\"Adding \"+item[word]);\n var tags = msg.tags.concat(item[word]); \n var set = new Set(tags);\n msg.tags = Array.from(set);\n \n node.warn(tags);\n }\n}); \n\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":60,"wires":[[]]},{"id":"81887dec.3de56","type":"function","z":"f560aa61.449308","name":"Parse Tags","func":"if (msg.payload.text === \"\") {\n msg.words = msg.payload.description.trim().toLowerCase().replace(/[^a-zA-Z_-äÄöÖüÜß ]/g, \"\");\n node.warn(\"Desc: \"+msg.payload.description);\n}\nelse {\n msg.words = msg.payload.text.trim().toLowerCase().replace(/[^a-zA-Z_-äÄöÖüÜß ]/g, \"\");\n node.warn(\"Text: \"+msg.payload.text);\n}\n\n// Wordlist\nvar wordlist = [\n {\"automatisierung\": [\"automation\"]},\n {\"ansible\": [\"ansible\",\"scm\"]},\n {\"puppet\": [\"puppet\",\"scm\"]},\n {\"salt\": [\"salt\",\"scm\"]},\n {\"chef\": [\"chef\",\"scm\"]},\n {\"continuous integration\": [\"cicd\"]},\n {\"continuous deployment\": [\"cicd\"]},\n {\"continuous delivery\": [\"cicd\"]},\n {\"jenkins\": [\"cicd\",\"jenkins\"]},\n {\"travis\": [\"cicd\",\"travis\"]},\n {\"github actions\": [\"cicd\",\"github\"]},\n {\"gitlab ci\": [\"cicd\",\"gitlab\"]},\n {\"cicd\": [\"cicd\"]},\n {\"ci/cd\": [\"cicd\"]},\n {\"iac\": [\"iac\"]},\n {\"infrastructure as code\": [\"iac\"]},\n {\"devops\": [\"devops\"]},\n {\"fullstack\": [\"devops\"]},\n {\"microservices\": [\"devops\"]},\n {\"git\": [\"git\"]},\n {\"github\": [\"git\",\"github\"]},\n {\"gitlab\": [\"git\",\"gitlab\"]},\n {\"monitoring\": [\"monitoring\"]},\n {\"alerting\": [\"monitoring\"]},\n {\"dashboard\": [\"monitoring\"]},\n {\"grafana\": [\"monitoring\",\"grafana\"]},\n {\"logging\": [\"logging\"]},\n {\"logs\": [\"logging\"]},\n {\"metrics\": [\"monitoring\"]},\n {\"prometheus\": [\"monitoring\",\"prometheus\"]},\n {\"terraform\": [\"iac\",\"terraform\"]},\n {\"linux\": [\"linux\"]},\n {\"unix\": [\"linux\"]},\n {\"perl\": [\"perl\"]},\n {\"python\": [\"python\"]},\n {\"bash\": [\"bash\"]},\n {\"java\": [\"java\"]},\n {\"go\": [\"go\"]},\n {\"database\": [\"databases\"]},\n {\"databases\": [\"databases\"]},\n {\"timeseries\": [\"databases\"]},\n {\"postgres\": [\"databases\", \"postgres\"]},\n {\"mysql\": [\"databases\",\"mysql\"]},\n {\"mariadb\": [\"databases\",\"mariadb\"]},\n {\"influx\": [\"databases\", \"influxdb\"]},\n {\"elastic\": [\"databases\",\"elasticsearch\"]},\n {\"logstash\": [\"monitoring\", \"elk\"]},\n {\"kibana\": [\"monitoring\", \"elk\"]},\n {\"logstash\": [\"monitoring\", \"elk\"]},\n {\"kubernes\": [\"container\", \"kubernetes\"]},\n {\"helm\": [\"container\", \"kubernetes\"]},\n {\"docker\": [\"container\", \"docker\"]},\n {\"openshift\": [\"container\", \"openshift\"]},\n {\"cloud\": [\"cloud\"]},\n {\"privatecloud\": [\"cloud\"]},\n {\"aws\": [\"cloud\", \"aws\"]},\n {\"amazon web services\": [\"cloud\", \"aws\"]},\n {\"gcp\": [\"cloud\", \"gcp\"]},\n {\"azure\": [\"cloud\", \"azure\"]},\n {\"digital ocean\": [\"cloud\", \"digitalocean\"]},\n {\"festanstellung\": [\"festanstellung\"]},\n {\"endkundenprojekt\": [\"endkundenprojekt\"]},\n]\nmsg.payload.tags = [];\nwordlist.forEach(item => { \n var word = Object.keys(item)[0];\n var re = new RegExp(word,\"g\");\n if (re.test(msg.words)) {\n var tags = msg.payload.tags.concat(item[word]); \n var set = new Set(tags);\n msg.payload.tags = Array.from(set);\n }\n}); \nreturn msg;","outputs":1,"noerr":0,"x":390,"y":300,"wires":[["50f0b9bf.1143a8"]]},{"id":"57c09e95.7a55b","type":"debug","z":"d2143b4e.692a38","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":270,"y":200,"wires":[]},{"id":"720ca4dc.c5322c","type":"chatbot-debug","z":"d2143b4e.692a38","x":260,"y":280,"wires":[]},{"id":"2d6a6734.73aa88","type":"debug","z":"7f677ad1.038694","name":"Endkundenprojekt","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":750,"y":80,"wires":[]},{"id":"2774d31e.3c44bc","type":"html","z":"7f677ad1.038694","name":"","property":"payload","outproperty":"payload","tag":".label-success","ret":"attr","as":"multi","x":420,"y":120,"wires":[["e5e40f3.2bf8af","2d6a6734.73aa88"]]},{"id":"4b9000b0.a75c4","type":"function","z":"7f677ad1.038694","name":"","func":"msg.project = msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":120,"wires":[["2774d31e.3c44bc"]]},{"id":"e5e40f3.2bf8af","type":"function","z":"7f677ad1.038694","name":"","func":"msg.payload = msg.project;\nreturn msg;","outputs":1,"noerr":0,"x":570,"y":120,"wires":[["2d6a6734.73aa88","f8b24dc4.8e278"]]},{"id":"4ab69f2b.efc58","type":"feedparse","z":"e605a94f.9a4968","name":"","url":"http://glennengstrand.info/blog/?feed=rss2","interval":"5","x":200,"y":40,"wires":[["9d6ff9b5.4fcce8","95e121b3.9589b"]]},{"id":"9d6ff9b5.4fcce8","type":"debug","z":"e605a94f.9a4968","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":750,"y":40,"wires":[]},{"id":"3e9f3515.88a68a","type":"mqtt out","z":"e605a94f.9a4968","name":"","topic":"submission","qos":"","retain":"","broker":"a2636dba.09499","x":770,"y":160,"wires":[]},{"id":"95e121b3.9589b","type":"function","z":"e605a94f.9a4968","name":"Parse URL","func":"msg.payload = {};\nmsg.payload.submission_url = msg.article.link;\n\nreturn msg;","outputs":1,"noerr":0,"x":570,"y":160,"wires":[["3e9f3515.88a68a","9d6ff9b5.4fcce8"]]},{"id":"6e53e5a0.5f255c","type":"feedparse","z":"e605a94f.9a4968","name":"","url":"https://eli.thegreenplace.net/feeds/all.atom.xml","interval":"5","x":220,"y":100,"wires":[["95e121b3.9589b"]]},{"id":"2359cbaf.8ceee4","type":"feedparse","z":"e605a94f.9a4968","name":"","url":"http://feeds.feedburner.com/cliffski","interval":"5","x":180,"y":160,"wires":[["95e121b3.9589b"]]},{"id":"28cd0575.a1de5a","type":"feedparse","z":"e605a94f.9a4968","name":"","url":"https://www.joelonsoftware.com/feed/","interval":"5","x":190,"y":220,"wires":[["95e121b3.9589b"]]},{"id":"d10282e4.28975","type":"feedparse","z":"e605a94f.9a4968","name":"","url":"http://www.paulgraham.com/rss.html","interval":"5","x":190,"y":260,"wires":[["95e121b3.9589b"]]}]