-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexampleResponses.js
More file actions
110 lines (103 loc) · 3.11 KB
/
exampleResponses.js
File metadata and controls
110 lines (103 loc) · 3.11 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
var express = require('express');
var app = express();
// Todoist
app.post('/todoist_on_complete', (req, res) => {
console.log('on_complete webook fired');
let body = {
response: [{
'body': [
{
type: 'html',
"text": `<h1>
<img src="https://cdn.glitch.com/5d7c2dda-808c-4712-95d2-17f5ff97a4e2%2Ftodoist-icon?1496726907652" width="30px" align="absmiddle">
Taco Mania Proposal</h1>`,
},
{
type: 'button',
text: 'Complete',
'url': 'https://localhost:3000/url'
},
{
type: 'button',
text: 'View In Todoist',
'url': 'https://localhost:3000/url'
},
{
type: 'html',
text: '<table border=0" style="clear: both"><tr><td><h4>NOTES</h4><p>Whatever I emailed goes here, along with additional notes I added in ToDoist. https://console.aws.com</p></td></tr></table>',
}
]
}]
};
return res.json(body);
});
// Salesforce
app.post('/salesforce_on_complete', (req, res) => {
console.log('on_complete webook fired');
let body = {
followup: {
'body': [
{
type: 'html',
text: `<h4 style="clear: both"><img src="https://cdn.glitch.com/5d7c2dda-808c-4712-95d2-17f5ff97a4e2%2Fsalesforce-icon.png?1496727853649" width="30px" align="absmiddle"> SALESFORCE FOLLOWUP</h4>`
},
{
type: 'html',
text: `<h1>
Bill S. Ted Esquire</h1>
<p>Co-Founcer <span style="color: #ccc">at</span> Wyld Stallyns</p>
`,
},
{
type: 'html',
text: `<h4 style="clear: both">CONTACT INFO</h4>`
},
{
type: 'button',
text: 'Mobile: 408-867-5309',
'url': 'tel:4088675309'
},
{
type: 'button',
text: 'Desk: 408-867-5308',
'url': 'tel:4088675309'
},
{
type: 'button',
text: 'Email: bill@wyldstallyns.com',
'url': 'mailto:bill@wyldstallyns.com'
},
{
type: 'html',
text: `<h4 style="clear: both">ACTIONS</h4>`
},
{
type: 'button',
text: 'View on Salesforce',
'url': 'https://localhost:3000/url'
},
{
type: 'button',
text: 'Complete Activity',
'url': 'mailto:action+49aj39a94@followupthen.com'
},
{
type: 'button',
text: 'Create Opportunity',
'url': 'mailto:action+49aj39a94@followupthen.com'
},
{
type: 'html',
text: `<table border=0" style="clear: both">
<tr><td>
<h4>ACTIVITY</h4>
<p>June 3rd, 1987. By Joe Schmoe – Interested in adhesives.</p>
<p>May 26th, 1987. By Jane Doe – Spoke with them at a Circle K. Preparing for a large project. Check back in a few days.</p>
</td></tr>
</table>`,
},
]
}
};
return res.json(body);
});