Created
October 30, 2014 22:05
-
-
Save redaphid/cc8b7e41a90c2d580bb3 to your computer and use it in GitHub Desktop.
twitter-flow-example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"flowId": "bc8c25c1-5fb8-11e4-92ee-297ea4fd1389", | |
"token": "c2dn8x0yycoywrk9otm5b3ilvv6uhaor", | |
"hash": "aac952aa", | |
"name": "Reaper - Twitter", | |
"nodes": [ | |
{ | |
"id": "9f0a2c30-5fb9-11e4-adc8-dbaae6c6bcce", | |
"resourceType": "flow-node", | |
"channelid": "5409f79403f1d8b163401370", | |
"channelActivationId": "5451679bb823384e03981129", | |
"uuid": "72f84820-5fb9-11e4-bd6b-11193da477a5", | |
"name": "Twitter", | |
"type": "channel:twitter", | |
"category": "channel", | |
"online": true, | |
"nodeType": {}, | |
"class": "Twitter", | |
"defaults": { | |
"channelid": "5409f79403f1d8b163401370", | |
"channelActivationId": "5451679bb823384e03981129", | |
"uuid": "72f84820-5fb9-11e4-bd6b-11193da477a5", | |
"name": "Twitter", | |
"type": "channel:twitter", | |
"category": "channel", | |
"online": true, | |
"nodeType": {} | |
}, | |
"input": 1, | |
"output": 1, | |
"formTemplatePath": "/pages/node_forms/channel_form.html", | |
"logo": "https://ds78apnml6was.cloudfront.net/channel/twitter.svg", | |
"inputLocations": [ | |
30 | |
], | |
"outputLocations": [ | |
30 | |
], | |
"x": 388.6665344238281, | |
"y": 805.6661987304688, | |
"urlParams": {}, | |
"queryParams": { | |
"q": "#hootoween", | |
"count": "1", | |
"since_id": "{{lastTwitter}}" | |
}, | |
"bodyParams": {}, | |
"url": "https://api.twitter.com/1.1/search/tweets.json", | |
"method": "GET", | |
"debug": false, | |
"headerParams": {} | |
}, | |
{ | |
"id": "c1d62370-5fc5-11e4-aea6-ef9e159ba57d", | |
"resourceType": "flow-node", | |
"output": 1, | |
"func": "return msg.statuses[0]", | |
"name": "getId", | |
"class": "function", | |
"category": "operation", | |
"uuid": "37f0a3a8-2f17-11e4-9617-a6c5e4d22fb7", | |
"type": "operation:function", | |
"defaults": { | |
"output": 1, | |
"func": "\nreturn msg;" | |
}, | |
"input": 1, | |
"formTemplatePath": "/pages/node_forms/function_form.html", | |
"logo": "https://ds78apnml6was.cloudfront.net/operation/function.svg", | |
"inputLocations": [ | |
30 | |
], | |
"outputLocations": [ | |
30 | |
], | |
"x": 721.9998779296875, | |
"y": 713.6663208007812, | |
"debug": false | |
}, | |
{ | |
"id": "d6eb5320-5fc5-11e4-aea6-ef9e159ba57d", | |
"resourceType": "flow-node", | |
"output": 1, | |
"func": "return {\n payload : {\n action: \"say\",\n data : msg.statuses[0].text.toLowerCase().replace(/(https?:\\/\\/[^\\s]+)/g, '') \n }\n}", | |
"name": "getStatus", | |
"class": "function", | |
"category": "operation", | |
"uuid": "37f0a3a8-2f17-11e4-9617-a6c5e4d22fb7", | |
"type": "operation:function", | |
"defaults": { | |
"output": 1, | |
"func": "\nreturn msg;" | |
}, | |
"input": 1, | |
"formTemplatePath": "/pages/node_forms/function_form.html", | |
"logo": "https://ds78apnml6was.cloudfront.net/operation/function.svg", | |
"inputLocations": [ | |
30 | |
], | |
"outputLocations": [ | |
30 | |
], | |
"x": 721.9998779296875, | |
"y": 873.6663208007812, | |
"debug": false | |
}, | |
{ | |
"id": "4d0516e0-5fc6-11e4-aea6-ef9e159ba57d", | |
"resourceType": "flow-node", | |
"name": "Set Key", | |
"class": "set-key", | |
"category": "operation", | |
"uuid": "5a6bb5a5-b2ef-4a9e-b15f-f0f646ee90d6", | |
"type": "operation:set-key", | |
"defaults": {}, | |
"input": 1, | |
"output": 1, | |
"formTemplatePath": "/pages/node_forms/set_key_form.html", | |
"logo": "https://ds78apnml6was.cloudfront.net/operation/set-key.svg", | |
"inputLocations": [ | |
30 | |
], | |
"outputLocations": [ | |
30 | |
], | |
"x": 859.9998779296875, | |
"y": 713.6661376953125, | |
"key": "lastTwitter", | |
"value": "{{id_str}}" | |
}, | |
{ | |
"id": "64c2f860-5fc6-11e4-aea6-ef9e159ba57d", | |
"resourceType": "flow-node", | |
"name": "Get Key", | |
"class": "get-key", | |
"category": "operation", | |
"uuid": "6daa638e-ced8-4de9-be9b-dcd026be6348", | |
"type": "operation:get-key", | |
"defaults": {}, | |
"input": 1, | |
"output": 1, | |
"formTemplatePath": "/pages/node_forms/get_key_form.html", | |
"logo": "https://ds78apnml6was.cloudfront.net/operation/get-key.svg", | |
"inputLocations": [ | |
30 | |
], | |
"outputLocations": [ | |
30 | |
], | |
"x": 275.99981689453125, | |
"y": 798.9995727539062, | |
"key": "lastTwitter", | |
"debug": false | |
}, | |
{ | |
"id": "44330610-5fc8-11e4-aea6-ef9e159ba57d", | |
"resourceType": "flow-node", | |
"value": 0, | |
"name": "Greater Than", | |
"class": "greater-than", | |
"category": "operation", | |
"uuid": "7c801bad-4e1d-4ad0-aabd-d1ace2fcc001", | |
"type": "operation:greater-than", | |
"defaults": { | |
"value": 0 | |
}, | |
"input": 1, | |
"output": 1, | |
"formTemplatePath": "/pages/node_forms/greater_than_form.html", | |
"logo": "https://ds78apnml6was.cloudfront.net/operation/greater-than.svg", | |
"inputLocations": [ | |
30 | |
], | |
"outputLocations": [ | |
30 | |
], | |
"x": 527.3331909179688, | |
"y": 799.6661376953125, | |
"key": "statuses.length" | |
}, | |
{ | |
"id": "86e1a430-5fc8-11e4-aea6-ef9e159ba57d", | |
"resourceType": "flow-node", | |
"payloadType": "date", | |
"repeat": 15000, | |
"once": true, | |
"name": "interval", | |
"class": "interval", | |
"category": "operation", | |
"uuid": "37f0a966-2f17-11e4-9617-a6c5e4d22fb7", | |
"type": "operation:interval", | |
"defaults": { | |
"payloadType": "date", | |
"repeat": 1000, | |
"once": true | |
}, | |
"input": 0, | |
"output": 1, | |
"formTemplatePath": "/pages/node_forms/interval_form.html", | |
"logo": "https://ds78apnml6was.cloudfront.net/operation/interval.svg", | |
"inputLocations": [], | |
"outputLocations": [ | |
30 | |
], | |
"x": 159.3332061767578, | |
"y": 800.9994506835938 | |
}, | |
{ | |
"id": "c1e10270-5fd1-11e4-bd96-e38d98c2bebd", | |
"resourceType": "flow-node", | |
"_id": "545139b0708b10c053e806b8", | |
"channel": "main", | |
"geo": { | |
"range": [ | |
1655628288, | |
1655628799 | |
], | |
"country": "US", | |
"region": "AZ", | |
"city": "Phoenix", | |
"ll": [ | |
33.4484, | |
-112.074 | |
] | |
}, | |
"ipAddress": "98.174.226.185", | |
"isChanged": true, | |
"name": "Reaper - Cohoots", | |
"online": true, | |
"owner": "4cfd8b11-e5db-11e3-93f8-f3e7e8d1cce9", | |
"protocol": "websocket", | |
"secure": false, | |
"socketid": "za6tlt93z5yKDJsOAACK", | |
"subtype": "other", | |
"timestamp": "2014-10-30T01:07:59.729Z", | |
"token": "2maghvnc8lsug14i5i9vanm51h22csor", | |
"type": "device:other", | |
"uuid": "14ebd9b1-5f9e-11e4-afa6-d79c246ede0f", | |
"category": "device", | |
"staticMessage": {}, | |
"useStaticMessage": false, | |
"nodeType": {}, | |
"class": "Reaper - Cohoots", | |
"defaults": { | |
"_id": "545139b0708b10c053e806b8", | |
"channel": "main", | |
"geo": { | |
"range": [ | |
1655628288, | |
1655628799 | |
], | |
"country": "US", | |
"region": "AZ", | |
"city": "Phoenix", | |
"ll": [ | |
33.4484, | |
-112.074 | |
] | |
}, | |
"ipAddress": "98.174.226.185", | |
"isChanged": true, | |
"name": "Reaper - Cohoots", | |
"online": true, | |
"owner": "4cfd8b11-e5db-11e3-93f8-f3e7e8d1cce9", | |
"protocol": "websocket", | |
"secure": false, | |
"socketid": "za6tlt93z5yKDJsOAACK", | |
"subtype": "other", | |
"timestamp": "2014-10-30T01:07:59.729Z", | |
"token": "2maghvnc8lsug14i5i9vanm51h22csor", | |
"type": "device:other", | |
"uuid": "14ebd9b1-5f9e-11e4-afa6-d79c246ede0f", | |
"category": "device", | |
"staticMessage": {}, | |
"useStaticMessage": true, | |
"nodeType": {} | |
}, | |
"input": 1, | |
"output": 1, | |
"formTemplatePath": "/pages/node_forms/device_form.html", | |
"logo": "https://ds78apnml6was.cloudfront.net/device/other.svg", | |
"inputLocations": [ | |
30 | |
], | |
"outputLocations": [ | |
30 | |
], | |
"x": 874.6665649414062, | |
"y": 873.6663818359375 | |
} | |
], | |
"links": [ | |
{ | |
"from": "42986150-5fa6-11e4-bb35-957707596f0f", | |
"fromPort": 0, | |
"to": "20cd8ff0-5fa6-11e4-bb35-957707596f0f", | |
"toPort": 0 | |
}, | |
{ | |
"from": "c29e6d90-5fa6-11e4-bb35-957707596f0f", | |
"fromPort": 0, | |
"to": "56b04540-5fa6-11e4-bb35-957707596f0f", | |
"toPort": 0 | |
}, | |
{ | |
"from": "0ef67ed0-5fa7-11e4-bb35-957707596f0f", | |
"fromPort": 0, | |
"to": "2289f080-5fa7-11e4-bb35-957707596f0f", | |
"toPort": 0 | |
}, | |
{ | |
"from": "e674f800-5fa7-11e4-bb35-957707596f0f", | |
"fromPort": 0, | |
"to": "c39f1f40-5fa7-11e4-bb35-957707596f0f", | |
"toPort": 0 | |
}, | |
{ | |
"from": "ee498410-5fa7-11e4-bb35-957707596f0f", | |
"fromPort": 0, | |
"to": "b9f50fe0-5fa7-11e4-bb35-957707596f0f", | |
"toPort": 0 | |
}, | |
{ | |
"from": "818bef10-5fad-11e4-92d5-81b903b2194e", | |
"fromPort": 0, | |
"to": "fe2b3100-5faa-11e4-bb35-957707596f0f", | |
"toPort": 0 | |
}, | |
{ | |
"from": "ee498410-5fa7-11e4-bb35-957707596f0f", | |
"fromPort": 0, | |
"to": "d5cb6c90-5fb7-11e4-9f76-5f405d8a5cd2", | |
"toPort": 0 | |
}, | |
{ | |
"from": "818bef10-5fad-11e4-92d5-81b903b2194e", | |
"fromPort": 0, | |
"to": "e7dbe7c0-5fb7-11e4-9f76-5f405d8a5cd2", | |
"toPort": 0 | |
}, | |
{ | |
"from": "9f0a2c30-5fb9-11e4-adc8-dbaae6c6bcce", | |
"fromPort": 0, | |
"to": "e0e1a430-5fb9-11e4-adc8-dbaae6c6bcce", | |
"toPort": 0 | |
}, | |
{ | |
"from": "9f0a2c30-5fb9-11e4-adc8-dbaae6c6bcce", | |
"fromPort": 0, | |
"to": "116f4c60-5fba-11e4-adc8-dbaae6c6bcce", | |
"toPort": 0 | |
}, | |
{ | |
"from": "116f4c60-5fba-11e4-adc8-dbaae6c6bcce", | |
"fromPort": 0, | |
"to": "1bce7af0-5fba-11e4-adc8-dbaae6c6bcce", | |
"toPort": 0 | |
}, | |
{ | |
"from": "9f0a2c30-5fb9-11e4-adc8-dbaae6c6bcce", | |
"fromPort": 0, | |
"to": "16e0eff0-5fbf-11e4-adc8-dbaae6c6bcce", | |
"toPort": 0 | |
}, | |
{ | |
"from": "16e0eff0-5fbf-11e4-adc8-dbaae6c6bcce", | |
"fromPort": 0, | |
"to": "295a6620-5fbf-11e4-adc8-dbaae6c6bcce", | |
"toPort": 0 | |
}, | |
{ | |
"from": "9f0a2c30-5fb9-11e4-adc8-dbaae6c6bcce", | |
"fromPort": 0, | |
"to": "09a606c0-5fc1-11e4-828b-cffad5a8ded0", | |
"toPort": 0 | |
}, | |
{ | |
"from": "09a606c0-5fc1-11e4-828b-cffad5a8ded0", | |
"fromPort": 0, | |
"to": "295a6620-5fbf-11e4-adc8-dbaae6c6bcce", | |
"toPort": 0 | |
}, | |
{ | |
"from": "09a606c0-5fc1-11e4-828b-cffad5a8ded0", | |
"fromPort": 0, | |
"to": "295f8450-5fc1-11e4-828b-cffad5a8ded0", | |
"toPort": 0 | |
}, | |
{ | |
"from": "295f8450-5fc1-11e4-828b-cffad5a8ded0", | |
"fromPort": 0, | |
"to": "2f94df50-5fc1-11e4-828b-cffad5a8ded0", | |
"toPort": 0 | |
}, | |
{ | |
"from": "c12ff530-5fc1-11e4-828b-cffad5a8ded0", | |
"fromPort": 0, | |
"to": "2f94df50-5fc1-11e4-828b-cffad5a8ded0", | |
"toPort": 0 | |
}, | |
{ | |
"from": "c8d54900-5fc3-11e4-a00d-974df2b1c0fd", | |
"fromPort": 0, | |
"to": "d2f5c0e0-5fc3-11e4-a00d-974df2b1c0fd", | |
"toPort": 0 | |
}, | |
{ | |
"from": "d6eb5320-5fc5-11e4-aea6-ef9e159ba57d", | |
"fromPort": 0, | |
"to": "c12ff530-5fc1-11e4-828b-cffad5a8ded0", | |
"toPort": 0 | |
}, | |
{ | |
"from": "c1d62370-5fc5-11e4-aea6-ef9e159ba57d", | |
"fromPort": 0, | |
"to": "344c5aa0-5fc6-11e4-aea6-ef9e159ba57d", | |
"toPort": 0 | |
}, | |
{ | |
"from": "c1d62370-5fc5-11e4-aea6-ef9e159ba57d", | |
"fromPort": 0, | |
"to": "4d0516e0-5fc6-11e4-aea6-ef9e159ba57d", | |
"toPort": 0 | |
}, | |
{ | |
"from": "dca978c0-5fb9-11e4-adc8-dbaae6c6bcce", | |
"fromPort": 0, | |
"to": "64c2f860-5fc6-11e4-aea6-ef9e159ba57d", | |
"toPort": 0 | |
}, | |
{ | |
"from": "9f0a2c30-5fb9-11e4-adc8-dbaae6c6bcce", | |
"fromPort": 0, | |
"to": "44330610-5fc8-11e4-aea6-ef9e159ba57d", | |
"toPort": 0 | |
}, | |
{ | |
"from": "44330610-5fc8-11e4-aea6-ef9e159ba57d", | |
"fromPort": 0, | |
"to": "c1d62370-5fc5-11e4-aea6-ef9e159ba57d", | |
"toPort": 0 | |
}, | |
{ | |
"from": "44330610-5fc8-11e4-aea6-ef9e159ba57d", | |
"fromPort": 0, | |
"to": "d6eb5320-5fc5-11e4-aea6-ef9e159ba57d", | |
"toPort": 0 | |
}, | |
{ | |
"from": "86e1a430-5fc8-11e4-aea6-ef9e159ba57d", | |
"fromPort": 0, | |
"to": "64c2f860-5fc6-11e4-aea6-ef9e159ba57d", | |
"toPort": 0 | |
}, | |
{ | |
"from": "c12ff530-5fc1-11e4-828b-cffad5a8ded0", | |
"fromPort": 0, | |
"to": "73b9b3a0-5fca-11e4-8f60-618e27186187", | |
"toPort": 0 | |
}, | |
{ | |
"from": "64c2f860-5fc6-11e4-aea6-ef9e159ba57d", | |
"fromPort": 0, | |
"to": "9f0a2c30-5fb9-11e4-adc8-dbaae6c6bcce", | |
"toPort": 0 | |
}, | |
{ | |
"from": "c12ff530-5fc1-11e4-828b-cffad5a8ded0", | |
"fromPort": 0, | |
"to": "099ed9d0-5fcc-11e4-8f60-618e27186187", | |
"toPort": 0 | |
}, | |
{ | |
"from": "d2f5c0e0-5fc3-11e4-a00d-974df2b1c0fd", | |
"fromPort": 0, | |
"to": "099ed9d0-5fcc-11e4-8f60-618e27186187", | |
"toPort": 0 | |
}, | |
{ | |
"from": "d6eb5320-5fc5-11e4-aea6-ef9e159ba57d", | |
"fromPort": 0, | |
"to": "099ed9d0-5fcc-11e4-8f60-618e27186187", | |
"toPort": 0 | |
}, | |
{ | |
"from": "d6eb5320-5fc5-11e4-aea6-ef9e159ba57d", | |
"fromPort": 0, | |
"to": "c1e10270-5fd1-11e4-bd96-e38d98c2bebd", | |
"toPort": 0 | |
} | |
], | |
"zoomScale": 1.5, | |
"zoomX": 303.000186920166, | |
"zoomY": -970.9992980957031, | |
"selectedLink": null, | |
"selectedFlowNode": { | |
"id": "9f0a2c30-5fb9-11e4-adc8-dbaae6c6bcce", | |
"resourceType": "flow-node", | |
"channelid": "5409f79403f1d8b163401370", | |
"channelActivationId": "", | |
"uuid": "72f84820-5fb9-11e4-bd6b-11193da477a5", | |
"name": "Twitter", | |
"type": "channel:twitter", | |
"category": "channel", | |
"online": true, | |
"nodeType": {}, | |
"class": "Twitter", | |
"defaults": { | |
"channelid": "5409f79403f1d8b163401370", | |
"channelActivationId": "", | |
"uuid": "72f84820-5fb9-11e4-bd6b-11193da477a5", | |
"name": "Twitter", | |
"type": "channel:twitter", | |
"category": "channel", | |
"online": true, | |
"nodeType": {} | |
}, | |
"input": 1, | |
"output": 1, | |
"formTemplatePath": "/pages/node_forms/channel_form.html", | |
"logo": "https://ds78apnml6was.cloudfront.net/channel/twitter.svg", | |
"inputLocations": [ | |
30 | |
], | |
"outputLocations": [ | |
30 | |
], | |
"x": 388.6665344238281, | |
"y": 805.6661987304688, | |
"urlParams": {}, | |
"queryParams": { | |
"q": "#hootoween", | |
"count": "1", | |
"since_id": "{{lastTwitter}}" | |
}, | |
"bodyParams": {}, | |
"url": "https://api.twitter.com/1.1/search/tweets.json", | |
"method": "GET", | |
"debug": false, | |
"headerParams": {} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment