-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflow.json
More file actions
218 lines (218 loc) · 8.42 KB
/
flow.json
File metadata and controls
218 lines (218 loc) · 8.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
[
{
"id": "3cd055e7b65a2772",
"type": "tab",
"label": "Example flow",
"disabled": false,
"info": "",
"env": []
},
{
"id": "1232437c435050a9",
"type": "sinch-message",
"z": "3cd055e7b65a2772",
"name": "Welcome message",
"message": "{\n \"text_message\":{ \n \"text\": \"Hello {{name}}, Welcome to Sinch!\"\n }\n}",
"x": 650,
"y": 160,
"wires": [
[
"99b0f35fdb3c0d71"
]
]
},
{
"id": "9468454a39f1460e",
"type": "sinch-received-message",
"z": "3cd055e7b65a2772",
"name": "",
"convapiConfiguration": "",
"inputs": 0,
"x": 370,
"y": 320,
"wires": [
[
"c769266b4bb215ac"
]
]
},
{
"id": "ede6479e86b6b8eb",
"type": "inject",
"z": "3cd055e7b65a2772",
"name": "Start",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 170,
"y": 160,
"wires": [
[
"2da0af7cd35349e9"
]
]
},
{
"id": "99b0f35fdb3c0d71",
"type": "sinch-send",
"z": "3cd055e7b65a2772",
"name": "Send first message",
"convapiConfiguration": "",
"receive": false,
"x": 910,
"y": 160,
"wires": [
[],
[]
]
},
{
"id": "781340d448290a41",
"type": "sinch-events",
"z": "3cd055e7b65a2772",
"name": "Message Deliveries",
"events": "messageDeliveryReport",
"x": 370,
"y": 560,
"wires": [
[
"6644e60a1386799d"
]
]
},
{
"id": "6644e60a1386799d",
"type": "debug",
"z": "3cd055e7b65a2772",
"name": "Inspect event data",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 610,
"y": 560,
"wires": []
},
{
"id": "2da0af7cd35349e9",
"type": "sinch-start-conversation",
"z": "3cd055e7b65a2772",
"name": "Init conversation",
"variables": "{ \"name\": \"Calle\" }",
"channelIdentities": [
{
"channel": "TELEGRAM",
"identity": ""
}
],
"x": 360,
"y": 160,
"wires": [
[
"1232437c435050a9"
]
]
},
{
"id": "c769266b4bb215ac",
"type": "sinch-message",
"z": "3cd055e7b65a2772",
"name": "Interesting question",
"message": "{\n \"text_message\":{ \n \"text\": \"Would you recommend Sinch as a place to work?\"\n }\n}",
"x": 650,
"y": 320,
"wires": [
[
"77f85aa58d67c9dc"
]
]
},
{
"id": "77f85aa58d67c9dc",
"type": "sinch-send",
"z": "3cd055e7b65a2772",
"name": "Send first question",
"convapiConfiguration": "",
"receive": true,
"x": 910,
"y": 320,
"wires": [
[
"91cecc8df9b1cc14"
],
[]
]
},
{
"id": "124640c45d9061d9",
"type": "sinch-send",
"z": "3cd055e7b65a2772",
"name": "Send final message",
"convapiConfiguration": "",
"receive": false,
"x": 1030,
"y": 440,
"wires": [
[],
[]
]
},
{
"id": "91cecc8df9b1cc14",
"type": "sinch-template",
"z": "3cd055e7b65a2772",
"name": "omni template",
"convapiConfiguration": "",
"template": "",
"x": 760,
"y": 440,
"wires": [
[
"124640c45d9061d9"
]
]
},
{
"id": "5f03f56dddc29464",
"type": "comment",
"z": "3cd055e7b65a2772",
"name": "Outbound flow - README",
"info": "The outbound flow allows you to start a conversation from Node-RED. \n\nThe following configuration is required to test Outbound Flow:\n\n**Start Conversation node:**\n(Required)\n1. Specify at least one channel and identity. E.g. SMS & +123456789.\n\n(Optional)\n1. Update the variable name to some other name.\n**Message node:**\n(Optional)\n1. The message is preconfigured, if the variable {{name}} is removed from the Start conversation,\nalso remove the variable here.\n\n**Send node:**\n(Required)\n1. Configure or select a Conversation API configuration. The Project ID, Key ID, Key Secret, App can all be\nfound on your account on the [Sinch Dashboard](https://dashboard.sinch.com/).\n\n**Debugging**\nIf you have issues with sending a message there are a few tools to help you out. \n1. Debug messages. Debug messages are found in the right panel in Node-RED and most issues related\nto bad or missing configurations are posted there. \n2. Events node. If the message fails to send on the API level you can configure the Events node\nto receive delivery reports and other types of events. To do so, see the comment node above the\nIncoming events flow. \n\n",
"x": 390,
"y": 80,
"wires": []
},
{
"id": "3a2e7109543d7fc8",
"type": "comment",
"z": "3cd055e7b65a2772",
"name": "Inbound flow - README",
"info": "The inbound flow allows you to start a conversation from an incoming message from the \nConversation API. \n\nThe following configuration is required to test Outbound Flow:\n\n**Receive node:**\n(Required)\n1. Configure a Conversation API configuration. The Project ID, Key ID, Key Secret, App can all be\nfound on your account on the [Sinch Dashboard](https://dashboard.sinch.com/).\n2. On you app configuration page on the [Sinch Dashboard](https://dashboard.sinch.com/) make sure\nyou have configured a Webhook and that the trigger INBOUND_MESSAGE is selected. \nThe Webhook shoud point to `<node-red-path>/sinch-conversation-api/callback`.\nFor testing of message and event routing from the Conversation API to Node-RED we recommend \nusing a free account on [Ngrok](https://ngrok.com). \n\n**Message node:**\n(Optionl)\n1. This node comes preconfigured with a message. Feel free to change it or use as is.\n\n**Template node:**\n(Required)\n1. Configure a Conversation API configuration. The Project ID, Key ID, Key Secret, App can all be\nfound on your account on the [Sinch Dashboard](https://dashboard.sinch.com/).\n2. Make sure that you have at least one omni-channel created on the same project selected in the \nConversation API configuration. If not, got to the [Sinch Dashboard](https://dashboard.sinch.com/)\nand create one. \n3. When the Conversation API configuration and template is created, pick a template from the \ndrop down list. \n\n**Send node:**\n(Required)\n1. Configure or select a Conversation API configuration. The Project ID, Key ID, Key Secret, App can all be\nfound on your account on the [Sinch Dashboard](https://dashboard.sinch.com/).\n",
"x": 390,
"y": 260,
"wires": []
},
{
"id": "8d29e2a01c624922",
"type": "comment",
"z": "3cd055e7b65a2772",
"name": "Incoming events - README",
"info": "The incoming events node enables you to listen for one or many events that\nmight be triggered from Conversation API. A debug node is connected for testing purposes. \nThe output of the Debug node is printed in the Debug messages in the right sidebar. \n\nThe following configuration is required to test the Incoming events flow:\n\n**Events node:**\n(Required)\n1. On you app configuration page on the [Sinch Dashboard](https://dashboard.sinch.com/) make sure\nyou have configured a Webhook and that at least the trigger MESSAGE_DELIVERY is selected. \nThe Webhook shoud point to `<node-red-path>/sinch-conversation-api/callback`.\nFor testing of message and event routing from the Conversation API to Node-RED we recommend \nusing a free account on [Ngrok](https://ngrok.com). \n",
"x": 400,
"y": 500,
"wires": []
}
]