Multiple Adaptive Card Sample 2
works with tekos.co platform. This is some Adaptive Card displayed on tekos chat rooms
[{"id":"c9f65f0f.c3fed","type":"function","z":"8eb50c91.720f5","name":"Stock","func":"msg.roomId = \"!LAMIpamyCBxUOVQhii:m.tekos.co\"\n// specicy your room ID\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"sidebar\": true,\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.3\",\n \"speak\": \"Amazon stock is trading at $62.30 a share, which is down .32%\",\n \"body\": [\n {\n \"type\": \"Image\",\n \"url\": \"https://www.marketplace.org/wp-content/uploads/2019/07/ama2.png\",\n \"size\": \"Large\",\n \"horizontalAlignment\": \"Center\"\n },\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Amazon.com, Inc. (NASDAQ: AMZN)\",\n \"size\": \"Medium\",\n \"isSubtle\": true\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"September 19, 4:00 PM EST\",\n \"isSubtle\": true\n }\n ]\n },\n {\n \"type\": \"Container\",\n \"spacing\": \"None\",\n \"items\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": \"stretch\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"75.30\",\n \"size\": \"ExtraLarge\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"▼ 0.20 (0.32%)\",\n \"size\": \"Small\",\n \"color\": \"Attention\",\n \"spacing\": \"None\"\n }\n ]\n },\n {\n \"type\": \"Column\",\n \"width\": \"auto\",\n \"items\": [\n {\n \"type\": \"FactSet\",\n \"facts\": [\n {\n \"title\": \"Open\",\n \"value\": \"62.24\"\n },\n {\n \"title\": \"High\",\n \"value\": \"62.98\"\n },\n {\n \"title\": \"Low\",\n \"value\": \"62.20\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"backgroundImage\": {\n \"horizontalAlignment\": \"Right\",\n \"verticalAlignment\": \"Center\"\n },\n \"verticalContentAlignment\": \"Bottom\"\n}\n\n}\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":490,"y":680,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"7bf58ef.f2a347","type":"function","z":"8eb50c91.720f5","name":"Setup form","func":"msg.roomId = \"!WftKgGpsCEMbOXvEMb:m.tekos.co\"\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"version\": \"1.0\",\n \"type\": \"AdaptiveCard\",\n \"speak\": \"<s>Your flight is confirmed for you and 3 other passengers from San Francisco to Amsterdam on Friday, October 10 8:30 AM</s>\",\n \"body\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Passengers\",\n \"weight\": \"bolder\",\n \"isSubtle\": false\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Sarah Hum\",\n \"separator\": true\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Jeremy Goldberg\",\n \"spacing\": \"none\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Evan Litvak\",\n \"spacing\": \"none\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"2 Stops\",\n \"weight\": \"bolder\",\n \"spacing\": \"medium\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Fri, October 10 8:30 AM\",\n \"weight\": \"bolder\",\n \"spacing\": \"none\"\n },\n {\n \"type\": \"ColumnSet\",\n \"separator\": true,\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"San Francisco\",\n \"isSubtle\": true\n },\n {\n \"type\": \"TextBlock\",\n \"size\": \"extraLarge\",\n \"color\": \"accent\",\n \"text\": \"SFO\",\n \"spacing\": \"none\"\n }\n ]\n },\n {\n \"type\": \"Column\",\n \"width\": \"auto\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \" \"\n },\n {\n \"type\": \"Image\",\n \"url\": \"https://adaptivecards.io/content/airplane.png\",\n \"size\": \"small\",\n \"spacing\": \"none\"\n }\n ]\n },\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"right\",\n \"text\": \"Amsterdam\",\n \"isSubtle\": true\n },\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"right\",\n \"size\": \"extraLarge\",\n \"color\": \"accent\",\n \"text\": \"AMS\",\n \"spacing\": \"none\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Non-Stop\",\n \"weight\": \"bolder\",\n \"spacing\": \"medium\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Fri, October 18 9:50 PM\",\n \"weight\": \"bolder\",\n \"spacing\": \"none\"\n },\n {\n \"type\": \"ColumnSet\",\n \"separator\": true,\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Amsterdam\",\n \"isSubtle\": true\n },\n {\n \"type\": \"TextBlock\",\n \"size\": \"extraLarge\",\n \"color\": \"accent\",\n \"text\": \"AMS\",\n \"spacing\": \"none\"\n }\n ]\n },\n {\n \"type\": \"Column\",\n \"width\": \"auto\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \" \"\n },\n {\n \"type\": \"Image\",\n \"url\": \"https://adaptivecards.io/content/airplane.png\",\n \"size\": \"small\",\n \"spacing\": \"none\"\n }\n ]\n },\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"right\",\n \"text\": \"San Francisco\",\n \"isSubtle\": true\n },\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"right\",\n \"size\": \"extraLarge\",\n \"color\": \"accent\",\n \"text\": \"SFO\",\n \"spacing\": \"none\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"ColumnSet\",\n \"spacing\": \"medium\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": \"1\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Total\",\n \"size\": \"medium\",\n \"isSubtle\": true\n }\n ]\n },\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"right\",\n \"text\": \"$4,032.54\",\n \"size\": \"medium\",\n \"weight\": \"bolder\"\n }\n ]\n }\n ]\n }\n ]\n}\n\n}\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":510,"y":840,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"8a3fb1bb.9dbd","type":"debug","z":"8eb50c91.720f5","name":"success","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1060,"y":1040,"wires":[]},{"id":"8a1963ba.dd98c","type":"function","z":"8eb50c91.720f5","name":"Form","func":"msg.roomId = \"!WftKgGpsCEMbOXvEMb:m.tekos.co\"\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.0\",\n \"body\": [\n {\n \"type\": \"TextBlock\",\n \"size\": \"Medium\",\n \"weight\": \"Bolder\",\n \"text\": \"Input.Text elements\",\n \"horizontalAlignment\": \"Center\"\n },\n {\n \"type\": \"Input.Text\",\n \"placeholder\": \"Name\",\n \"style\": \"text\",\n \"maxLength\": 0,\n \"id\": \"SimpleVal\"\n },\n {\n \"type\": \"Input.Text\",\n \"placeholder\": \"Homepage\",\n \"style\": \"Url\",\n \"maxLength\": 0,\n \"id\": \"UrlVal\"\n },\n {\n \"type\": \"Input.Text\",\n \"placeholder\": \"Email\",\n \"style\": \"Email\",\n \"maxLength\": 0,\n \"id\": \"EmailVal\"\n },\n {\n \"type\": \"Input.Text\",\n \"placeholder\": \"Phone\",\n \"style\": \"Tel\",\n \"maxLength\": 0,\n \"id\": \"TelVal\"\n },\n {\n \"type\": \"Input.Text\",\n \"placeholder\": \"Comments\",\n \"style\": \"text\",\n \"isMultiline\": true,\n \"maxLength\": 0,\n \"id\": \"MultiLineVal\"\n },\n {\n \"type\": \"Input.Number\",\n \"placeholder\": \"Quantity\",\n \"min\": -5,\n \"max\": 5,\n \"id\": \"NumVal\"\n },\n {\n \"type\": \"Input.Date\",\n \"placeholder\": \"Due Date\",\n \"id\": \"DateVal\",\n \"value\": \"2017-09-20\"\n },\n {\n \"type\": \"Input.Time\",\n \"placeholder\": \"Start time\",\n \"id\": \"TimeVal\",\n \"value\": \"16:59\"\n },\n {\n \"type\": \"TextBlock\",\n \"size\": \"Medium\",\n \"weight\": \"Bolder\",\n \"text\": \"Input.ChoiceSet\",\n \"horizontalAlignment\": \"Center\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"What color do you want? (compact)\"\n },\n {\n \"type\": \"Input.ChoiceSet\",\n \"id\": \"CompactSelectVal\",\n \"value\": \"1\",\n \"choices\": [\n {\n \"title\": \"Red\",\n \"value\": \"1\"\n },\n {\n \"title\": \"Green\",\n \"value\": \"2\"\n },\n {\n \"title\": \"Blue\",\n \"value\": \"3\"\n }\n ]\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"What color do you want? (expanded)\"\n },\n {\n \"type\": \"Input.ChoiceSet\",\n \"id\": \"SingleSelectVal\",\n \"style\": \"expanded\",\n \"value\": \"1\",\n \"choices\": [\n {\n \"title\": \"Red\",\n \"value\": \"1\"\n },\n {\n \"title\": \"Green\",\n \"value\": \"2\"\n },\n {\n \"title\": \"Blue\",\n \"value\": \"3\"\n }\n ]\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"What colors do you want? (multiselect)\"\n },\n {\n \"type\": \"Input.ChoiceSet\",\n \"id\": \"MultiSelectVal\",\n \"isMultiSelect\": true,\n \"value\": \"1,3\",\n \"choices\": [\n {\n \"title\": \"Red\",\n \"value\": \"1\"\n },\n {\n \"title\": \"Green\",\n \"value\": \"2\"\n },\n {\n \"title\": \"Blue\",\n \"value\": \"3\"\n }\n ]\n },\n {\n \"type\": \"TextBlock\",\n \"size\": \"Medium\",\n \"weight\": \"Bolder\",\n \"text\": \"Input.Toggle\",\n \"horizontalAlignment\": \"Center\"\n },\n {\n \"type\": \"Input.Toggle\",\n \"title\": \"I accept the terms and conditions (True/False)\",\n \"id\": \"AcceptsTerms\",\n \"value\": \"false\",\n \"wrap\": false\n },\n {\n \"type\": \"Input.Toggle\",\n \"title\": \"Red cars are better than other cars\",\n \"valueOn\": \"RedCars\",\n \"valueOff\": \"NotRedCars\",\n \"id\": \"ColorPreference\",\n \"value\": \"NotRedCars\",\n \"wrap\": false\n }\n ],\n \"actions\": [\n {\n \"type\": \"Action.Submit\",\n \"title\": \"Submit\",\n \"data\": {\n \"id\": \"1234567890\"\n }\n },\n {\n \"type\": \"Action.ShowCard\",\n \"title\": \"Show Card\",\n \"card\": {\n \"type\": \"AdaptiveCard\",\n \"body\": [\n {\n \"type\": \"Input.Text\",\n \"placeholder\": \"enter comment\",\n \"style\": \"text\",\n \"maxLength\": 0,\n \"id\": \"CommentVal\"\n }\n ],\n \"actions\": [\n {\n \"type\": \"Action.Submit\",\n \"title\": \"OK\"\n }\n ],\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\"\n }\n }\n ]\n}\n\n}\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":490,"y":900,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"4e3fa984.6512e8","type":"function","z":"8eb50c91.720f5","name":"Stock","func":"msg.roomId = \"!LAMIpamyCBxUOVQhii:m.tekos.co\"\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"sidebar\": true,\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.0\",\n \"speak\": \"Microsoft stock is trading at $62.30 a share, which is down .32%\",\n \"body\": [\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Microsoft Corp (NASDAQ: MSFT)\",\n \"size\": \"medium\",\n \"isSubtle\": true\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"September 19, 4:00 PM EST\",\n \"isSubtle\": true\n }\n ]\n },\n {\n \"type\": \"Container\",\n \"spacing\": \"none\",\n \"items\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": \"stretch\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"75.30\",\n \"size\": \"extraLarge\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"▼ 0.20 (0.32%)\",\n \"size\": \"small\",\n \"color\": \"attention\",\n \"spacing\": \"none\"\n }\n ]\n },\n {\n \"type\": \"Column\",\n \"width\": \"auto\",\n \"items\": [\n {\n \"type\": \"FactSet\",\n \"facts\": [\n {\n \"title\": \"Open\",\n \"value\": \"62.24\"\n },\n {\n \"title\": \"High\",\n \"value\": \"62.98\"\n },\n {\n \"title\": \"Low\",\n \"value\": \"62.20\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n}\n\n}\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":940,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"3778d8c0.7f66d8","type":"function","z":"8eb50c91.720f5","name":"weather","func":"msg.roomId = \"!WftKgGpsCEMbOXvEMb:m.tekos.co\"\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.0\",\n \"speak\": \"<s>The forecast for Seattle January 20 is mostly clear with a High of 51 degrees and Low of 40 degrees</s>\",\n \"body\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Seattle, WA\",\n \"size\": \"Large\",\n \"isSubtle\": true\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"September 18, 7:30 AM\",\n \"spacing\": \"None\"\n },\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": \"auto\",\n \"items\": [\n {\n \"type\": \"Image\",\n \"url\": \"https://webstockreview.net/images/clipart-rain-snow-mix-6.gif\",\n \"size\": \"Small\"\n }\n ]\n },\n {\n \"type\": \"Column\",\n \"width\": \"auto\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"42\",\n \"size\": \"ExtraLarge\",\n \"spacing\": \"None\"\n }\n ]\n },\n {\n \"type\": \"Column\",\n \"width\": \"stretch\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"°F\",\n \"weight\": \"Bolder\",\n \"spacing\": \"Small\"\n }\n ]\n },\n {\n \"type\": \"Column\",\n \"width\": \"stretch\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Hi 51\",\n \"horizontalAlignment\": \"Left\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Lo 40\",\n \"horizontalAlignment\": \"Left\",\n \"spacing\": \"None\"\n }\n ]\n }\n ]\n }\n ]\n}\n\n}\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":500,"y":980,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"4763d5fc.4f1c9c","type":"function","z":"8eb50c91.720f5","name":"flight","func":"msg.roomId = \"!vVfVbxkpmPymVvFkjo:m.tekos.co\"\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"projected\": true,\n \"adaptiveCard\":{\n \"type\": \"AdaptiveCard\",\n \"body\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"Container\",\n \"backgroundImage\": \"http://messagecardplayground.azurewebsites.net/assets/TxP_Background.png\",\n \"items\": [\n {\n \"type\": \"Image\",\n \"horizontalAlignment\": \"Center\",\n \"url\": \"https://messagecardplayground.azurewebsites.net/assets/TxP_Flight.png\"\n }\n ],\n \"bleed\": true\n },\n {\n \"type\": \"Container\",\n \"spacing\": \"None\",\n \"style\": \"emphasis\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"size\": \"ExtraLarge\",\n \"weight\": \"Lighter\",\n \"color\": \"Accent\",\n \"text\": \"Flight to Paris\",\n \"wrap\": true\n },\n {\n \"type\": \"TextBlock\",\n \"spacing\": \"Small\",\n \"text\": \"Delta Air Lines flight 8471\",\n \"wrap\": true\n },\n {\n \"type\": \"TextBlock\",\n \"spacing\": \"None\",\n \"text\": \"Confirmation code: ABCDEF\",\n \"wrap\": true\n },\n {\n \"type\": \"TextBlock\",\n \"spacing\": \"None\",\n \"text\": \"10 hours 45 minutes\",\n \"wrap\": true\n }\n ],\n \"bleed\": true,\n \"height\": \"stretch\"\n }\n ],\n \"width\": 45,\n \"height\": \"stretch\"\n },\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"Container\",\n \"height\": \"stretch\",\n \"items\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"size\": \"ExtraLarge\",\n \"weight\": \"Lighter\",\n \"text\": \"BLR\"\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"verticalContentAlignment\": \"Center\",\n \"items\": [\n {\n \"type\": \"Image\",\n \"url\": \"https://messagecardplayground.azurewebsites.net/assets/graydot2x2.png\",\n \"width\": \"10000px\",\n \"height\": \"2px\"\n }\n ],\n \"width\": \"stretch\"\n },\n {\n \"type\": \"Column\",\n \"spacing\": \"Small\",\n \"verticalContentAlignment\": \"Center\",\n \"items\": [\n {\n \"type\": \"Image\",\n \"url\": \"https://messagecardplayground.azurewebsites.net/assets/smallairplane.png\",\n \"height\": \"16px\"\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"Right\",\n \"size\": \"ExtraLarge\",\n \"weight\": \"Lighter\",\n \"text\": \"CDG\"\n }\n ],\n \"width\": \"auto\"\n }\n ]\n },\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"size\": \"Medium\",\n \"text\": \"1:55 AM\"\n }\n ],\n \"width\": 1\n },\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"Right\",\n \"size\": \"Medium\",\n \"text\": \"8:10 AM\"\n }\n ],\n \"width\": 1\n }\n ]\n },\n {\n \"type\": \"ColumnSet\",\n \"spacing\": \"None\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"November 12, 2017\",\n \"isSubtle\": true,\n \"wrap\": true\n }\n ],\n \"width\": 1\n },\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"Right\",\n \"text\": \"November 12, 2017\",\n \"isSubtle\": true,\n \"wrap\": true\n }\n ],\n \"width\": 1\n }\n ]\n },\n {\n \"type\": \"ColumnSet\",\n \"spacing\": \"None\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Bengaluru\",\n \"isSubtle\": true\n }\n ],\n \"width\": 1\n },\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"Right\",\n \"text\": \"Paris\",\n \"isSubtle\": true\n }\n ],\n \"width\": 1\n }\n ],\n \"height\": \"stretch\"\n },\n {\n \"type\": \"ActionSet\",\n \"separator\": true,\n \"actions\": [\n {\n \"type\": \"Action.Submit\",\n \"title\": \"Check in\",\n \"style\": \"positive\"\n },\n {\n \"type\": \"Action.Submit\",\n \"title\": \"View in calendar\"\n }\n ],\n \"spacing\": \"Medium\"\n }\n ]\n }\n ],\n \"width\": 55\n }\n ],\n \"height\": \"stretch\"\n }\n ],\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"version\": \"1.0\"\n}\n}\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":490,"y":1020,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"751d3d1d.9278e4","type":"function","z":"8eb50c91.720f5","name":"expense","func":"msg.roomId = \"!WftKgGpsCEMbOXvEMb:m.tekos.co\"\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"adaptiveCard\":{\n \"type\": \"AdaptiveCard\",\n \"body\": [\n {\n \"type\": \"Container\",\n \"style\": \"emphasis\",\n \"items\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"size\": \"Large\",\n \"weight\": \"Bolder\",\n \"text\": \"**EXPENSE APPROVAL**\"\n }\n ],\n \"width\": \"stretch\"\n },\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"Image\",\n \"url\": \"https://adaptivecards.io/content/pending.png\",\n \"height\": \"30px\",\n \"altText\": \"Pending\"\n }\n ],\n \"width\": \"auto\"\n }\n ]\n }\n ],\n \"bleed\": true\n },\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"size\": \"ExtraLarge\",\n \"text\": \"Trip to UAE\",\n \"wrap\": true\n },\n {\n \"type\": \"TextBlock\",\n \"spacing\": \"Small\",\n \"size\": \"Small\",\n \"weight\": \"Bolder\",\n \"color\": \"Accent\",\n \"text\": \"[ER-13052](https://adaptivecards.io)\"\n }\n ],\n \"width\": \"stretch\"\n },\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"ActionSet\",\n \"actions\": [\n {\n \"type\": \"Action.OpenUrl\",\n \"title\": \"EXPORT AS PDF\",\n \"url\": \"https://adaptivecards.io\"\n }\n ]\n }\n ],\n \"width\": \"auto\"\n }\n ]\n },\n {\n \"type\": \"FactSet\",\n \"spacing\": \"Large\",\n \"facts\": [\n {\n \"title\": \"Submitted By\",\n \"value\": \"**Matt Hidinger** [email protected]\"\n },\n {\n \"title\": \"Duration\",\n \"value\": \"2019/06/19 - 2019/06/25\"\n },\n {\n \"title\": \"Submitted On\",\n \"value\": \"2019/04/14\"\n },\n {\n \"title\": \"Reimbursable Amount\",\n \"value\": \"$ 404.30\"\n },\n {\n \"title\": \"Awaiting approval from\",\n \"value\": \"**Thomas** [email protected]\"\n },\n {\n \"title\": \"Submitted to\",\n \"value\": \"**David** [email protected]\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Container\",\n \"spacing\": \"Large\",\n \"style\": \"emphasis\",\n \"items\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"weight\": \"Bolder\",\n \"text\": \"DATE\"\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"spacing\": \"Large\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"weight\": \"Bolder\",\n \"text\": \"CATEGORY\"\n }\n ],\n \"width\": \"stretch\"\n },\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"weight\": \"Bolder\",\n \"text\": \"AMOUNT\"\n }\n ],\n \"width\": \"auto\"\n }\n ]\n }\n ],\n \"bleed\": true\n },\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"06/19\",\n \"wrap\": true\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"spacing\": \"Medium\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Air Travel Expense\",\n \"wrap\": true\n }\n ],\n \"width\": \"stretch\"\n },\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"$ 300\",\n \"wrap\": true\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"id\": \"chevronDown1\",\n \"spacing\": \"Small\",\n \"verticalContentAlignment\": \"Center\",\n \"items\": [\n {\n \"type\": \"Image\",\n \"selectAction\": {\n \"type\": \"Action.ToggleVisibility\",\n \"title\": \"collapse\",\n \"targetElements\": [\n \"cardContent1\",\n \"chevronUp1\",\n \"chevronDown1\"\n ]\n },\n \"url\": \"https://adaptivecards.io/content/down.png\",\n \"width\": \"20px\",\n \"altText\": \"collapsed\"\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"id\": \"chevronUp1\",\n \"isVisible\": false,\n \"spacing\": \"Small\",\n \"verticalContentAlignment\": \"Center\",\n \"items\": [\n {\n \"type\": \"Image\",\n \"selectAction\": {\n \"type\": \"Action.ToggleVisibility\",\n \"title\": \"expand\",\n \"targetElements\": [\n \"cardContent1\",\n \"chevronUp1\",\n \"chevronDown1\"\n ]\n },\n \"url\": \"https://adaptivecards.io/content/up.png\",\n \"width\": \"20px\",\n \"altText\": \"expanded\"\n }\n ],\n \"width\": \"auto\"\n }\n ]\n },\n {\n \"type\": \"Container\",\n \"id\": \"cardContent1\",\n \"isVisible\": false,\n \"items\": [\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"* Leg 1 on Tue, Jun 19th, 2019 at 6:00 AM.\",\n \"isSubtle\": true,\n \"wrap\": true\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"* Leg 2 on Tue,Jun 19th, 2019 at 7:15 PM.\",\n \"isSubtle\": true,\n \"wrap\": true\n },\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"Input.Text\",\n \"id\": \"comment1\",\n \"placeholder\": \"Add your comment here.\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"ActionSet\",\n \"actions\": [\n {\n \"type\": \"Action.Submit\",\n \"title\": \"Send\",\n \"data\": {\n \"id\": \"_qkQW8dJlUeLVi7ZMEzYVw\",\n \"action\": \"comment\",\n \"lineItem\": 1\n }\n }\n ]\n }\n ],\n \"width\": \"auto\"\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"Center\",\n \"text\": \"06/19\",\n \"wrap\": true\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"spacing\": \"Medium\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Auto Mobile Expense\",\n \"wrap\": true\n }\n ],\n \"width\": \"stretch\"\n },\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"$ 100\",\n \"wrap\": true\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"id\": \"chevronDown2\",\n \"spacing\": \"Small\",\n \"verticalContentAlignment\": \"Center\",\n \"items\": [\n {\n \"type\": \"Image\",\n \"selectAction\": {\n \"type\": \"Action.ToggleVisibility\",\n \"title\": \"collapse\",\n \"targetElements\": [\n \"cardContent2\",\n \"chevronUp2\",\n \"chevronDown2\"\n ]\n },\n \"url\": \"https://adaptivecards.io/content/down.png\",\n \"width\": \"20px\",\n \"altText\": \"collapsed\"\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"id\": \"chevronUp2\",\n \"isVisible\": false,\n \"spacing\": \"Small\",\n \"verticalContentAlignment\": \"Center\",\n \"items\": [\n {\n \"type\": \"Image\",\n \"selectAction\": {\n \"type\": \"Action.ToggleVisibility\",\n \"title\": \"expand\",\n \"targetElements\": [\n \"cardContent2\",\n \"chevronUp2\",\n \"chevronDown2\"\n ]\n },\n \"url\": \"https://adaptivecards.io/content/up.png\",\n \"width\": \"20px\",\n \"altText\": \"expanded\"\n }\n ],\n \"width\": \"auto\"\n }\n ]\n },\n {\n \"type\": \"Container\",\n \"id\": \"cardContent2\",\n \"isVisible\": false,\n \"items\": [\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"* Contoso Car Rentrals, Tues 6/19 at 7:00 AM\",\n \"isSubtle\": true,\n \"wrap\": true\n },\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"Input.Text\",\n \"id\": \"comment2\",\n \"placeholder\": \"Add your comment here.\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"ActionSet\",\n \"actions\": [\n {\n \"type\": \"Action.Submit\",\n \"title\": \"Send\",\n \"data\": {\n \"id\": \"_qkQW8dJlUeLVi7ZMEzYVw\",\n \"action\": \"comment\",\n \"lineItem\": 2\n }\n }\n ]\n }\n ],\n \"width\": \"auto\"\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"Center\",\n \"text\": \"06/25\",\n \"wrap\": true\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"spacing\": \"Medium\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Air Travel Expense\",\n \"wrap\": true\n }\n ],\n \"width\": \"stretch\"\n },\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"$ 4.30\",\n \"wrap\": true\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"id\": \"chevronDown3\",\n \"spacing\": \"Small\",\n \"verticalContentAlignment\": \"Center\",\n \"items\": [\n {\n \"type\": \"Image\",\n \"selectAction\": {\n \"type\": \"Action.ToggleVisibility\",\n \"title\": \"collapse\",\n \"targetElements\": [\n \"cardContent3\",\n \"chevronUp3\",\n \"chevronDown3\"\n ]\n },\n \"url\": \"https://adaptivecards.io/content/down.png\",\n \"width\": \"20px\",\n \"altText\": \"collapsed\"\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"id\": \"chevronUp3\",\n \"isVisible\": false,\n \"spacing\": \"Small\",\n \"verticalContentAlignment\": \"Center\",\n \"items\": [\n {\n \"type\": \"Image\",\n \"selectAction\": {\n \"type\": \"Action.ToggleVisibility\",\n \"title\": \"expand\",\n \"targetElements\": [\n \"cardContent3\",\n \"chevronUp3\",\n \"chevronDown3\"\n ]\n },\n \"url\": \"https://adaptivecards.io/content/up.png\",\n \"width\": \"20px\",\n \"altText\": \"expanded\"\n }\n ],\n \"width\": \"auto\"\n }\n ]\n },\n {\n \"type\": \"Container\",\n \"id\": \"cardContent3\",\n \"isVisible\": false,\n \"items\": [\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"Input.Text\",\n \"id\": \"comment3\",\n \"placeholder\": \"Add your comment here.\"\n }\n ]\n },\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"ActionSet\",\n \"actions\": [\n {\n \"type\": \"Action.Submit\",\n \"title\": \"Send\",\n \"data\": {\n \"id\": \"_qkQW8dJlUeLVi7ZMEzYVw\",\n \"action\": \"comment\",\n \"lineItem\": 3\n }\n }\n ]\n }\n ],\n \"width\": \"auto\"\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"type\": \"ColumnSet\",\n \"spacing\": \"Large\",\n \"separator\": true,\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"Right\",\n \"text\": \"Total Expense Amount \\t\",\n \"wrap\": true\n },\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"Right\",\n \"text\": \"Non-reimbursable Amount\",\n \"wrap\": true\n },\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"Right\",\n \"text\": \"Advance Amount\",\n \"wrap\": true\n }\n ],\n \"width\": \"stretch\"\n },\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"404.30\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"(-) 0.00 \\t\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"(-) 0.00 \\t\"\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"width\": \"auto\"\n }\n ]\n },\n {\n \"type\": \"Container\",\n \"style\": \"emphasis\",\n \"items\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"Right\",\n \"text\": \"Amount to be Reimbursed\",\n \"wrap\": true\n }\n ],\n \"width\": \"stretch\"\n },\n {\n \"type\": \"Column\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"weight\": \"Bolder\",\n \"text\": \"$ 404.30\"\n }\n ],\n \"width\": \"auto\"\n },\n {\n \"type\": \"Column\",\n \"width\": \"auto\"\n }\n ]\n }\n ],\n \"bleed\": true\n },\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"id\": \"chevronDown4\",\n \"selectAction\": {\n \"type\": \"Action.ToggleVisibility\",\n \"title\": \"show history\",\n \"targetElements\": [\n \"cardContent4\",\n \"chevronUp4\",\n \"chevronDown4\"\n ]\n },\n \"verticalContentAlignment\": \"Center\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"Right\",\n \"color\": \"Accent\",\n \"text\": \"Show history\",\n \"wrap\": true\n }\n ],\n \"width\": 1\n },\n {\n \"type\": \"Column\",\n \"id\": \"chevronUp4\",\n \"isVisible\": false,\n \"selectAction\": {\n \"type\": \"Action.ToggleVisibility\",\n \"title\": \"hide history\",\n \"targetElements\": [\n \"cardContent4\",\n \"chevronUp4\",\n \"chevronDown4\"\n ]\n },\n \"verticalContentAlignment\": \"Center\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"horizontalAlignment\": \"Right\",\n \"color\": \"Accent\",\n \"text\": \"Hide history\",\n \"wrap\": true\n }\n ],\n \"width\": 1\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Container\",\n \"id\": \"cardContent4\",\n \"isVisible\": false,\n \"items\": [\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"* Expense submitted by **Matt** on Wed, Apr 14th, 2019\",\n \"isSubtle\": true,\n \"wrap\": true\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"* Expense approved by **Thomas** on Thu, Apr 15th, 2019\",\n \"isSubtle\": true,\n \"wrap\": true\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Container\",\n \"items\": [\n {\n \"type\": \"ActionSet\",\n \"actions\": [\n {\n \"type\": \"Action.Submit\",\n \"title\": \"Approve\",\n \"style\": \"positive\",\n \"data\": {\n \"id\": \"_qkQW8dJlUeLVi7ZMEzYVw\",\n \"action\": \"approve\"\n }\n },\n {\n \"type\": \"Action.ShowCard\",\n \"title\": \"Reject\",\n \"style\": \"destructive\",\n \"card\": {\n \"type\": \"AdaptiveCard\",\n \"body\": [\n {\n \"type\": \"Input.Text\",\n \"id\": \"RejectCommentID\",\n \"placeholder\": \"Please specify an appropriate reason for rejection.\",\n \"isMultiline\": true\n }\n ],\n \"actions\": [\n {\n \"type\": \"Action.Submit\",\n \"title\": \"Send\",\n \"data\": {\n \"id\": \"_qkQW8dJlUeLVi7ZMEzYVw\",\n \"action\": \"reject\"\n }\n }\n ]\n }\n }\n ]\n }\n ]\n }\n ],\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"version\": \"1.2\",\n \"fallbackText\": \"This card requires Adaptive Cards v1.2 support to be rendered properly.\"\n}\n}\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":500,"y":1060,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"93b1806e.6c13d","type":"function","z":"8eb50c91.720f5","name":"video","func":"msg.roomId = \"!WftKgGpsCEMbOXvEMb:m.tekos.co\"\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.1\",\n \"fallbackText\": \"This card requires Media to be viewed. Ask your platform to update to Adaptive Cards v1.1 for this and more!\",\n \"body\": [\n {\n \"type\": \"Media\",\n \"poster\": \"https://adaptivecards.io/content/poster-video.png\",\n \"sources\": [\n {\n \"mimeType\": \"video/mp4\",\n \"url\": \"https://adaptivecardsblob.blob.core.windows.net/assets/AdaptiveCardsOverviewVideo.mp4\"\n }\n ]\n }\n ],\n \"actions\": [\n {\n \"type\": \"Action.OpenUrl\",\n \"title\": \"Learn more\",\n \"url\": \"https://adaptivecards.io\"\n }\n ]\n}\n}\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":470,"y":1160,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"a96ab949.7c57c8","type":"function","z":"8eb50c91.720f5","name":"restau","func":"msg.roomId = \"!zZaVoBslVaVZoGPjzv:m.tekos.co\"\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"composer\": true,\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.0\",\n \"body\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": 2,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"PIZZA\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Tom's Pie\",\n \"weight\": \"bolder\",\n \"size\": \"extraLarge\",\n \"spacing\": \"none\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"4.2 ★★★☆ (93) · $$\",\n \"isSubtle\": true,\n \"spacing\": \"none\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"**Matt H. said** \\\"I'm compelled to give this place 5 stars due to the number of times I've chosen to eat here this past year!\\\"\",\n \"size\": \"small\",\n \"wrap\": true\n }\n ]\n },\n {\n \"type\": \"ChartComponent\",\n \"title\": \"Please wait...\",\n \"value\": {\n type: 'bar',\n data: {\n labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],\n datasets: [{\n label: '# of Votes',\n data: [12, 19, 3, 5, 2, 3],\n backgroundColor: [\n 'rgba(255, 99, 132, 0.2)',\n 'rgba(54, 162, 235, 0.2)',\n 'rgba(255, 206, 86, 0.2)',\n 'rgba(75, 192, 192, 0.2)',\n 'rgba(153, 102, 255, 0.2)',\n 'rgba(255, 159, 64, 0.2)'\n ],\n borderColor: [\n 'rgba(255, 99, 132, 1)',\n 'rgba(54, 162, 235, 1)',\n 'rgba(255, 206, 86, 1)',\n 'rgba(75, 192, 192, 1)',\n 'rgba(153, 102, 255, 1)',\n 'rgba(255, 159, 64, 1)'\n ],\n borderWidth: 1\n }]\n },\n options: {\n scales: {\n yAxes: [{\n ticks: {\n beginAtZero: true\n }\n }]\n }\n }\n }\n },\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"Image\",\n \"url\": \"https://picsum.photos/300?image=882\",\n \"size\": \"auto\"\n }\n ]\n }\n ]\n }\n ],\n \"actions\": [\n {\n \"type\": \"Action.OpenUrl\",\n \"title\": \"More Info\",\n \"url\": \"https://www.youtube.com/watch?v=dQw4w9WgXcQ\"\n }\n ]\n}\n}\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":450,"y":1200,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"162b9a4.9a15b66","type":"function","z":"8eb50c91.720f5","name":"car","func":"msg.roomId = \"!WftKgGpsCEMbOXvEMb:m.tekos.co\"\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.0\",\n \"body\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Spopin Cool\",\n \"spacing\": \"Large\",\n \"horizontalAlignment\": \"Left\",\n \"height\": \"stretch\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Audi A4\",\n \"weight\": \"Bolder\",\n \"size\": \"ExtraLarge\",\n \"spacing\": \"None\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"10€/j · 4.2 ★★★☆ (93)\",\n \"isSubtle\": true,\n \"spacing\": \"None\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"**2018** Berline 5p, Essence\",\n \"size\": \"Small\",\n \"wrap\": true\n }\n ]\n },\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"Image\",\n \"url\": \"https://www.car-revs-daily.com/wp-content/uploads/Car-Revs-Daily.com-2014-Honda-CR-Z-66.gif\",\n \"size\": \"auto\"\n }\n ]\n }\n ]\n }\n ],\n \"actions\": [\n {\n \"type\": \"Action.OpenUrl\",\n \"title\": \"Louer\",\n \"url\": \"https://www.youtube.com/watch?v=dQw4w9WgXcQ\",\n \"style\": \"positive\"\n }\n ]\n}\n}\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":490,"y":1280,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"e1c6454e.772618","type":"http request","z":"8eb50c91.720f5","name":"","method":"POST","ret":"txt","paytoqs":false,"url":"","tls":"","persist":false,"proxy":"","authType":"","x":840,"y":1040,"wires":[["8a3fb1bb.9dbd"]]},{"id":"9de51130.01eb5","type":"function","z":"8eb50c91.720f5","name":"car","func":"msg.roomId = \"!WftKgGpsCEMbOXvEMb:m.tekos.co\"\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.0\",\n \"body\": [\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Spopin Cool\",\n \"spacing\": \"Large\",\n \"horizontalAlignment\": \"Left\",\n \"height\": \"stretch\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Audi A4\",\n \"weight\": \"Bolder\",\n \"size\": \"ExtraLarge\",\n \"spacing\": \"None\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"10€/j · 4.2 ★★★☆ (93)\",\n \"isSubtle\": true,\n \"spacing\": \"None\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"**2018** Berline 5p, Essence\",\n \"size\": \"Small\",\n \"wrap\": true\n }\n ]\n },\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"Image\",\n \"url\": \"https://www.car-revs-daily.com/wp-content/uploads/Car-Revs-Daily.com-2014-Honda-CR-Z-66.gif\",\n \"size\": \"auto\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"Spopin Cool\",\n \"spacing\": \"Large\",\n \"horizontalAlignment\": \"Left\",\n \"height\": \"stretch\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Audi A4\",\n \"weight\": \"Bolder\",\n \"size\": \"ExtraLarge\",\n \"spacing\": \"None\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"10€/j · 4.2 ★★★☆ (93)\",\n \"isSubtle\": true,\n \"spacing\": \"None\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"**2018** Berline 5p, Essence\",\n \"size\": \"Small\",\n \"wrap\": true\n },{\n \"type\": \"ChartComponent\",\n \"title\": \"Please wait...\",\n \"value\": {\n type: 'bar',\n data: {\n labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],\n datasets: [{\n label: '# of Votes',\n data: [12, 19, 3, 5, 2, 3],\n backgroundColor: [\n 'rgba(255, 99, 132, 0.2)',\n 'rgba(54, 162, 235, 0.2)',\n 'rgba(255, 206, 86, 0.2)',\n 'rgba(75, 192, 192, 0.2)',\n 'rgba(153, 102, 255, 0.2)',\n 'rgba(255, 159, 64, 0.2)'\n ],\n borderColor: [\n 'rgba(255, 99, 132, 1)',\n 'rgba(54, 162, 235, 1)',\n 'rgba(255, 206, 86, 1)',\n 'rgba(75, 192, 192, 1)',\n 'rgba(153, 102, 255, 1)',\n 'rgba(255, 159, 64, 1)'\n ],\n borderWidth: 1\n }]\n },\n options: {\n scales: {\n yAxes: [{\n ticks: {\n beginAtZero: true\n }\n }]\n }\n }\n }\n },\n ]\n },\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"Image\",\n \"url\": \"https://www.car-revs-daily.com/wp-content/uploads/Car-Revs-Daily.com-2014-Honda-CR-Z-66.gif\",\n \"size\": \"auto\"\n }\n ]\n }\n ]\n }\n ],\n \n \"actions\": [\n {\n \"type\": \"Action.Stripe\",\n \"title\": \"Payer\",\n \"text\": \"missing params\",\n \"key\":\"pk_test_uFwFmjGxwDPkDjaqjhnBPAEo00pfLZjjoY\",\n \"session_id\":\"cs_test_fldnTJF7UeMIAAw2eaJ0Iht7kk9WSNYAh2xuzFa6mplvYkH387THHkKW\"\n }\n ]\n}\n}\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":510,"y":1320,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"ae075e6e.8e191","type":"function","z":"8eb50c91.720f5","name":"stats","func":"msg.roomId = \"!LAMIpamyCBxUOVQhii:m.tekos.co\"\n\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"projected\": true,\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.0\",\n \"body\": [\n {\n \"speak\": \"Tom's Pie is a Pizza restaurant which is rated 9.3 by customers.\",\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": 2,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"PIZZA\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Tom's Pie\",\n \"weight\": \"bolder\",\n \"size\": \"extraLarge\",\n \"spacing\": \"none\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"4.2 ★★★☆ (93) · $$\",\n \"isSubtle\": true,\n \"spacing\": \"none\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"**Matt H. said** \\\"I'm compelled to give this place 5 stars due to the number of times I've chosen to eat here this past year!\\\"\",\n \"size\": \"small\",\n \"wrap\": true\n }\n \n ]\n },\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"Image\",\n \"url\": \"https://picsum.photos/300?image=882\",\n \"size\": \"auto\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"ChartComponent\",\n \"title\": \"Please wait...\",\n \"value\": {\n type: 'doughnut',\n data: {\n labels: [\"Africa\", \"Asia\", \"Europe\", \"Latin America\", \"North America\"],\n datasets: [\n {\n label: \"Population (millions)\",\n backgroundColor: [\"#3e95cd\", \"#8e5ea2\",\"#3cba9f\",\"#e8c3b9\",\"#c45850\"],\n data: [2478,5267,734,784,433]\n }\n ]\n },\n options: {\n title: {\n display: true,\n text: 'Predicted world population (millions) in 2050'\n }\n }\n }\n }\n ],\n \"actions\": [\n \n {\n \"type\": \"Action.Cloudinary\",\n \"title\": \"cloudinary\",\n \"language\": \"fr\",\n \"upload_text\": \"Télécharger 1 photo\",\n \"cloudname\": \"digi-technologies\",\n \"uploadpreset\": \"frvxsfj7\",\n \"posturl\": \"https://spopin-dev.tekos.co/billing/contract/imagecompteur1/5ebac9ff0657f00012a7a0c8\",\n \"buttontext\": \"Je choisis ma photo\",\n },\n {\n \"type\": \"Action.Stripe\",\n \"title\": \"Payer\",\n \"text\": \"Hello world!\",\n \"key\":\"pk_test_uFwFmjGxwDPkDjaqjhnBPAEo00pfLZjjoY\",\n \"session_id\":\"cs_test_fldnTJF7UeMIAAw2eaJ0Iht7kk9WSNYAh2xuzFa6mplvYkH387THHkKW\"\n }\n ]\n}\n}\n\n\nreturn msg;\n\n\n\n","outputs":1,"noerr":0,"x":510,"y":1380,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"ff0ae399.d25f2","type":"function","z":"8eb50c91.720f5","name":"stats2","func":"msg.roomId = \"!LAMIpamyCBxUOVQhii:m.tekos.co\"\n\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.0\",\n \"body\": [\n {\n \"speak\": \"Tom's Pie is a Pizza restaurant which is rated 9.3 by customers.\",\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": 2,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"**Matt H. said** \\\"I'm compelled to give this place 5 stars due to the number of times I've chosen to eat here this past year!\\\"\",\n \"size\": \"small\",\n \"wrap\": true\n }\n \n ]\n }\n ]\n },\n{\n type: 'doughnut',\n data: {\n labels: [\"Africa\", \"Asia\", \"Europe\", \"Latin America\", \"North America\"],\n datasets: [\n {\n label: \"Population (millions)\",\n backgroundColor: [\"#3e95cd\", \"#8e5ea2\",\"#3cba9f\",\"#e8c3b9\",\"#c45850\"],\n data: [2478,5267,734,784,433]\n }\n ]\n },\n options: {\n title: {\n display: true,\n text: 'Predicted world population (millions) in 2050'\n }\n }\n}\n ],\n \"actions\": [\n \n {\n \"type\": \"Action.Cloudinary\",\n \"title\": \"cloudinary\",\n \"language\": \"fr\",\n \"upload_text\": \"Télécharger 1 photo\",\n \"cloudname\": \"digi-technologies\",\n \"uploadpreset\": \"frvxsfj7\",\n \"posturl\": \"https://spopin-dev.tekos.co/billing/contract/imagecompteur1/5ebac9ff0657f00012a7a0c8\",\n \"buttontext\": \"Je choisis ma photo\",\n },\n {\n \"type\": \"Action.Stripe\",\n \"title\": \"Payer\",\n \"text\": \"Hello world!\",\n \"key\":\"pk_test_uFwFmjGxwDPkDjaqjhnBPAEo00pfLZjjoY\",\n \"session_id\":\"cs_test_fldnTJF7UeMIAAw2eaJ0Iht7kk9WSNYAh2xuzFa6mplvYkH387THHkKW\"\n }\n ]\n}\n}\n\n\nreturn msg;\n\n\n\n","outputs":1,"noerr":0,"x":470,"y":1240,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"7b2e1b0a.c0d2b4","type":"function","z":"8eb50c91.720f5","name":"Setup form","func":"msg.roomId = \"!WftKgGpsCEMbOXvEMb:m.tekos.co\"\n\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"composer\": true,\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.0\",\n \"body\": [\n {\n \"speak\": \"Tom's Pie is a Pizza restaurant which is rated 9.3 by customers.\",\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": 2,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"**Matt H. said** \\\"I'm compelled to give this place 5 stars due to the number of times I've chosen to eat here this past year!\\\"\",\n \"size\": \"small\",\n \"wrap\": true\n }\n \n ]\n }\n ]\n },\n {\n \"type\": \"UploadComponent\",\n \"id\":\"xyz\",\n \"title\": \"Please wait...\",\n \"value\": \"https://node-dev.tekos.co/uppload/images\"\n },\n{\n type: 'doughnut',\n data: {\n labels: [\"Africa\", \"Asia\", \"Europe\", \"Latin America\", \"North America\"],\n datasets: [\n {\n label: \"Population (millions)\",\n backgroundColor: [\"#3e95cd\", \"#8e5ea2\",\"#3cba9f\",\"#e8c3b9\",\"#c45850\"],\n data: [2478,5267,734,784,433]\n }\n ]\n },\n options: {\n title: {\n display: true,\n text: 'Predicted world population (millions) in 2050'\n }\n }\n}\n ],\n \"actions\": [\n {\n \"type\": \"Action.Stripe\",\n \"title\": \"Payer\",\n \"text\": \"Hello world!\",\n \"key\":\"pk_test_uFwFmjGxwDPkDjaqjhnBPAEo00pfLZjjoY\",\n \"session_id\":\"cs_test_fldnTJF7UeMIAAw2eaJ0Iht7kk9WSNYAh2xuzFa6mplvYkH387THHkKW\"\n }\n ]\n}\n}\n\n\nreturn msg;\n\n\n\n","outputs":1,"noerr":0,"x":510,"y":800,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"ba10c05b.0e04c","type":"function","z":"8eb50c91.720f5","name":"candles","func":"msg.roomId = \"!WftKgGpsCEMbOXvEMb:m.tekos.co\"\n\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.0\",\n \"body\": [\n {\n \"speak\": \"Tom's Pie is a Pizza restaurant which is rated 9.3 by customers.\",\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": 2,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"PIZZA\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Tom's Pie\",\n \"weight\": \"bolder\",\n \"size\": \"extraLarge\",\n \"spacing\": \"none\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"4.2 ★★★☆ (93) · $$\",\n \"isSubtle\": true,\n \"spacing\": \"none\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"**Matt H. said** \\\"I'm compelled to give this place 5 stars due to the number of times I've chosen to eat here this past year!\\\"\",\n \"size\": \"small\",\n \"wrap\": true\n }\n \n ]\n },\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"Image\",\n \"url\": \"https://picsum.photos/300?image=882\",\n \"size\": \"auto\"\n }\n ]\n }\n ]\n },\n{\n\ttype: 'candlestick',\n\tdata: {\n\t\tdatasets: [{\n\t\t\tlabel: 'CHRT - Chart.js Corporation',\n//\t\t\tdata: getRandomData(initialDateStr, barCount)\n\t\t}]\n\t},\n\toptions: {\n\t\tscales: {\n\t\t\tx: {\n\t\t\t\tafterBuildTicks: function(scale) {\n\t\t\t\t\tconst majorUnit = scale._majorUnit;\n\t\t\t\t\tconst ticks = scale.ticks;\n\t\t\t\t\tconst firstTick = ticks[0];\n\t\t\t\t\tlet i, ilen, val, tick, currMajor, lastMajor;\n\n\t\t\t\t\tval = luxon.DateTime.fromMillis(ticks[0].value);\n\t\t\t\t\tif ((majorUnit === 'minute' && val.second === 0)\n\t\t\t\t\t\t\t|| (majorUnit === 'hour' && val.minute === 0)\n\t\t\t\t\t\t\t|| (majorUnit === 'day' && val.hour === 9)\n\t\t\t\t\t\t\t|| (majorUnit === 'month' && val.day <= 3 && val.weekday === 1)\n\t\t\t\t\t\t\t|| (majorUnit === 'year' && val.month === 0)) {\n\t\t\t\t\t\tfirstTick.major = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfirstTick.major = false;\n\t\t\t\t\t}\n\t\t\t\t\tlastMajor = val.get(majorUnit);\n\n\t\t\t\t\tfor (i = 1, ilen = ticks.length; i < ilen; i++) {\n\t\t\t\t\t\ttick = ticks[i];\n\t\t\t\t\t\tval = luxon.DateTime.fromMillis(tick.value);\n\t\t\t\t\t\tcurrMajor = val.get(majorUnit);\n\t\t\t\t\t\ttick.major = currMajor !== lastMajor;\n\t\t\t\t\t\tlastMajor = currMajor;\n\t\t\t\t\t}\n\t\t\t\t\treturn ticks;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}}\n ],\n \"actions\": [\n\n {\n \"type\": \"Action.Stripe\",\n \"title\": \"Payer\",\n \"text\": \"Hello world!\",\n \"key\":\"pk_test_uFwFmjGxwDPkDjaqjhnBPAEo00pfLZjjoY\",\n \"session_id\":\"cs_test_fldnTJF7UeMIAAw2eaJ0Iht7kk9WSNYAh2xuzFa6mplvYkH387THHkKW\"\n }\n ]\n}\n}\n\n\nreturn msg;\n\n\n\n","outputs":1,"noerr":0,"x":520,"y":1440,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"d5c87e9b.21347","type":"function","z":"8eb50c91.720f5","name":"--","func":"msg.roomId = \"!WftKgGpsCEMbOXvEMb:m.tekos.co\"\n\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.0\",\n \"body\": [\n {\n \"speak\": \"Tom's Pie is a Pizza restaurant which is rated 9.3 by customers.\",\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": 2,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"PIZZA\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Tom's Pie\",\n \"weight\": \"bolder\",\n \"size\": \"extraLarge\",\n \"spacing\": \"none\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"4.2 ★★★☆ (93) · $$\",\n \"isSubtle\": true,\n \"spacing\": \"none\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"**Matt H. said** \\\"I'm compelled to give this place 5 stars due to the number of times I've chosen to eat here this past year!\\\"\",\n \"size\": \"small\",\n \"wrap\": true\n }\n \n ]\n },\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"Image\",\n \"url\": \"https://picsum.photos/300?image=882\",\n \"size\": \"auto\"\n }\n ]\n }\n ]\n },\n{\n\ttype: 'candlestick',\n\tdata: {\n\t\tdatasets: [{\n\t\t\tlabel: 'CHRT - Chart.js Corporation',\n\t\t\tdata: getRandomData(initialDateStr, barCount)\n\t\t}]\n\t},\n\toptions: {\n\t\tscales: {\n\t\t\tx: {\n\t\t\t\tafterBuildTicks: function(scale) {\n\t\t\t\t\tconst majorUnit = scale._majorUnit;\n\t\t\t\t\tconst ticks = scale.ticks;\n\t\t\t\t\tconst firstTick = ticks[0];\n\t\t\t\t\tlet i, ilen, val, tick, currMajor, lastMajor;\n\n\t\t\t\t\tval = luxon.DateTime.fromMillis(ticks[0].value);\n\t\t\t\t\tif ((majorUnit === 'minute' && val.second === 0)\n\t\t\t\t\t\t\t|| (majorUnit === 'hour' && val.minute === 0)\n\t\t\t\t\t\t\t|| (majorUnit === 'day' && val.hour === 9)\n\t\t\t\t\t\t\t|| (majorUnit === 'month' && val.day <= 3 && val.weekday === 1)\n\t\t\t\t\t\t\t|| (majorUnit === 'year' && val.month === 0)) {\n\t\t\t\t\t\tfirstTick.major = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfirstTick.major = false;\n\t\t\t\t\t}\n\t\t\t\t\tlastMajor = val.get(majorUnit);\n\n\t\t\t\t\tfor (i = 1, ilen = ticks.length; i < ilen; i++) {\n\t\t\t\t\t\ttick = ticks[i];\n\t\t\t\t\t\tval = luxon.DateTime.fromMillis(tick.value);\n\t\t\t\t\t\tcurrMajor = val.get(majorUnit);\n\t\t\t\t\t\ttick.major = currMajor !== lastMajor;\n\t\t\t\t\t\tlastMajor = currMajor;\n\t\t\t\t\t}\n\t\t\t\t\treturn ticks;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}}\n ],\n \"actions\": [\n\n {\n \"type\": \"Action.Stripe\",\n \"title\": \"Payer\",\n \"text\": \"Hello world!\",\n \"key\":\"pk_test_uFwFmjGxwDPkDjaqjhnBPAEo00pfLZjjoY\",\n \"session_id\":\"cs_test_fldnTJF7UeMIAAw2eaJ0Iht7kk9WSNYAh2xuzFa6mplvYkH387THHkKW\"\n }\n ]\n}\n}\n\n\nreturn msg;\n\n\n\n","outputs":1,"noerr":0,"x":505.0173645019531,"y":1492.67724609375,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"7254d5b3.9e3abc","type":"function","z":"8eb50c91.720f5","name":"annotation ?","func":"msg.roomId = \"!WftKgGpsCEMbOXvEMb:m.tekos.co\"\n\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"adaptiveCard\":{\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"type\": \"AdaptiveCard\",\n \"version\": \"1.0\",\n \"body\": [\n {\n \"speak\": \"Tom's Pie is a Pizza restaurant which is rated 9.3 by customers.\",\n \"type\": \"ColumnSet\",\n \"columns\": [\n {\n \"type\": \"Column\",\n \"width\": 2,\n \"items\": [\n {\n \"type\": \"TextBlock\",\n \"text\": \"PIZZA\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"Tom's Pie\",\n \"weight\": \"bolder\",\n \"size\": \"extraLarge\",\n \"spacing\": \"none\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"4.2 ★★★☆ (93) · $$\",\n \"isSubtle\": true,\n \"spacing\": \"none\"\n },\n {\n \"type\": \"TextBlock\",\n \"text\": \"**Matt H. said** \\\"I'm compelled to give this place 5 stars due to the number of times I've chosen to eat here this past year!\\\"\",\n \"size\": \"small\",\n \"wrap\": true\n }\n \n ]\n },\n {\n \"type\": \"Column\",\n \"width\": 1,\n \"items\": [\n {\n \"type\": \"Image\",\n \"url\": \"https://picsum.photos/300?image=882\",\n \"size\": \"auto\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"ChartComponent\",\n \"title\": \"Please wait...\",\n \"value\": {\n type: 'doughnut',\n data: {\n labels: [\"Africa\", \"Asia\", \"Europe\", \"Latin America\", \"North America\"],\n datasets: [\n {\n label: \"Population (millions)\",\n backgroundColor: [\"#3e95cd\", \"#8e5ea2\",\"#3cba9f\",\"#e8c3b9\",\"#c45850\"],\n data: [2478,5267,734,784,433]\n }\n ]\n },\n options: {\n title: {\n display: true,\n text: 'Predicted world population (millions) in 2050'\n }\n }\n }\n }\n ],\n \"actions\": [\n \n {\n \"type\": \"Action.Cloudinary\",\n \"title\": \"cloudinary\",\n \"language\": \"fr\",\n \"upload_text\": \"Télécharger 1 photo\",\n \"cloudname\": \"digi-technologies\",\n \"uploadpreset\": \"frvxsfj7\",\n \"posturl\": \"https://spopin-dev.tekos.co/billing/contract/imagecompteur1/5ebac9ff0657f00012a7a0c8\",\n \"buttontext\": \"Je choisis ma photo\",\n },\n {\n \"type\": \"Action.Stripe\",\n \"title\": \"Payer\",\n \"text\": \"Hello world!\",\n \"key\":\"pk_test_uFwFmjGxwDPkDjaqjhnBPAEo00pfLZjjoY\",\n \"session_id\":\"cs_test_fldnTJF7UeMIAAw2eaJ0Iht7kk9WSNYAh2xuzFa6mplvYkH387THHkKW\"\n }\n ]\n}\n}\n\n\nreturn msg;\n\n\n\n","outputs":1,"noerr":0,"x":530,"y":1540,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"25d86054.0a3d3","type":"function","z":"8eb50c91.720f5","name":"button for composer","func":"msg.roomId = \"!vuokOWexnWBKlcvOYP:m.tekos.co\"\n\nmsg.url = \"https://\"+env.get(\"BASE_URL\")+\"/_matrix/client/r0/rooms/\"+msg.roomId+\"/send/m.room.message?access_token=\"+env.get(\"TEKOS_BOT_TOKEN\");\nmsg.payload={\n \"body\": \"\",\n \"msgtype\": \"m.text\",\n \"composer\": true,\n \"adaptiveCard\":\n {\n \"type\": \"AdaptiveCard\",\n \"body\": [\n {\n \"type\": \"TextBlock\",\n \"size\": \"Medium\",\n \"weight\": \"Bolder\",\n \"text\": \"Select a value\"\n }\n ],\n \"actions\": [\n {\n \"type\": \"Action.OpenUrl\",\n \"title\": \"Button 2\",\n \"url\": \"https://tekos.co\",\n \"style\": \"destructive\"\n },\n {\n \"type\": \"Action.Submit\",\n \"title\": \"Button 3\",\n \"data\":{\n \"postback\":\"hello world\"\n }\n }\n ],\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"version\": \"1.2\"\n}\n\n\n}\n\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":520,"y":740,"wires":[["e1c6454e.772618"]],"icon":"node-red/debug.svg"},{"id":"84742093.1726c","type":"inject","z":"8eb50c91.720f5","name":"wire me","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":1000,"wires":[["c9f65f0f.c3fed"]]}]