node-red-contrib-matrix-cha.../examples/respond-file-with-file.json
2021-08-18 14:19:20 -06:00

161 lines
2.9 KiB
JSON

[
{
"id": "a9b412957063b06c",
"type": "matrix-receive",
"z": "f025a8b9fbd1b054",
"name": "",
"server": "4de4e868e02a9051",
"roomId": "",
"ignoreText": false,
"ignoreReactions": false,
"ignoreFiles": false,
"ignoreImages": false,
"x": 460,
"y": 120,
"wires": [
[
"4aa45cd8653ba898"
]
]
},
{
"id": "4aa45cd8653ba898",
"type": "switch",
"z": "f025a8b9fbd1b054",
"name": "msg.payload == \"file\"",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "file",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 660,
"y": 120,
"wires": [
[
"64be2c99ef9ea32f"
]
]
},
{
"id": "195f346def928e16",
"type": "comment",
"z": "f025a8b9fbd1b054",
"name": "Respond to \"image\" with an uploaded image",
"info": "",
"x": 550,
"y": 80,
"wires": []
},
{
"id": "73fd7523a4ba670e",
"type": "change",
"z": "f025a8b9fbd1b054",
"name": "",
"rules": [
{
"t": "set",
"p": "body",
"pt": "msg",
"to": "test body",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1010,
"y": 120,
"wires": [
[
"a03b911e2b2e421b"
]
]
},
{
"id": "86b92dea5e5ab056",
"type": "debug",
"z": "f025a8b9fbd1b054",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1290,
"y": 100,
"wires": []
},
{
"id": "f6826747cd96b814",
"type": "debug",
"z": "f025a8b9fbd1b054",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1290,
"y": 140,
"wires": []
},
{
"id": "64be2c99ef9ea32f",
"type": "file in",
"z": "f025a8b9fbd1b054",
"name": "",
"filename": "sample.pdf",
"format": "",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": false,
"x": 850,
"y": 120,
"wires": [
[
"73fd7523a4ba670e"
]
]
},
{
"id": "a03b911e2b2e421b",
"type": "matrix-send-file",
"z": "f025a8b9fbd1b054",
"name": "",
"server": "4de4e868e02a9051",
"roomId": "",
"contentType": "application/pdf",
"x": 1160,
"y": 120,
"wires": [
[
"86b92dea5e5ab056"
],
[
"f6826747cd96b814"
]
]
},
{
"id": "4de4e868e02a9051",
"type": "matrix-server-config",
"name": "Your Server",
"autoAcceptRoomInvites": true
}
]