-
Notifications
You must be signed in to change notification settings - Fork 10
/
eventbrite_notifications.azure_logic_app.txt
89 lines (89 loc) · 3.96 KB
/
eventbrite_notifications.azure_logic_app.txt
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
{
"$connections": {
"value": {
"azurequeues": {
"connectionId": "/subscriptions/dd079971-2023-4b56-be3a-85a346d51344/resourceGroups/dddperth-backend/providers/Microsoft.Web/connections/azurequeues",
"connectionName": "azurequeues",
"id": "/subscriptions/dd079971-2023-4b56-be3a-85a346d51344/providers/Microsoft.Web/locations/australiaeast/managedApis/azurequeues"
},
"teams": {
"connectionId": "/subscriptions/dd079971-2023-4b56-be3a-85a346d51344/resourceGroups/dddperth-backend/providers/Microsoft.Web/connections/teams",
"connectionName": "teams",
"id": "/subscriptions/dd079971-2023-4b56-be3a-85a346d51344/providers/Microsoft.Web/locations/australiaeast/managedApis/teams"
}
}
},
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Delete_message": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['azurequeues']['connectionId']"
}
},
"method": "delete",
"path": "/@{encodeURIComponent('attendees')}/messages/@{encodeURIComponent(triggerBody()?['MessageId'])}",
"queries": {
"popreceipt": "@triggerBody()?['PopReceipt']"
}
},
"runAfter": {
"Post_message": [
"Succeeded"
]
},
"type": "ApiConnection"
},
"Post_message": {
"inputs": {
"body": {
"rootMessage": {
"body": {
"content": "@{json(trigger().outputs.body.MessageText).name} is attending @{json(trigger().outputs.body.MessageText).event} as @{json(trigger().outputs.body.MessageText).ticketClass} (orderid: @{json(trigger().outputs.body.MessageText).orderId}). @{json(trigger().outputs.body.MessageText).qtySold}/@{json(trigger().outputs.body.MessageText).totalQty} @{json(trigger().outputs.body.MessageText).ticketClass} tickets taken.",
"contentType": 1
}
}
},
"host": {
"connection": {
"name": "@parameters('$connections')['teams']['connectionId']"
}
},
"method": "post",
"path": "/beta/groups/@{encodeURIComponent('23a18b51-c439-4146-9784-0ac93ba786ff')}/channels/@{encodeURIComponent('2898b410-3d52-44e3-bde4-c2b23f03a227')}/chatThreads"
},
"runAfter": {},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"When_there_are_messages_in_a_queue": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['azurequeues']['connectionId']"
}
},
"method": "get",
"path": "/@{encodeURIComponent('attendees')}/message_trigger"
},
"recurrence": {
"frequency": "Minute",
"interval": 5
},
"splitOn": "@triggerBody()?['QueueMessagesList']['QueueMessage']",
"type": "ApiConnection"
}
}
}
}