Bonjour
below my flow, I hope that it help you. I just want to put a dynamic message with my photo. I don't know how i must give the message to the tweet box.
Thanks
[
{
"id": "de2cb13d.ae6f8",
"type": "tab",
"label": "Flow 1"
},
{
"id": "cd5caaaa.1c3eb8",
"type": "file in",
"z": "de2cb13d.ae6f8",
"name": "M238.png",
"filename": "C:\\Program Files (x86)\\Schneider Electric\\SoMachine Basic\\CatalogResources\\Images\\M238.png",
"format": "",
"x": 570,
"y": 547,
"wires": [
[
"5444605.dc7bc2"
]
]
},
{
"id": "5104ecb.1581914",
"type": "inject",
"z": "de2cb13d.ae6f8",
"name": "",
"topic": "",
"payload": "true",
"payloadType": "bool",
"repeat": "",
"crontab": "",
"once": false,
"x": 348,
"y": 530,
"wires": [
[
"cd5caaaa.1c3eb8",
"fc8e5aad.66e2b8"
]
]
},
{
"id": "18ad7856.e67c6",
"type": "twitter out",
"z": "de2cb13d.ae6f8",
"twitter": "",
"name": "Tweet",
"x": 1157,
"y": 586,
"wires": []
},
{
"id": "894e6551.b9216",
"type": "function",
"z": "de2cb13d.ae6f8",
"name": "",
"func": "node.log(\"M238.png\");\nvar FileName=\"C:\\\\Program Files (x86)\\\\Schneider Electric\\\\SoMachine Basic\\\\CatalogResources\\\\Images\\\\M238.png\";\nnode.log(FileName);\n//msg.media = new Buffer(FileName);\nmsg.media = new Buffer(FileName, 'base64');\nmsg.payload =\"Mon message\";\n//C:\\Program Files (x86)\\Schneider Electric\\SoMachine Basic\\CatalogResources\\Images\\M238.png\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 615,
"y": 348,
"wires": [
[
"18ad7856.e67c6"
]
]
},
{
"id": "dbceab81.942ca8",
"type": "inject",
"z": "de2cb13d.ae6f8",
"name": "",
"topic": "",
"payload": "true",
"payloadType": "bool",
"repeat": "",
"crontab": "",
"once": false,
"x": 344,
"y": 340,
"wires": [
[
"894e6551.b9216"
]
]
},
{
"id": "5444605.dc7bc2",
"type": "change",
"z": "de2cb13d.ae6f8",
"name": "",
"rules": [
{
"t": "set",
"p": "media",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 782,
"y": 610,
"wires": [
[
"18ad7856.e67c6"
]
]
},
{
"id": "fc8e5aad.66e2b8",
"type": "function",
"z": "de2cb13d.ae6f8",
"name": "",
"func": "msg.payload =\"toto et tata\";\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 560,
"y": 634,
"wires": [
[
"5444605.dc7bc2"
]
]