forked from ot4i/app-connect-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSend Gmail message for a new Salesforce Lead or a Slack message if email address is missing.yaml
108 lines (108 loc) · 3.99 KB
/
Send Gmail message for a new Salesforce Lead or a Slack message if email address is missing.yaml
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
$integration: 'http://ibm.com/appconnect/integration/v2/integrationFile'
integration:
type: trigger-action
trigger-interfaces:
trigger-interface-1:
type: event-trigger
triggers:
CREATED:
input-context:
data: Lead
assembly:
$ref: '#/integration/assemblies/assembly-1'
options: {}
connector-type: salesforce
action-interfaces:
action-interface-1:
type: api-action
business-object: mail
connector-type: gmail
actions:
CREATE: {}
action-interface-2:
type: api-action
business-object: message
connector-type: slack
actions:
CREATE: {}
assemblies:
assembly-1:
assembly:
execute:
- if:
name: If
input:
- variable: Trigger
$ref: '#/trigger/payload'
branch:
- condition:
'{{$Trigger.Email}}':
=: ''
execute:
- create-action:
name: Slack Create message
target:
$ref: '#/integration/action-interfaces/action-interface-2'
map:
mappings:
- channel:
template: C4GHPM484
- text:
template: >-
Missing the email id for lead
#{{$Trigger.Id}}. Have someone pull the lead
to follow-up with a phone call.
$map: 'http://ibm.com/appconnect/map/v1'
input:
- variable: Trigger
$ref: '#/trigger/payload'
map:
$map: 'http://ibm.com/appconnect/map/v1'
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: SlackCreatemessage
$ref: >-
#/block/If/node-output/Slack Create
message/response/payload
mappings: []
else:
execute:
- create-action:
name: Gmail Create message
target:
$ref: '#/integration/action-interfaces/action-interface-1'
map:
mappings:
- Body:
template: >-
{{$Trigger.FirstName}} recently you expressed
interest in our products. If there is anything
that our team can do to help you at
{{$Trigger.Company}}, please feel free to
contact our team at xxx-xxx-xxxx.
- Subject:
template: Regarding your registration
- To:
template: '{{$Trigger.Email}}'
$map: 'http://ibm.com/appconnect/map/v1'
input:
- variable: Trigger
$ref: '#/trigger/payload'
map:
$map: 'http://ibm.com/appconnect/map/v1'
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: GmailCreatemessage
$ref: >-
#/block/If/node-output/Gmail Create
message/response/payload
mappings: []
output-schema: {}
tags:
- incomplete
name: >-
Send Gmail message for a new Salesforce Lead or a Slack message if email
address is missing
models: {}