Skip to content

Instantly share code, notes, and snippets.

@katrinDY
Created December 15, 2022 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katrinDY/079112f240a1d1ee448fbd1618782658 to your computer and use it in GitHub Desktop.
Save katrinDY/079112f240a1d1ee448fbd1618782658 to your computer and use it in GitHub Desktop.
{
"workflows": [
{
"handle": "send_notification_to_queue",
"enabled": true,
"meta": {
"name": "Send notification to queue",
"description": "",
"visual": null
},
"keepSessions": 0,
"steps": [
{
"stepID": "4",
"kind": "function",
"ref": "queueWrite",
"arguments": [
{
"target": "payload",
"expr": "format(\"{\\\"message\\\":\\\"%s\\\"}\", request.message)",
"type": "String"
},
{
"target": "queue",
"value": "notification_matrix",
"type": "String"
}
],
"results": [],
"meta": {
"name": "",
"description": "",
"visual": {
"defaultName": true,
"id": "4",
"parent": "1",
"value": "Queue message send",
"xywh": [
2320,
2240,
200,
80
]
}
}
},
{
"stepID": "7",
"kind": "function",
"ref": "jsenvExecute",
"arguments": [
{
"target": "scope",
"expr": "request",
"type": "Any"
},
{
"target": "source",
"value": "var request\n\ntry {\n\trequest = JSON.parse(readRequestBody(input));\n} catch (e) {\n\tthrow new Error('could not parse contact info payload: ' + e)\n}\n\nreturn request;",
"type": "String"
}
],
"results": [
{
"target": "request",
"expr": "resultAny"
}
],
"meta": {
"name": "",
"description": "",
"visual": {
"defaultName": false,
"id": "7",
"parent": "1",
"value": "Parse request",
"xywh": [
2320,
2080,
200,
80
]
}
}
}
],
"paths": [
{
"parentID": "7",
"childID": "4",
"meta": {
"name": "",
"description": "",
"visual": {
"id": "17",
"parent": "1",
"points": null,
"style": "exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;",
"value": null
}
}
}
],
"triggers": [
{
"resourceType": "system",
"eventType": "onManual",
"constraints": [
{
"name": "",
"op": "=",
"values": [
""
]
}
],
"enabled": true,
"stepID": "7",
"meta": {
"description": "",
"visual": {
"defaultName": true,
"edges": [
{
"childID": "7",
"meta": {
"description": "",
"label": "",
"visual": {
"id": "16",
"parent": "1",
"points": [],
"style": "exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;",
"value": null
}
},
"parentID": "15"
}
],
"id": "15",
"parent": "1",
"value": "System - onManual",
"xywh": [
2320,
1920,
200,
80
]
}
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment