n8n-nodes-outplay 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +159 -0
- package/dist/credentials/OutplayApi.credentials.d.ts +13 -0
- package/dist/credentials/OutplayApi.credentials.js +69 -0
- package/dist/credentials/OutplayApi.credentials.js.map +1 -0
- package/dist/credentials/outplay-icon.svg +17 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/Outplay/Outplay.node.d.ts +5 -0
- package/dist/nodes/Outplay/Outplay.node.js +406 -0
- package/dist/nodes/Outplay/Outplay.node.js.map +1 -0
- package/dist/nodes/Outplay/Outplay.node.json +19 -0
- package/dist/nodes/Outplay/OutplayTrigger.node.d.ts +12 -0
- package/dist/nodes/Outplay/OutplayTrigger.node.js +215 -0
- package/dist/nodes/Outplay/OutplayTrigger.node.js.map +1 -0
- package/dist/nodes/Outplay/OutplayTrigger.node.json +19 -0
- package/dist/nodes/Outplay/outplay-icon.svg +17 -0
- package/package.json +67 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 OutplayHQ
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# n8n-nodes-outplay
|
|
2
|
+
|
|
3
|
+
This is an n8n community node. It lets you use Outplay in your n8n workflows.
|
|
4
|
+
|
|
5
|
+
Outplay is a sales engagement platform that helps sales teams automate their outreach and manage prospects effectively.
|
|
6
|
+
|
|
7
|
+
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/sustainable-use-license/) workflow automation platform.
|
|
8
|
+
|
|
9
|
+
[Installation](#installation)
|
|
10
|
+
[Operations](#operations)
|
|
11
|
+
[Credentials](#credentials)
|
|
12
|
+
[Usage](#usage)
|
|
13
|
+
[Compatibility](#compatibility)
|
|
14
|
+
[Resources](#resources)
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
|
19
|
+
|
|
20
|
+
### Quick Install
|
|
21
|
+
|
|
22
|
+
In your n8n instance, navigate to **Settings > Community Nodes** and search for `n8n-nodes-outplay`, then click install.
|
|
23
|
+
|
|
24
|
+
Alternatively, install via npm in your n8n installation:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install n8n-nodes-outplay
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Operations
|
|
31
|
+
|
|
32
|
+
This package provides two nodes for interacting with Outplay:
|
|
33
|
+
|
|
34
|
+
### 1. Outplay Node (Actions)
|
|
35
|
+
|
|
36
|
+
The Outplay node provides the following operations for managing prospects:
|
|
37
|
+
|
|
38
|
+
#### Prospect Resource
|
|
39
|
+
|
|
40
|
+
- **Save Prospect** - Create or update a prospect in Outplay
|
|
41
|
+
- Required fields: Email, First Name, Last Name
|
|
42
|
+
- Optional fields: Company, Designation, Phone, LinkedIn, Twitter, Facebook, City, State, Country, Timezone, Sequence Identifier
|
|
43
|
+
- Support for custom fields and tags
|
|
44
|
+
- Use this to add new prospects or update existing ones based on email
|
|
45
|
+
|
|
46
|
+
- **Get Prospect** - Retrieve prospect details by ID
|
|
47
|
+
- Required field: Prospect ID
|
|
48
|
+
- Returns complete prospect information including all custom fields and tags
|
|
49
|
+
|
|
50
|
+
### 2. Outplay Trigger Node (Triggers)
|
|
51
|
+
|
|
52
|
+
The Outplay Trigger node listens for real-time events from Outplay via webhooks:
|
|
53
|
+
|
|
54
|
+
- **Mail Received** (Event ID: 4) - Triggers when an email is received from a prospect
|
|
55
|
+
- **Prospect Created** (Event ID: 1) - Triggers when a new prospect is created in Outplay
|
|
56
|
+
- **Prospect Updated** (Event ID: 3) - Triggers when a prospect's information is updated
|
|
57
|
+
- **Prospect Opt-Out** (Event ID: 2) - Triggers when a prospect opts out of communications
|
|
58
|
+
|
|
59
|
+
## Credentials
|
|
60
|
+
|
|
61
|
+
To use this node, you need an Outplay account with API access.
|
|
62
|
+
|
|
63
|
+
### Prerequisites
|
|
64
|
+
|
|
65
|
+
1. Sign up for an [Outplay account](https://www.outplayhq.com/)
|
|
66
|
+
2. Navigate to **Settings > API Settings** in your Outplay dashboard
|
|
67
|
+
3. Generate your API credentials (Client ID and Client Secret)
|
|
68
|
+
|
|
69
|
+
### Authentication Setup
|
|
70
|
+
|
|
71
|
+
This node uses API Key authentication with the following required fields:
|
|
72
|
+
|
|
73
|
+
- **Location**: Your Outplay instance location (e.g., "US", "EU", "DEV")
|
|
74
|
+
- This determines the API endpoint: `https://{location}-api.outplayhq.com/api/v1`
|
|
75
|
+
- **Client ID**: Your Outplay API Client ID
|
|
76
|
+
- **Client Secret**: Your Outplay API Client Secret
|
|
77
|
+
|
|
78
|
+
The credentials are authenticated using custom headers (`X-CLIENT-SECRET`) and query parameters (`client_id`).
|
|
79
|
+
|
|
80
|
+
### Setting Up Credentials in n8n
|
|
81
|
+
|
|
82
|
+
1. In your n8n workflow, click on the Outplay node
|
|
83
|
+
2. Click on the **Credential to connect with** dropdown
|
|
84
|
+
3. Click **Create New Credential**
|
|
85
|
+
4. Enter your Outplay API credentials:
|
|
86
|
+
- Location (e.g., "US", "EU")
|
|
87
|
+
- Client ID
|
|
88
|
+
- Client Secret
|
|
89
|
+
5. Click **Save**
|
|
90
|
+
|
|
91
|
+
## Usage
|
|
92
|
+
|
|
93
|
+
### Example Workflow: Save a New Prospect
|
|
94
|
+
|
|
95
|
+
1. Add an **Outplay** node to your workflow
|
|
96
|
+
2. Select **Prospect** as the resource
|
|
97
|
+
3. Select **Save Prospect** as the operation
|
|
98
|
+
4. Fill in the required fields:
|
|
99
|
+
- Email: `john.doe@example.com`
|
|
100
|
+
- First Name: `John`
|
|
101
|
+
- Last Name: `Doe`
|
|
102
|
+
5. Optionally add additional fields like Company, Designation, Phone, etc.
|
|
103
|
+
6. Add tags or custom fields as needed
|
|
104
|
+
7. Execute the node to create the prospect in Outplay
|
|
105
|
+
|
|
106
|
+
### Example Workflow: Listen for New Prospects
|
|
107
|
+
|
|
108
|
+
1. Add an **Outplay Trigger** node to your workflow
|
|
109
|
+
2. Select **Prospect Created** as the event
|
|
110
|
+
3. The trigger will automatically register a webhook with Outplay
|
|
111
|
+
4. When a new prospect is created in Outplay, the workflow will be triggered
|
|
112
|
+
5. Use subsequent nodes to process the prospect data (e.g., send notifications, update CRM, etc.)
|
|
113
|
+
|
|
114
|
+
### Example Workflow: Get Prospect Details
|
|
115
|
+
|
|
116
|
+
1. Add an **Outplay** node to your workflow
|
|
117
|
+
2. Select **Prospect** as the resource
|
|
118
|
+
3. Select **Get Prospect** as the operation
|
|
119
|
+
4. Enter the Prospect ID
|
|
120
|
+
5. Execute the node to retrieve the prospect's complete information
|
|
121
|
+
|
|
122
|
+
## Compatibility
|
|
123
|
+
|
|
124
|
+
- **Minimum n8n version**: 1.0.0
|
|
125
|
+
- **Tested with n8n version**: 1.119.1
|
|
126
|
+
- **n8n API version**: 1
|
|
127
|
+
|
|
128
|
+
## Development
|
|
129
|
+
|
|
130
|
+
This node was built using the official n8n-node-dev tool and follows all n8n community node guidelines:
|
|
131
|
+
|
|
132
|
+
- ✅ No external dependencies
|
|
133
|
+
- ✅ MIT License
|
|
134
|
+
- ✅ TypeScript implementation
|
|
135
|
+
- ✅ Passes n8n linter (`npm run lint`)
|
|
136
|
+
- ✅ English language only
|
|
137
|
+
- ✅ No environment variable or file system access
|
|
138
|
+
- ✅ Proper error handling and validation
|
|
139
|
+
|
|
140
|
+
## Resources
|
|
141
|
+
|
|
142
|
+
* [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
|
|
143
|
+
* [Outplay API Documentation](https://support.outplay.ai/#/article/3749)
|
|
144
|
+
* [Outplay Website](https://www.outplayhq.com/)
|
|
145
|
+
* [GitHub Repository](https://github.com/outplay/n8n-nodes-outplay)
|
|
146
|
+
|
|
147
|
+
## License
|
|
148
|
+
|
|
149
|
+
[MIT](LICENSE.md)
|
|
150
|
+
|
|
151
|
+
## Support
|
|
152
|
+
|
|
153
|
+
For issues or questions:
|
|
154
|
+
- Create an issue on [GitHub](https://github.com/outplay-hq/n8n-nodes-outplay/issues)
|
|
155
|
+
- Contact Outplay support at [support.outplay.ai](https://support.outplay.ai/#/)
|
|
156
|
+
|
|
157
|
+
## Version History
|
|
158
|
+
|
|
159
|
+
See [CHANGELOG.md](CHANGELOG.md) for version history and updates.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class OutplayApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
readonly icon: {
|
|
7
|
+
readonly light: "file:outplay-icon.svg";
|
|
8
|
+
readonly dark: "file:outplay-icon.svg";
|
|
9
|
+
};
|
|
10
|
+
properties: INodeProperties[];
|
|
11
|
+
authenticate: IAuthenticateGeneric;
|
|
12
|
+
test: ICredentialTestRequest;
|
|
13
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OutplayApi = void 0;
|
|
4
|
+
class OutplayApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'outplayApi';
|
|
7
|
+
this.displayName = 'Outplay API';
|
|
8
|
+
this.documentationUrl = 'https://support.outplay.ai/#/article/8216';
|
|
9
|
+
this.icon = {
|
|
10
|
+
light: 'file:outplay-icon.svg',
|
|
11
|
+
dark: 'file:outplay-icon.svg',
|
|
12
|
+
};
|
|
13
|
+
this.properties = [
|
|
14
|
+
{
|
|
15
|
+
displayName: '⚠️ Before creating: Check if you already have Outplay credentials saved. Avoid creating duplicates with the same Client ID.',
|
|
16
|
+
name: 'notice',
|
|
17
|
+
type: 'notice',
|
|
18
|
+
default: '',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Location',
|
|
22
|
+
name: 'location',
|
|
23
|
+
type: 'string',
|
|
24
|
+
default: '',
|
|
25
|
+
placeholder: 'US',
|
|
26
|
+
required: true,
|
|
27
|
+
description: 'Your Outplay instance location',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
displayName: 'Client ID',
|
|
31
|
+
name: 'clientId',
|
|
32
|
+
type: 'string',
|
|
33
|
+
default: '',
|
|
34
|
+
required: true,
|
|
35
|
+
placeholder: 'e.g. abc123xyz',
|
|
36
|
+
description: 'Your Outplay Client ID from API settings. Note: Use a unique Credential Name above to distinguish between multiple accounts.',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
displayName: 'Client Secret',
|
|
40
|
+
name: 'clientSecret',
|
|
41
|
+
type: 'string',
|
|
42
|
+
typeOptions: { password: true },
|
|
43
|
+
default: '',
|
|
44
|
+
required: true,
|
|
45
|
+
description: 'Your Outplay Client Secret from API settings.',
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
this.authenticate = {
|
|
49
|
+
type: 'generic',
|
|
50
|
+
properties: {
|
|
51
|
+
headers: {
|
|
52
|
+
'X-CLIENT-SECRET': '={{$credentials.clientSecret}}',
|
|
53
|
+
},
|
|
54
|
+
qs: {
|
|
55
|
+
client_id: '={{$credentials.clientId}}',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
this.test = {
|
|
60
|
+
request: {
|
|
61
|
+
baseURL: '={{$credentials.location ? "https://" + $credentials.location.toLowerCase() + "-api.outplayhq.com/api/v1" : "https://dev-api.outplayhq.com/api/v1"}}',
|
|
62
|
+
url: '/account/Ping',
|
|
63
|
+
method: 'GET',
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.OutplayApi = OutplayApi;
|
|
69
|
+
//# sourceMappingURL=OutplayApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutplayApi.credentials.js","sourceRoot":"","sources":["../../credentials/OutplayApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,UAAU;IAAvB;QACC,SAAI,GAAG,YAAY,CAAC;QACpB,gBAAW,GAAG,aAAa,CAAC;QAC5B,qBAAgB,GAAG,2CAA2C,CAAC;QACtD,SAAI,GAAG;YACf,KAAK,EAAE,uBAAuB;YAC9B,IAAI,EAAE,uBAAuB;SACpB,CAAC;QACX,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,6HAA6H;gBAC1I,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,IAAI;gBACjB,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,gCAAgC;aAC7C;YACD;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,gBAAgB;gBAC7B,WAAW,EAAE,8HAA8H;aAC3I;YACD;gBACC,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,+CAA+C;aAC5D;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,iBAAiB,EAAE,gCAAgC;iBACnD;gBACD,EAAE,EAAE;oBACH,SAAS,EAAE,4BAA4B;iBACvC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,sJAAsJ;gBAC/J,GAAG,EAAE,eAAe;gBACpB,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AA/DD,gCA+DC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="23px" height="23px" viewBox="0 0 23 23" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<!-- Generator: Sketch 54.1 (76490) - https://sketchapp.com -->
|
|
4
|
+
<title>outplay-icon</title>
|
|
5
|
+
<desc>Created with Sketch.</desc>
|
|
6
|
+
<defs>
|
|
7
|
+
<linearGradient x1="27.3289363%" y1="38.3688714%" x2="100%" y2="100%" id="linearGradient-1">
|
|
8
|
+
<stop stop-color="#FC4C82" offset="0%"></stop>
|
|
9
|
+
<stop stop-color="#FB776C" offset="100%"></stop>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
</defs>
|
|
12
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
13
|
+
<g id="outplay-icon" fill="url(#linearGradient-1)" fill-rule="nonzero">
|
|
14
|
+
<path d="M21.3846528,0.145101202 L0.561131974,12.1547976 C-0.252041117,12.6218913 -0.148709729,13.7536951 0.659970692,14.0950328 L5.43567785,16.098146 L18.3431159,4.72621203 C18.5902127,4.50613906 18.9406409,4.84298544 18.7294855,5.09898869 L7.90664582,18.2809105 L7.90664582,21.8963951 C7.90664582,22.9563384 9.18705649,23.3740279 9.81603015,22.6060181 L12.6688749,19.1342547 L18.2667405,21.4787056 C18.9046995,21.7481826 19.6325119,21.3484583 19.7493213,20.6612917 L22.984043,1.25893992 C23.1367938,0.351700318 22.1618845,-0.30402731 21.3846528,0.145101202 Z" id="Path"></path>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Outplay = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
class Outplay {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.description = {
|
|
8
|
+
displayName: 'Outplay',
|
|
9
|
+
name: 'outplay',
|
|
10
|
+
icon: 'file:outplay-icon.svg',
|
|
11
|
+
group: ['transform'],
|
|
12
|
+
version: 1,
|
|
13
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
14
|
+
description: 'Interact with Outplay API',
|
|
15
|
+
defaults: {
|
|
16
|
+
name: 'Outplay',
|
|
17
|
+
},
|
|
18
|
+
inputs: ['main'],
|
|
19
|
+
outputs: ['main'],
|
|
20
|
+
credentials: [
|
|
21
|
+
{
|
|
22
|
+
name: 'outplayApi',
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
requestDefaults: {
|
|
27
|
+
baseURL: 'https://dev-api.outplayhq.com/api/v1',
|
|
28
|
+
headers: {
|
|
29
|
+
Accept: 'application/json',
|
|
30
|
+
'Content-Type': 'application/json',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
properties: [
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Resource',
|
|
36
|
+
name: 'resource',
|
|
37
|
+
type: 'options',
|
|
38
|
+
noDataExpression: true,
|
|
39
|
+
options: [
|
|
40
|
+
{
|
|
41
|
+
name: 'Prospect',
|
|
42
|
+
value: 'prospect',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
default: 'prospect',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
displayName: 'Operation',
|
|
49
|
+
name: 'operation',
|
|
50
|
+
type: 'options',
|
|
51
|
+
noDataExpression: true,
|
|
52
|
+
displayOptions: {
|
|
53
|
+
show: {
|
|
54
|
+
resource: ['prospect'],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
options: [
|
|
58
|
+
{
|
|
59
|
+
name: 'Save Prospect',
|
|
60
|
+
value: 'save',
|
|
61
|
+
description: 'Save a new prospect',
|
|
62
|
+
action: 'Save a prospect',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Get Prospect',
|
|
66
|
+
value: 'get',
|
|
67
|
+
description: 'Get a prospect by ID',
|
|
68
|
+
action: 'Get a prospect',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
default: 'save',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: 'Prospect ID',
|
|
75
|
+
name: 'prospectId',
|
|
76
|
+
type: 'string',
|
|
77
|
+
required: true,
|
|
78
|
+
displayOptions: {
|
|
79
|
+
show: {
|
|
80
|
+
resource: ['prospect'],
|
|
81
|
+
operation: ['get'],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
default: '',
|
|
85
|
+
placeholder: 'e.g. 12345',
|
|
86
|
+
description: 'The ID of the prospect to retrieve',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
displayName: 'Simplify',
|
|
90
|
+
name: 'simplify',
|
|
91
|
+
type: 'boolean',
|
|
92
|
+
displayOptions: {
|
|
93
|
+
show: {
|
|
94
|
+
resource: ['prospect'],
|
|
95
|
+
operation: ['get', 'save'],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
default: true,
|
|
99
|
+
description: 'Whether to return a simplified version of the response instead of the raw data',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
displayName: 'Email',
|
|
103
|
+
name: 'emailid',
|
|
104
|
+
type: 'string',
|
|
105
|
+
placeholder: 'e.g. nathan@n8n.io',
|
|
106
|
+
required: true,
|
|
107
|
+
displayOptions: {
|
|
108
|
+
show: {
|
|
109
|
+
resource: ['prospect'],
|
|
110
|
+
operation: ['save'],
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
default: '',
|
|
114
|
+
description: 'Email address (must be unique)',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
displayName: 'First Name',
|
|
118
|
+
name: 'firstname',
|
|
119
|
+
type: 'string',
|
|
120
|
+
displayOptions: {
|
|
121
|
+
show: {
|
|
122
|
+
resource: ['prospect'],
|
|
123
|
+
operation: ['save'],
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
default: '',
|
|
127
|
+
description: 'The prospect\'s first name',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
displayName: 'Last Name',
|
|
131
|
+
name: 'lastname',
|
|
132
|
+
type: 'string',
|
|
133
|
+
displayOptions: {
|
|
134
|
+
show: {
|
|
135
|
+
resource: ['prospect'],
|
|
136
|
+
operation: ['save'],
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
default: '',
|
|
140
|
+
description: 'The prospect\'s last name',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
displayName: 'Additional Fields',
|
|
144
|
+
name: 'additionalFields',
|
|
145
|
+
type: 'collection',
|
|
146
|
+
placeholder: 'Add Field',
|
|
147
|
+
default: {},
|
|
148
|
+
displayOptions: {
|
|
149
|
+
show: {
|
|
150
|
+
resource: ['prospect'],
|
|
151
|
+
operation: ['save'],
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
options: [
|
|
155
|
+
{
|
|
156
|
+
displayName: 'City',
|
|
157
|
+
name: 'city',
|
|
158
|
+
type: 'string',
|
|
159
|
+
default: '',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
displayName: 'Company',
|
|
163
|
+
name: 'company',
|
|
164
|
+
type: 'string',
|
|
165
|
+
default: '',
|
|
166
|
+
placeholder: 'e.g. Acme Corp',
|
|
167
|
+
description: 'Company or organization name',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
displayName: 'Country',
|
|
171
|
+
name: 'country',
|
|
172
|
+
type: 'string',
|
|
173
|
+
default: '',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
displayName: 'Designation',
|
|
177
|
+
name: 'designation',
|
|
178
|
+
type: 'string',
|
|
179
|
+
default: '',
|
|
180
|
+
placeholder: 'e.g. Sales Manager',
|
|
181
|
+
description: 'Job title or designation',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
displayName: 'Facebook',
|
|
185
|
+
name: 'facebook',
|
|
186
|
+
type: 'string',
|
|
187
|
+
default: '',
|
|
188
|
+
placeholder: 'e.g. https://facebook.com/username',
|
|
189
|
+
description: 'Facebook profile URL',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
displayName: 'LinkedIn',
|
|
193
|
+
name: 'linkedin',
|
|
194
|
+
type: 'string',
|
|
195
|
+
default: '',
|
|
196
|
+
placeholder: 'e.g. https://linkedin.com/in/username',
|
|
197
|
+
description: 'LinkedIn profile URL',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
displayName: 'Phone',
|
|
201
|
+
name: 'phone',
|
|
202
|
+
type: 'string',
|
|
203
|
+
default: '',
|
|
204
|
+
placeholder: 'e.g. +1234567890',
|
|
205
|
+
description: 'Phone number',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
displayName: 'Sequence Identifier',
|
|
209
|
+
name: 'sequenceidentifier',
|
|
210
|
+
type: 'string',
|
|
211
|
+
default: '',
|
|
212
|
+
placeholder: 'e.g. my-sequence-ID',
|
|
213
|
+
description: 'Identifier for the sequence to add the prospect to',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
displayName: 'State',
|
|
217
|
+
name: 'state',
|
|
218
|
+
type: 'string',
|
|
219
|
+
default: '',
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
displayName: 'Timezone',
|
|
223
|
+
name: 'timezone',
|
|
224
|
+
type: 'string',
|
|
225
|
+
default: '',
|
|
226
|
+
placeholder: 'e.g. America/Los_Angeles',
|
|
227
|
+
description: 'Timezone in IANA format (e.g., America/Los_Angeles)',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
displayName: 'Twitter',
|
|
231
|
+
name: 'twitter',
|
|
232
|
+
type: 'string',
|
|
233
|
+
default: '',
|
|
234
|
+
placeholder: 'e.g. @username',
|
|
235
|
+
description: 'Twitter handle',
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
displayName: 'Tags',
|
|
241
|
+
name: 'tags',
|
|
242
|
+
type: 'fixedCollection',
|
|
243
|
+
typeOptions: {
|
|
244
|
+
multipleValues: true,
|
|
245
|
+
},
|
|
246
|
+
placeholder: 'Add Tag',
|
|
247
|
+
default: {},
|
|
248
|
+
displayOptions: {
|
|
249
|
+
show: {
|
|
250
|
+
resource: ['prospect'],
|
|
251
|
+
operation: ['save'],
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
options: [
|
|
255
|
+
{
|
|
256
|
+
name: 'tag',
|
|
257
|
+
displayName: 'Tag',
|
|
258
|
+
values: [
|
|
259
|
+
{
|
|
260
|
+
displayName: 'Tag Name',
|
|
261
|
+
name: 'value',
|
|
262
|
+
type: 'string',
|
|
263
|
+
default: '',
|
|
264
|
+
placeholder: 'e.g. vip',
|
|
265
|
+
description: 'Tag to assign to the prospect',
|
|
266
|
+
},
|
|
267
|
+
],
|
|
268
|
+
},
|
|
269
|
+
],
|
|
270
|
+
description: 'Tags to assign to the prospect',
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
displayName: 'Custom Fields',
|
|
274
|
+
name: 'customFields',
|
|
275
|
+
type: 'fixedCollection',
|
|
276
|
+
typeOptions: {
|
|
277
|
+
multipleValues: true,
|
|
278
|
+
},
|
|
279
|
+
placeholder: 'Add Custom Field',
|
|
280
|
+
default: {},
|
|
281
|
+
displayOptions: {
|
|
282
|
+
show: {
|
|
283
|
+
resource: ['prospect'],
|
|
284
|
+
operation: ['save'],
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
options: [
|
|
288
|
+
{
|
|
289
|
+
name: 'field',
|
|
290
|
+
displayName: 'Field',
|
|
291
|
+
values: [
|
|
292
|
+
{
|
|
293
|
+
displayName: 'Field Name',
|
|
294
|
+
name: 'name',
|
|
295
|
+
type: 'string',
|
|
296
|
+
default: '',
|
|
297
|
+
description: 'Name of the custom field',
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
displayName: 'Field Value',
|
|
301
|
+
name: 'value',
|
|
302
|
+
type: 'string',
|
|
303
|
+
default: '',
|
|
304
|
+
description: 'Value of the custom field',
|
|
305
|
+
},
|
|
306
|
+
],
|
|
307
|
+
},
|
|
308
|
+
],
|
|
309
|
+
description: 'Additional custom fields as key-value pairs',
|
|
310
|
+
},
|
|
311
|
+
],
|
|
312
|
+
usableAsTool: true,
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
async execute() {
|
|
316
|
+
const items = this.getInputData();
|
|
317
|
+
const returnData = [];
|
|
318
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
319
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
320
|
+
const credentials = await this.getCredentials('outplayApi');
|
|
321
|
+
const location = credentials.location.toLowerCase();
|
|
322
|
+
const baseURL = `https://${location}-api.outplayhq.com/api/v1`;
|
|
323
|
+
for (let i = 0; i < items.length; i++) {
|
|
324
|
+
try {
|
|
325
|
+
if (resource === 'prospect') {
|
|
326
|
+
if (operation === 'save') {
|
|
327
|
+
const emailid = this.getNodeParameter('emailid', i);
|
|
328
|
+
const firstname = this.getNodeParameter('firstname', i);
|
|
329
|
+
const lastname = this.getNodeParameter('lastname', i);
|
|
330
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
331
|
+
const tagsCollection = this.getNodeParameter('tags', i);
|
|
332
|
+
const customFields = this.getNodeParameter('customFields', i);
|
|
333
|
+
const body = {
|
|
334
|
+
emailid,
|
|
335
|
+
firstname,
|
|
336
|
+
lastname,
|
|
337
|
+
...additionalFields,
|
|
338
|
+
};
|
|
339
|
+
if (tagsCollection && tagsCollection.tag) {
|
|
340
|
+
const tagArray = tagsCollection.tag;
|
|
341
|
+
const tags = [];
|
|
342
|
+
for (const tag of tagArray) {
|
|
343
|
+
if (tag.value) {
|
|
344
|
+
tags.push(tag.value);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
if (tags.length > 0) {
|
|
348
|
+
body.tags = tags;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
if (customFields && customFields.field) {
|
|
352
|
+
const fields = {};
|
|
353
|
+
const fieldArray = customFields.field;
|
|
354
|
+
for (const field of fieldArray) {
|
|
355
|
+
if (field.name && field.value) {
|
|
356
|
+
fields[field.name] = field.value;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
if (Object.keys(fields).length > 0) {
|
|
360
|
+
body.fields = fields;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
const responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'outplayApi', {
|
|
364
|
+
method: 'POST',
|
|
365
|
+
baseURL: baseURL,
|
|
366
|
+
url: '/prospect/add',
|
|
367
|
+
body,
|
|
368
|
+
json: true,
|
|
369
|
+
});
|
|
370
|
+
returnData.push(responseData);
|
|
371
|
+
}
|
|
372
|
+
else if (operation === 'get') {
|
|
373
|
+
const prospectId = this.getNodeParameter('prospectId', i);
|
|
374
|
+
const responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'outplayApi', {
|
|
375
|
+
method: 'GET',
|
|
376
|
+
baseURL: baseURL,
|
|
377
|
+
url: `/prospect/${prospectId}`,
|
|
378
|
+
json: true,
|
|
379
|
+
});
|
|
380
|
+
returnData.push(responseData);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
catch (error) {
|
|
385
|
+
if (this.continueOnFail()) {
|
|
386
|
+
const errorData = error instanceof Error ? error.message : 'An issue occurred while processing the request';
|
|
387
|
+
returnData.push({
|
|
388
|
+
json: {
|
|
389
|
+
error: errorData,
|
|
390
|
+
item: i,
|
|
391
|
+
operation,
|
|
392
|
+
resource
|
|
393
|
+
},
|
|
394
|
+
pairedItem: { item: i }
|
|
395
|
+
});
|
|
396
|
+
continue;
|
|
397
|
+
}
|
|
398
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown issue';
|
|
399
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to ${operation} ${resource} [item ${i}]: ${errorMessage}`, { itemIndex: i });
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
return [this.helpers.returnJsonArray(returnData)];
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
exports.Outplay = Outplay;
|
|
406
|
+
//# sourceMappingURL=Outplay.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Outplay.node.js","sourceRoot":"","sources":["../../../nodes/Outplay/Outplay.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAEtB,MAAa,OAAO;IAApB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,uBAAuB;YAC7B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE;gBACT,IAAI,EAAE,SAAS;aACf;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,YAAY;oBAClB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,OAAO,EAAE,sCAAsC;gBAC/C,OAAO,EAAE;oBACR,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBAClC;aACD;YACD,UAAU,EAAE;gBAEX;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,UAAU;4BAChB,KAAK,EAAE,UAAU;yBACjB;qBACD;oBACD,OAAO,EAAE,UAAU;iBACnB;gBAGD;oBACC,WAAW,EAAE,WAAW;oBACxB,IAAI,EA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AE;qBACD,CAAC,CAAC;oBACzB,SAAS;gBACV,CAAC;gBAED,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;gBAC9E,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,aAAa,SAAS,IAAI,QAAQ,UAAU,CAAC,MAAM,YAAY,EAAE,EACjE,EAAE,SAAS,EAAE,CAAC,EAAE,CAChB,CAAC;YACH,CAAC;QACF,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC;IACnD,CAAC;CACD;AApbD,0BAobC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-outplay.outplay",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Sales & CRM"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"primaryDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://docs.outplayhq.com/"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"credentialDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://docs.outplayhq.com/authentication"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"alias": ["sales", "crm", "outreach", "prospect", "email campaign", "sales engagement"]
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IHookFunctions, IWebhookFunctions, INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow';
|
|
2
|
+
export declare class OutplayTrigger implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
webhookMethods: {
|
|
5
|
+
default: {
|
|
6
|
+
checkExists(this: IHookFunctions): Promise<boolean>;
|
|
7
|
+
create(this: IHookFunctions): Promise<boolean>;
|
|
8
|
+
delete(this: IHookFunctions): Promise<boolean>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OutplayTrigger = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
class OutplayTrigger {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.description = {
|
|
8
|
+
displayName: 'Outplay Webhook Trigger',
|
|
9
|
+
name: 'outplayTrigger',
|
|
10
|
+
icon: 'file:outplay-icon.svg',
|
|
11
|
+
group: ['trigger'],
|
|
12
|
+
version: 1,
|
|
13
|
+
subtitle: '={{$parameter["event"]}}',
|
|
14
|
+
description: 'Starts the workflow when Outplay events occur',
|
|
15
|
+
defaults: {
|
|
16
|
+
name: 'Outplay Webhook Trigger',
|
|
17
|
+
},
|
|
18
|
+
inputs: [],
|
|
19
|
+
outputs: ['main'],
|
|
20
|
+
credentials: [
|
|
21
|
+
{
|
|
22
|
+
name: 'outplayApi',
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
webhooks: [
|
|
27
|
+
{
|
|
28
|
+
name: 'default',
|
|
29
|
+
httpMethod: 'POST',
|
|
30
|
+
responseMode: 'onReceived',
|
|
31
|
+
path: 'webhook',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
properties: [
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Event',
|
|
37
|
+
name: 'event',
|
|
38
|
+
type: 'options',
|
|
39
|
+
noDataExpression: true,
|
|
40
|
+
options: [
|
|
41
|
+
{
|
|
42
|
+
name: 'Prospect Created',
|
|
43
|
+
value: '1',
|
|
44
|
+
description: 'Trigger when a new prospect is created in Outplay',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Prospect Opt-Out',
|
|
48
|
+
value: '2',
|
|
49
|
+
description: 'Trigger when a prospect opts out from Outplay',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'Prospect Updated',
|
|
53
|
+
value: '3',
|
|
54
|
+
description: 'Trigger when a prospect is updated in Outplay',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'Mail Received',
|
|
58
|
+
value: '4',
|
|
59
|
+
description: 'Trigger when receiving a mail in Outplay from the prospect',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
default: '1',
|
|
63
|
+
required: true,
|
|
64
|
+
description: 'The event to listen to',
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
usableAsTool: true,
|
|
68
|
+
};
|
|
69
|
+
this.webhookMethods = {
|
|
70
|
+
default: {
|
|
71
|
+
async checkExists() {
|
|
72
|
+
const webhookData = this.getWorkflowStaticData('node');
|
|
73
|
+
if (webhookData.webhookId === undefined) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
const currentEvent = this.getNodeParameter('event');
|
|
77
|
+
const storedEvent = webhookData.webhookEvent;
|
|
78
|
+
if (storedEvent && currentEvent !== storedEvent) {
|
|
79
|
+
const oldWebhookUrl = webhookData.webhookUrl || this.getNodeWebhookUrl('default');
|
|
80
|
+
const credentials = await this.getCredentials('outplayApi');
|
|
81
|
+
const location = credentials.location.toLowerCase();
|
|
82
|
+
const baseURL = `https://${location}-api.outplayhq.com/api/v1`;
|
|
83
|
+
try {
|
|
84
|
+
await this.helpers.httpRequestWithAuthentication.call(this, 'outplayApi', {
|
|
85
|
+
method: 'POST',
|
|
86
|
+
baseURL: baseURL,
|
|
87
|
+
url: '/account/UnsubscribeWebHook',
|
|
88
|
+
qs: {
|
|
89
|
+
target_url: oldWebhookUrl,
|
|
90
|
+
event: storedEvent,
|
|
91
|
+
},
|
|
92
|
+
headers: {
|
|
93
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
99
|
+
const statusCode = error instanceof Error ? error.statusCode : undefined;
|
|
100
|
+
console.error('❌ Failed to unsubscribe old event');
|
|
101
|
+
console.error('Status:', statusCode, 'Error:', errorMessage);
|
|
102
|
+
}
|
|
103
|
+
delete webhookData.webhookId;
|
|
104
|
+
delete webhookData.webhookEvent;
|
|
105
|
+
delete webhookData.webhookUrl;
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
},
|
|
110
|
+
async create() {
|
|
111
|
+
const webhookUrl = this.getNodeWebhookUrl('default');
|
|
112
|
+
const event = this.getNodeParameter('event');
|
|
113
|
+
const credentials = await this.getCredentials('outplayApi');
|
|
114
|
+
const location = credentials.location.toLowerCase();
|
|
115
|
+
const baseURL = `https://${location}-api.outplayhq.com/api/v1`;
|
|
116
|
+
const body = {
|
|
117
|
+
target_url: webhookUrl,
|
|
118
|
+
event: event,
|
|
119
|
+
};
|
|
120
|
+
const webhookData = this.getWorkflowStaticData('node');
|
|
121
|
+
try {
|
|
122
|
+
const responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'outplayApi', {
|
|
123
|
+
method: 'POST',
|
|
124
|
+
baseURL: baseURL,
|
|
125
|
+
url: '/account/SubscribeWebHook',
|
|
126
|
+
body,
|
|
127
|
+
headers: {
|
|
128
|
+
'User-Agent': 'n8n',
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
webhookData.webhookId = responseData.id || `webhook_${event}_${Date.now()}`;
|
|
132
|
+
webhookData.webhookEvent = event;
|
|
133
|
+
webhookData.webhookUrl = webhookUrl;
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
138
|
+
const statusCode = error instanceof Error ? error.statusCode : undefined;
|
|
139
|
+
console.error('❌ Webhook subscription FAILED');
|
|
140
|
+
console.error('Status:', statusCode);
|
|
141
|
+
console.error('Error:', errorMessage);
|
|
142
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to subscribe webhook in Outplay (Status: ${statusCode}): ${errorMessage}`);
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
async delete() {
|
|
146
|
+
var _a;
|
|
147
|
+
const webhookData = this.getWorkflowStaticData('node');
|
|
148
|
+
const webhookUrl = webhookData.webhookUrl || this.getNodeWebhookUrl('default');
|
|
149
|
+
const event = webhookData.webhookEvent || this.getNodeParameter('event');
|
|
150
|
+
if (!webhookUrl) {
|
|
151
|
+
console.log('No webhook to unsubscribe');
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
const credentials = await this.getCredentials('outplayApi');
|
|
155
|
+
const location = credentials.location.toLowerCase();
|
|
156
|
+
const baseURL = `https://${location}-api.outplayhq.com/api/v1`;
|
|
157
|
+
try {
|
|
158
|
+
await this.helpers.httpRequestWithAuthentication.call(this, 'outplayApi', {
|
|
159
|
+
method: 'POST',
|
|
160
|
+
baseURL: baseURL,
|
|
161
|
+
url: '/account/UnsubscribeWebHook',
|
|
162
|
+
qs: {
|
|
163
|
+
target_url: webhookUrl,
|
|
164
|
+
event: event,
|
|
165
|
+
},
|
|
166
|
+
headers: {
|
|
167
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
delete webhookData.webhookId;
|
|
171
|
+
delete webhookData.webhookEvent;
|
|
172
|
+
delete webhookData.webhookUrl;
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
177
|
+
const statusCode = error instanceof Error ? error.statusCode : undefined;
|
|
178
|
+
const responseBody = error instanceof Error ? (_a = error.response) === null || _a === void 0 ? void 0 : _a.body : undefined;
|
|
179
|
+
console.error('\n❌ Webhook unsubscription FAILED');
|
|
180
|
+
console.error('Status:', statusCode);
|
|
181
|
+
console.error('Error:', errorMessage);
|
|
182
|
+
console.error('Response:', responseBody);
|
|
183
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to unsubscribe webhook in Outplay (Status: ${statusCode}): ${errorMessage}`);
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
async webhook() {
|
|
190
|
+
const bodyData = this.getBodyData();
|
|
191
|
+
const event = this.getNodeParameter('event');
|
|
192
|
+
if (bodyData.ping || bodyData.test) {
|
|
193
|
+
console.log('⚠️ Ping/test webhook received, ignoring');
|
|
194
|
+
return {
|
|
195
|
+
webhookResponse: 'OK',
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
if (bodyData.event && String(bodyData.event) !== event) {
|
|
199
|
+
return {
|
|
200
|
+
webhookResponse: 'Ignored - wrong event type',
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
const returnData = [];
|
|
204
|
+
returnData.push({
|
|
205
|
+
body: bodyData,
|
|
206
|
+
headers: this.getHeaderData(),
|
|
207
|
+
query: this.getQueryData(),
|
|
208
|
+
});
|
|
209
|
+
return {
|
|
210
|
+
workflowData: [this.helpers.returnJsonArray(returnData)],
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
exports.OutplayTrigger = OutplayTrigger;
|
|
215
|
+
//# sourceMappingURL=OutplayTrigger.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutplayTrigger.node.js","sourceRoot":"","sources":["../../../nodes/Outplay/OutplayTrigger.node.ts"],"names":[],"mappings":";;;AAAA,+CAQsB;AAEtB,MAAa,cAAc;IAA3B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,uBAAuB;YAC7B,KAAK,EAA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AmCH,CAAC;IAjCA,KAAK,CAAC,OAAO;QACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACpC,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAW,CAAC;QAGvD,IAAI,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpC,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;YAEvD,OAAO;gBACN,eAAe,EAAE,IAAI;aACrB,CAAC;QACH,CAAC;QAID,IAAI,QAAQ,CAAC,KAAK,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE,CAAC;YACxD,OAAO;gBACN,eAAe,EAAE,4BAA4B;aAC7C,CAAC;QACH,CAAC;QAED,MAAM,UAAU,GAAkB,EAAE,CAAC;QAErC,UAAU,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE;YAC7B,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE;SAC1B,CAAC,CAAC;QAEH,OAAO;YACN,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;SACxD,CAAC;IACH,CAAC;CACD;AAnQD,wCAmQC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-outplay.outplayTrigger",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Sales & CRM"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"primaryDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://docs.outplayhq.com/webhooks"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"credentialDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://docs.outplayhq.com/authentication"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"alias": ["webhook", "sales trigger", "prospect trigger", "email trigger", "outplay events"]
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="23px" height="23px" viewBox="0 0 23 23" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<!-- Generator: Sketch 54.1 (76490) - https://sketchapp.com -->
|
|
4
|
+
<title>outplay-icon</title>
|
|
5
|
+
<desc>Created with Sketch.</desc>
|
|
6
|
+
<defs>
|
|
7
|
+
<linearGradient x1="27.3289363%" y1="38.3688714%" x2="100%" y2="100%" id="linearGradient-1">
|
|
8
|
+
<stop stop-color="#FC4C82" offset="0%"></stop>
|
|
9
|
+
<stop stop-color="#FB776C" offset="100%"></stop>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
</defs>
|
|
12
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
13
|
+
<g id="outplay-icon" fill="url(#linearGradient-1)" fill-rule="nonzero">
|
|
14
|
+
<path d="M21.3846528,0.145101202 L0.561131974,12.1547976 C-0.252041117,12.6218913 -0.148709729,13.7536951 0.659970692,14.0950328 L5.43567785,16.098146 L18.3431159,4.72621203 C18.5902127,4.50613906 18.9406409,4.84298544 18.7294855,5.09898869 L7.90664582,18.2809105 L7.90664582,21.8963951 C7.90664582,22.9563384 9.18705649,23.3740279 9.81603015,22.6060181 L12.6688749,19.1342547 L18.2667405,21.4787056 C18.9046995,21.7481826 19.6325119,21.3484583 19.7493213,20.6612917 L22.984043,1.25893992 C23.1367938,0.351700318 22.1618845,-0.30402731 21.3846528,0.145101202 Z" id="Path"></path>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "n8n-nodes-outplay",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "n8n nodes for Outplay API integration",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"homepage": "https://github.com/outplay-hq/n8n-nodes-outplay",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"n8n-community-node-package",
|
|
11
|
+
"n8n",
|
|
12
|
+
"outplay",
|
|
13
|
+
"sales",
|
|
14
|
+
"engagement",
|
|
15
|
+
"crm"
|
|
16
|
+
],
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "DEEPAK9110",
|
|
19
|
+
"email": "deepak.kumar@outplayhq.com"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/outplay-hq/n8n-nodes-outplay.git"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "n8n-node build",
|
|
27
|
+
"build:watch": "tsc --watch",
|
|
28
|
+
"dev": "n8n-node dev",
|
|
29
|
+
"dev:cli": "n8n-node dev",
|
|
30
|
+
"dev:external": "n8n-node dev --external-n8n",
|
|
31
|
+
"dev:n8n": "powershell -ExecutionPolicy Bypass -File ./start-dev.ps1",
|
|
32
|
+
"dev:n8n:unix": "bash ./start-dev.sh",
|
|
33
|
+
"test": "npm run build && npm run lint",
|
|
34
|
+
"prepack": "npm run build && node -e \"const fs=require('fs'); try{fs.unlinkSync('dist/package.json')}catch{}; try{fs.unlinkSync('dist/tsconfig.tsbuildinfo')}catch{}; console.log('✓ Cleaned dist artifacts')\"",
|
|
35
|
+
"start:n8n": "set N8N_DEV_RELOAD=true && n8n start",
|
|
36
|
+
"lint": "n8n-node lint",
|
|
37
|
+
"lint:fix": "n8n-node lint --fix",
|
|
38
|
+
"release": "n8n-node release",
|
|
39
|
+
"prepublishOnly": "n8n-node prerelease"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist",
|
|
43
|
+
"README.md",
|
|
44
|
+
"LICENSE.md"
|
|
45
|
+
],
|
|
46
|
+
"n8n": {
|
|
47
|
+
"n8nNodesApiVersion": 1,
|
|
48
|
+
"credentials": [
|
|
49
|
+
"dist/credentials/OutplayApi.credentials.js"
|
|
50
|
+
],
|
|
51
|
+
"nodes": [
|
|
52
|
+
"dist/nodes/Outplay/Outplay.node.js",
|
|
53
|
+
"dist/nodes/Outplay/OutplayTrigger.node.js"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@n8n/node-cli": "^0.14.0",
|
|
58
|
+
"eslint": "9.32.0",
|
|
59
|
+
"n8n-node-dev": "^1.118.0",
|
|
60
|
+
"prettier": "3.6.2",
|
|
61
|
+
"release-it": "^19.0.4",
|
|
62
|
+
"typescript": "5.9.2"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"n8n-workflow": "^1.117.0"
|
|
66
|
+
}
|
|
67
|
+
}
|