@pipedream/pitchlane 0.0.1 → 0.1.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/README.md +11 -0
- package/actions/create-campaign-video/create-campaign-video.mjs +101 -0
- package/actions/get-campaign-schemas/get-campaign-schemas.mjs +31 -0
- package/actions/list-campaigns/list-campaigns.mjs +26 -0
- package/common/utils.mjs +26 -0
- package/package.json +4 -1
- package/pitchlane.app.mjs +67 -5
- package/sources/common/base-webhook.mjs +54 -0
- package/sources/new-video-created/new-video-created.mjs +26 -0
- package/sources/new-video-created/test-event.mjs +63 -0
- package/sources/new-video-first-viewed/new-video-first-viewed.mjs +26 -0
- package/sources/new-video-first-viewed/test-event.mjs +69 -0
- package/sources/new-video-rendered/new-video-rendered.mjs +26 -0
- package/sources/new-video-rendered/test-event.mjs +100 -0
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
The Pitchlane API enables users to automate and integrate media planning and buying processes. This API can streamline the creation, management, and optimization of advertising campaigns across various channels. By utilizing Pitchlane within Pipedream, users can connect their media planning tools with other business systems (like CRM, analytics, or communication platforms), automate repetitive tasks, and orchestrate complex workflows that respond to real-time data changes.
|
|
4
|
+
|
|
5
|
+
# Example Use Cases
|
|
6
|
+
|
|
7
|
+
- **Campaign Performance Sync to Google Sheets**: Automate the process of syncing detailed campaign performance data from Pitchlane to a Google Sheets document. This workflow can be set to trigger every time a campaign's data is updated, ensuring that stakeholders have access to the most current information without manual intervention. Useful for real-time reporting and data aggregation for meetings or audits.
|
|
8
|
+
|
|
9
|
+
- **Slack Notifications for Campaign Alerts**: Set up an automated alert system where any critical updates or metrics (like budget overruns or KPI achievements) are instantly sent as notifications to a designated Slack channel. This ensures that the marketing team stays informed about important developments in real-time, promoting swift decision-making and immediate responses to potential issues.
|
|
10
|
+
|
|
11
|
+
- **Automated Email Reports with SendGrid**: Design a workflow where weekly or monthly email summaries of campaign performances are automatically generated and sent through SendGrid. This can include key performance indicators, budget usage, and other relevant data tailored to the needs of different stakeholders. This eliminates the need for manual report preparation and ensures consistent updates are delivered to executives or clients.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import pitchlane from "../../pitchlane.app.mjs";
|
|
2
|
+
import { parseObject } from "../../common/utils.mjs";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
key: "pitchlane-create-campaign-video",
|
|
6
|
+
name: "Create Campaign Video",
|
|
7
|
+
description: "Creates a new video for a campaign. [See the documentation](https://docs.pitchlane.com/reference#tag/videos/POST/campaigns/{campaignId}/videos)",
|
|
8
|
+
version: "0.0.1",
|
|
9
|
+
type: "action",
|
|
10
|
+
annotations: {
|
|
11
|
+
destructiveHint: false,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
readOnlyHint: false,
|
|
14
|
+
},
|
|
15
|
+
props: {
|
|
16
|
+
pitchlane,
|
|
17
|
+
campaignId: {
|
|
18
|
+
propDefinition: [
|
|
19
|
+
pitchlane,
|
|
20
|
+
"campaignId",
|
|
21
|
+
],
|
|
22
|
+
reloadProps: true,
|
|
23
|
+
},
|
|
24
|
+
title: {
|
|
25
|
+
type: "string",
|
|
26
|
+
label: "Title",
|
|
27
|
+
description: "The title of the video to create. If not specified, the title will be generated following the campaign's titleTemplate.",
|
|
28
|
+
optional: true,
|
|
29
|
+
},
|
|
30
|
+
queueForRender: {
|
|
31
|
+
type: "boolean",
|
|
32
|
+
label: "Queue for Render",
|
|
33
|
+
description: "If `true`, the video will automatically be added to the rendering queue to be rendered (default). If `false`, the video will be created in Pitchlane but will not be rendered until the \"Render all Videos\" button is pressed in the Pitchlane UI.",
|
|
34
|
+
optional: true,
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
async additionalProps() {
|
|
39
|
+
const props = {};
|
|
40
|
+
if (!this.campaignId) {
|
|
41
|
+
return props;
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
const {
|
|
45
|
+
variableSchema, leadSchemaMapping,
|
|
46
|
+
} = await this.pitchlane.getCampaignSchemas({
|
|
47
|
+
campaignId: this.campaignId,
|
|
48
|
+
});
|
|
49
|
+
const requiredVariables = {};
|
|
50
|
+
for (const [
|
|
51
|
+
key,
|
|
52
|
+
value,
|
|
53
|
+
] of Object.entries(variableSchema)) {
|
|
54
|
+
if (value.required) {
|
|
55
|
+
const variableKey = key.split("_")[0];
|
|
56
|
+
requiredVariables[variableKey] = true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
for (const key of Object.keys(leadSchemaMapping)) {
|
|
60
|
+
props[key] = {
|
|
61
|
+
type: "string",
|
|
62
|
+
label: key,
|
|
63
|
+
optional: !requiredVariables[key],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
} catch {
|
|
67
|
+
props.variables = {
|
|
68
|
+
type: "object",
|
|
69
|
+
label: "Variables",
|
|
70
|
+
description: "The schema variables to be used in the video",
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return props;
|
|
74
|
+
},
|
|
75
|
+
async run({ $ }) {
|
|
76
|
+
const {
|
|
77
|
+
pitchlane,
|
|
78
|
+
campaignId,
|
|
79
|
+
title,
|
|
80
|
+
queueForRender,
|
|
81
|
+
variables,
|
|
82
|
+
...otherVariables
|
|
83
|
+
} = this;
|
|
84
|
+
|
|
85
|
+
const response = await pitchlane.createCampaignVideo({
|
|
86
|
+
$,
|
|
87
|
+
campaignId,
|
|
88
|
+
data: {
|
|
89
|
+
queueForRender,
|
|
90
|
+
title,
|
|
91
|
+
variables: {
|
|
92
|
+
...parseObject(variables),
|
|
93
|
+
...otherVariables,
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
$.export("$summary", `Successfully created video with ID: ${response.id}`);
|
|
99
|
+
return response;
|
|
100
|
+
},
|
|
101
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import pitchlane from "../../pitchlane.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "pitchlane-get-campaign-schemas",
|
|
5
|
+
name: "Get Campaign Schemas",
|
|
6
|
+
description: "Retrieve the variable schema and lead schema mapping for a specific campaign. [See the documentation](https://docs.pitchlane.com/reference#tag/campaigns/GET/campaigns/{campaignId}/schemas)",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
pitchlane,
|
|
16
|
+
campaignId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
pitchlane,
|
|
19
|
+
"campaignId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
async run({ $ }) {
|
|
24
|
+
const response = await this.pitchlane.getCampaignSchemas({
|
|
25
|
+
$,
|
|
26
|
+
campaignId: this.campaignId,
|
|
27
|
+
});
|
|
28
|
+
$.export("$summary", `Successfully retrieved the variable schema and lead schema mapping for campaign ID: ${this.campaignId}`);
|
|
29
|
+
return response;
|
|
30
|
+
},
|
|
31
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import pitchlane from "../../pitchlane.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "pitchlane-list-campaigns",
|
|
5
|
+
name: "List Campaigns",
|
|
6
|
+
description: "Lists all campaigns. [See the documentation](https://docs.pitchlane.com/reference#tag/campaigns/GET/campaigns)",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
pitchlane,
|
|
16
|
+
},
|
|
17
|
+
async run({ $ }) {
|
|
18
|
+
const response = await this.pitchlane.listCampaigns({
|
|
19
|
+
$,
|
|
20
|
+
});
|
|
21
|
+
$.export("$summary", `Successfully listed ${response?.length} campaign${response?.length === 1
|
|
22
|
+
? ""
|
|
23
|
+
: "s"}.`);
|
|
24
|
+
return response;
|
|
25
|
+
},
|
|
26
|
+
};
|
package/common/utils.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const parseObject = (obj) => {
|
|
2
|
+
if (!obj) return undefined;
|
|
3
|
+
|
|
4
|
+
if (typeof obj === "string") {
|
|
5
|
+
try {
|
|
6
|
+
return JSON.parse(obj);
|
|
7
|
+
} catch (e) {
|
|
8
|
+
return obj;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
if (Array.isArray(obj)) {
|
|
13
|
+
return obj.map((item) => parseObject(item));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (typeof obj === "object") {
|
|
17
|
+
for (const [
|
|
18
|
+
key,
|
|
19
|
+
value,
|
|
20
|
+
] of Object.entries(obj)) {
|
|
21
|
+
obj[key] = parseObject(value);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return obj;
|
|
26
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/pitchlane",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Pipedream Pitchlane Components",
|
|
5
5
|
"main": "pitchlane.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -11,5 +11,8 @@
|
|
|
11
11
|
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@pipedream/platform": "^3.1.1"
|
|
14
17
|
}
|
|
15
18
|
}
|
package/pitchlane.app.mjs
CHANGED
|
@@ -1,11 +1,73 @@
|
|
|
1
|
+
import { axios } from "@pipedream/platform";
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
type: "app",
|
|
3
5
|
app: "pitchlane",
|
|
4
|
-
propDefinitions: {
|
|
6
|
+
propDefinitions: {
|
|
7
|
+
campaignId: {
|
|
8
|
+
type: "string",
|
|
9
|
+
label: "Campaign ID",
|
|
10
|
+
description: "The ID of the campaign",
|
|
11
|
+
async options() {
|
|
12
|
+
const campaigns = await this.listCampaigns();
|
|
13
|
+
return campaigns?.map((campaign) => ({
|
|
14
|
+
label: campaign.name,
|
|
15
|
+
value: campaign.id,
|
|
16
|
+
})) || [];
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
5
20
|
methods: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
21
|
+
_baseUrl() {
|
|
22
|
+
return "https://app.pitchlane.com/api/public/v1";
|
|
23
|
+
},
|
|
24
|
+
_makeRequest({
|
|
25
|
+
$ = this, path, ...opts
|
|
26
|
+
}) {
|
|
27
|
+
return axios($, {
|
|
28
|
+
url: `${this._baseUrl()}${path}`,
|
|
29
|
+
headers: {
|
|
30
|
+
"X-API-Key": this.$auth.api_key,
|
|
31
|
+
},
|
|
32
|
+
...opts,
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
createWebhook(opts = {}) {
|
|
36
|
+
return this._makeRequest({
|
|
37
|
+
method: "POST",
|
|
38
|
+
path: "/webhooks",
|
|
39
|
+
...opts,
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
deleteWebhook(opts = {}) {
|
|
43
|
+
return this._makeRequest({
|
|
44
|
+
method: "DELETE",
|
|
45
|
+
path: "/webhooks",
|
|
46
|
+
...opts,
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
listCampaigns(opts = {}) {
|
|
50
|
+
return this._makeRequest({
|
|
51
|
+
path: "/campaigns",
|
|
52
|
+
...opts,
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
getCampaignSchemas({
|
|
56
|
+
campaignId, ...opts
|
|
57
|
+
}) {
|
|
58
|
+
return this._makeRequest({
|
|
59
|
+
path: `/campaigns/${campaignId}/schemas`,
|
|
60
|
+
...opts,
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
createCampaignVideo({
|
|
64
|
+
campaignId, ...opts
|
|
65
|
+
}) {
|
|
66
|
+
return this._makeRequest({
|
|
67
|
+
method: "POST",
|
|
68
|
+
path: `/campaigns/${campaignId}/videos`,
|
|
69
|
+
...opts,
|
|
70
|
+
});
|
|
9
71
|
},
|
|
10
72
|
},
|
|
11
|
-
};
|
|
73
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import pitchlane from "../../pitchlane.app.mjs";
|
|
2
|
+
import { ConfigurationError } from "@pipedream/platform";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
props: {
|
|
6
|
+
pitchlane,
|
|
7
|
+
db: "$.service.db",
|
|
8
|
+
http: {
|
|
9
|
+
type: "$.interface.http",
|
|
10
|
+
customResponse: true,
|
|
11
|
+
},
|
|
12
|
+
campaignId: {
|
|
13
|
+
propDefinition: [
|
|
14
|
+
pitchlane,
|
|
15
|
+
"campaignId",
|
|
16
|
+
],
|
|
17
|
+
optional: true,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
hooks: {
|
|
21
|
+
async activate() {
|
|
22
|
+
await this.pitchlane.createWebhook({
|
|
23
|
+
data: {
|
|
24
|
+
webhookUrl: this.http.endpoint,
|
|
25
|
+
campaignId: this.campaignId,
|
|
26
|
+
trigger: this.getEventType(),
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
async deactivate() {
|
|
31
|
+
await this.pitchlane.deleteWebhook({
|
|
32
|
+
params: {
|
|
33
|
+
webhookUrl: this.http.endpoint,
|
|
34
|
+
campaignId: this.campaignId,
|
|
35
|
+
trigger: this.getEventType(),
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
methods: {
|
|
41
|
+
getEventType() {
|
|
42
|
+
throw new ConfigurationError("getEventType is not implemented");
|
|
43
|
+
},
|
|
44
|
+
generateMeta() {
|
|
45
|
+
throw new ConfigurationError("generateMeta is not implemented");
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
async run({ body }) {
|
|
49
|
+
this.http.respond({
|
|
50
|
+
status: 200,
|
|
51
|
+
});
|
|
52
|
+
this.$emit(body, this.generateMeta(body));
|
|
53
|
+
},
|
|
54
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import common from "../common/base-webhook.mjs";
|
|
2
|
+
import sampleEmit from "./test-event.mjs";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
...common,
|
|
6
|
+
key: "pitchlane-new-video-created",
|
|
7
|
+
name: "New Video Created (Instant)",
|
|
8
|
+
description: "Emit new event when a video is created in Pitchlane. [See the documentation](https://docs.pitchlane.com/reference#tag/webhooks/POST/webhooks)",
|
|
9
|
+
version: "0.0.1",
|
|
10
|
+
type: "source",
|
|
11
|
+
dedupe: "unique",
|
|
12
|
+
methods: {
|
|
13
|
+
...common.methods,
|
|
14
|
+
getEventType() {
|
|
15
|
+
return "VIDEO_CREATED";
|
|
16
|
+
},
|
|
17
|
+
generateMeta(body) {
|
|
18
|
+
return {
|
|
19
|
+
id: body.video.id,
|
|
20
|
+
summary: `New video created with ID: ${body.video.id}`,
|
|
21
|
+
ts: Date.parse(body.video.createdAt),
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
sampleEmit,
|
|
26
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"video": {
|
|
3
|
+
"id": "Q2ubfK7gTp8Y_NAlg2M2T",
|
|
4
|
+
"shortId": "l3OIfKOHOq22",
|
|
5
|
+
"title": "Video for Test",
|
|
6
|
+
"createdAt": "2026-01-19T20:55:31.210Z",
|
|
7
|
+
"meta": {},
|
|
8
|
+
"importId": "API import",
|
|
9
|
+
"campaignId": "O7kkxLnMYXUpAM1VzqHg4",
|
|
10
|
+
"campaignName": "My First Campaign",
|
|
11
|
+
"thumbnailUrl": null,
|
|
12
|
+
"thumbnailStorageUrl": null,
|
|
13
|
+
"thumbnailUrlPNG": null,
|
|
14
|
+
"thumbnailStorageUrlPNG": null,
|
|
15
|
+
"thumbnailEmbed": null,
|
|
16
|
+
"thumbnailStorageEmbed": null,
|
|
17
|
+
"thumbnailEmbedPNG": null,
|
|
18
|
+
"thumbnailStorageEmbedPNG": null,
|
|
19
|
+
"videoFileUrl": null,
|
|
20
|
+
"videoUrl": null,
|
|
21
|
+
"originalRow": {
|
|
22
|
+
"website": "https://example.com",
|
|
23
|
+
"first_name": "Test",
|
|
24
|
+
"last_name": "User",
|
|
25
|
+
"email": "test@example.com",
|
|
26
|
+
"company_name": "Pipedream"
|
|
27
|
+
},
|
|
28
|
+
"overrideRow": {
|
|
29
|
+
"website": "https://example.com"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"rawVideo": {
|
|
33
|
+
"_id": "Q2ubfK7gTp8Y_NAlg2M2T",
|
|
34
|
+
"shortId": "l3OIfKOHOq22",
|
|
35
|
+
"importId": "API import",
|
|
36
|
+
"campaignId": "O7kkxLnMYXUpAM1VzqHg4",
|
|
37
|
+
"meta": {},
|
|
38
|
+
"createdAt": "2026-01-19T20:55:31.210Z",
|
|
39
|
+
"storagePaths": {},
|
|
40
|
+
"userId": "google-oauth2|117665792695448708367",
|
|
41
|
+
"originalRow": {
|
|
42
|
+
"website": "https://example.com",
|
|
43
|
+
"first_name": "Test",
|
|
44
|
+
"last_name": "User",
|
|
45
|
+
"email": "test@example.com",
|
|
46
|
+
"company_name": "Pipedream"
|
|
47
|
+
},
|
|
48
|
+
"importSource": "API",
|
|
49
|
+
"title": "Video for Test",
|
|
50
|
+
"overrideRow": {
|
|
51
|
+
"website": "https://example.com"
|
|
52
|
+
},
|
|
53
|
+
"_backupVariables": {
|
|
54
|
+
"first_name": "Test",
|
|
55
|
+
"last_name": "User",
|
|
56
|
+
"email": "test@example.com",
|
|
57
|
+
"company_name": "Pipedream",
|
|
58
|
+
"website_0": "https://example.com"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"event": "VIDEO_CREATED",
|
|
62
|
+
"eventAt": "2026-01-19T20:55:31.279Z"
|
|
63
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import common from "../common/base-webhook.mjs";
|
|
2
|
+
import sampleEmit from "./test-event.mjs";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
...common,
|
|
6
|
+
key: "pitchlane-new-video-first-viewed",
|
|
7
|
+
name: "New Video First Viewed (Instant)",
|
|
8
|
+
description: "Emit new event when a video is first viewed in Pitchlane. [See the documentation](https://docs.pitchlane.com/reference#tag/webhooks/POST/webhooks)",
|
|
9
|
+
version: "0.0.1",
|
|
10
|
+
type: "source",
|
|
11
|
+
dedupe: "unique",
|
|
12
|
+
methods: {
|
|
13
|
+
...common.methods,
|
|
14
|
+
getEventType() {
|
|
15
|
+
return "VIDEO_FIRST_VIEWED";
|
|
16
|
+
},
|
|
17
|
+
generateMeta(body) {
|
|
18
|
+
return {
|
|
19
|
+
id: body.video._id,
|
|
20
|
+
summary: `New video first viewed with ID: ${body.video._id}`,
|
|
21
|
+
ts: Date.parse(body.video.viewedAt),
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
sampleEmit,
|
|
26
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"video": {
|
|
3
|
+
"_id": "eGW3A4OoTqpLMmYidtEC0",
|
|
4
|
+
"shortId": "2JtvheObJPXE",
|
|
5
|
+
"importId": "API import",
|
|
6
|
+
"campaignId": "O7kkxLnMYXUpAM1VzqHg4",
|
|
7
|
+
"meta": {},
|
|
8
|
+
"createdAt": "2026-01-19T20:51:50.462Z",
|
|
9
|
+
"storagePaths": {
|
|
10
|
+
"video": "u6FTur0CpNU89BrMeRXn4.mp4",
|
|
11
|
+
"video_mp4": "u6FTur0CpNU89BrMeRXn4.mp4",
|
|
12
|
+
"thumbnail": "I_sDsMlA0xhJZl4XPDixx.gif",
|
|
13
|
+
"thumbnail_png": "RBXXeah4fVdpxxwXib3dZ.png"
|
|
14
|
+
},
|
|
15
|
+
"userId": "google-oauth2|117665792695448708367",
|
|
16
|
+
"originalRow": {
|
|
17
|
+
"website": "https://example.com",
|
|
18
|
+
"first_name": "Test",
|
|
19
|
+
"last_name": "User",
|
|
20
|
+
"email": "test@example.com",
|
|
21
|
+
"company_name": "Pipedream"
|
|
22
|
+
},
|
|
23
|
+
"originalRowIndex": null,
|
|
24
|
+
"importSource": "API",
|
|
25
|
+
"title": "Video for Test",
|
|
26
|
+
"overrideRow": {
|
|
27
|
+
"website": "https://example.com"
|
|
28
|
+
},
|
|
29
|
+
"_backupVariables": {
|
|
30
|
+
"first_name": "Test",
|
|
31
|
+
"last_name": "User",
|
|
32
|
+
"email": "test@example.com",
|
|
33
|
+
"company_name": "Pipedream",
|
|
34
|
+
"website_0": "https://example.com"
|
|
35
|
+
},
|
|
36
|
+
"bullmqRootJobId": "864f4024-eede-4487-aefe-df05b4829dbe",
|
|
37
|
+
"queuedAt": "2026-01-19T20:58:10.055Z",
|
|
38
|
+
"renderingStatus": "RENDERED",
|
|
39
|
+
"startedProcessingAt": "2026-01-19T20:58:10.839Z",
|
|
40
|
+
"recordingOutputs": {
|
|
41
|
+
"pageResults": {
|
|
42
|
+
"0": {
|
|
43
|
+
"pageResult": {
|
|
44
|
+
"scrollableElementResult": {
|
|
45
|
+
"found": false
|
|
46
|
+
},
|
|
47
|
+
"hasMotionGraphics": false,
|
|
48
|
+
"usedGPU": false,
|
|
49
|
+
"receivedFrames": 1,
|
|
50
|
+
"html": null,
|
|
51
|
+
"languagePreference": "en-US",
|
|
52
|
+
"proxyServer": null
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"backgroundRecordedAt": "2026-01-19T20:59:10.432Z",
|
|
58
|
+
"startedRenderingAt": "2026-01-19T20:59:11.914Z",
|
|
59
|
+
"renderedAt": "2026-01-19T21:00:16.533Z",
|
|
60
|
+
"triggeredWebhooks": [
|
|
61
|
+
"VIDEO_RENDERED"
|
|
62
|
+
],
|
|
63
|
+
"campaignName": "My First Campaign"
|
|
64
|
+
},
|
|
65
|
+
"viewedAt": "2026-01-19T21:05:42.940Z",
|
|
66
|
+
"eventAt": "2026-01-19T21:05:42.940Z",
|
|
67
|
+
"viewerUrl": "https://playpitchlane.com/video/2JtvheObJPXE",
|
|
68
|
+
"event": "VIDEO_FIRST_VIEWED"
|
|
69
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import common from "../common/base-webhook.mjs";
|
|
2
|
+
import sampleEmit from "./test-event.mjs";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
...common,
|
|
6
|
+
key: "pitchlane-new-video-rendered",
|
|
7
|
+
name: "New Video Rendered (Instant)",
|
|
8
|
+
description: "Emit new event when a video is rendered in Pitchlane. [See the documentation](https://docs.pitchlane.com/reference#tag/webhooks/POST/webhooks)",
|
|
9
|
+
version: "0.0.1",
|
|
10
|
+
type: "source",
|
|
11
|
+
dedupe: "unique",
|
|
12
|
+
methods: {
|
|
13
|
+
...common.methods,
|
|
14
|
+
getEventType() {
|
|
15
|
+
return "VIDEO_RENDERED";
|
|
16
|
+
},
|
|
17
|
+
generateMeta(body) {
|
|
18
|
+
return {
|
|
19
|
+
id: body.video.id,
|
|
20
|
+
summary: `New video rendered with ID: ${body.video.id}`,
|
|
21
|
+
ts: Date.parse(body.video.renderedAt),
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
sampleEmit,
|
|
26
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"video": {
|
|
3
|
+
"id": "Q2ubfK7gTp8Y_NAlg2M2T",
|
|
4
|
+
"shortId": "l3OIfKOHOq22",
|
|
5
|
+
"title": "Video for Test",
|
|
6
|
+
"createdAt": "2026-01-19T20:55:31.210Z",
|
|
7
|
+
"queuedAt": "2026-01-19T20:55:33.512Z",
|
|
8
|
+
"startedProcessingAt": "2026-01-19T20:55:34.206Z",
|
|
9
|
+
"startedRenderingAt": "2026-01-19T20:56:35.937Z",
|
|
10
|
+
"backgroundRecordedAt": "2026-01-19T20:56:33.886Z",
|
|
11
|
+
"renderedAt": "2026-01-19T20:57:50.724Z",
|
|
12
|
+
"meta": {},
|
|
13
|
+
"importId": "API import",
|
|
14
|
+
"originalRowIndex": null,
|
|
15
|
+
"campaignId": "O7kkxLnMYXUpAM1VzqHg4",
|
|
16
|
+
"renderingStatus": "RENDERED",
|
|
17
|
+
"campaignName": "My First Campaign",
|
|
18
|
+
"thumbnailUrl": "https://playpitchlane.com/thumbnail/l3OIfKOHOq22.gif",
|
|
19
|
+
"thumbnailStorageUrl": "https://storage.googleapis.com/videos-eu/onSzrk5iU0Q4i_6JrIXPM.gif",
|
|
20
|
+
"thumbnailUrlPNG": "https://playpitchlane.com/thumbnail/l3OIfKOHOq22.png",
|
|
21
|
+
"thumbnailStorageUrlPNG": "https://storage.googleapis.com/videos-eu/sp6iLQbA7dsFOfK3Hqz5u.png",
|
|
22
|
+
"thumbnailEmbed": "<div><a target=\"_blank\" href=\"https://playpitchlane.com/video/l3OIfKOHOq22\"><img style=\"margin:0px;box-sizing:border-box;padding:0px;width:100%;max-width:300px;height:auto\" src=\"https://playpitchlane.com/thumbnail/l3OIfKOHOq22.gif\" alt=\"Video for Test\"></a><br /></div>",
|
|
23
|
+
"thumbnailStorageEmbed": "<div><a target=\"_blank\" href=\"https://playpitchlane.com/video/l3OIfKOHOq22\"><img style=\"margin:0px;box-sizing:border-box;padding:0px;width:100%;max-width:300px;height:auto\" src=\"https://storage.googleapis.com/videos-eu/onSzrk5iU0Q4i_6JrIXPM.gif\" alt=\"Video for Test\"></a><br /></div>",
|
|
24
|
+
"thumbnailEmbedPNG": "<div><a target=\"_blank\" href=\"https://playpitchlane.com/video/l3OIfKOHOq22\"><img style=\"margin:0px;box-sizing:border-box;padding:0px;width:100%;max-width:300px;height:auto\" src=\"https://storage.googleapis.com/videos-eu/sp6iLQbA7dsFOfK3Hqz5u.png\" alt=\"Video for Test\"></a><br /></div>",
|
|
25
|
+
"thumbnailStorageEmbedPNG": "<div><a target=\"_blank\" href=\"https://playpitchlane.com/video/l3OIfKOHOq22\"><img style=\"margin:0px;box-sizing:border-box;padding:0px;width:100%;max-width:300px;height:auto\" src=\"https://storage.googleapis.com/videos-eu/sp6iLQbA7dsFOfK3Hqz5u.png\" alt=\"Video for Test\"></a><br /></div>",
|
|
26
|
+
"videoFileUrl": "https://storage.googleapis.com/videos-eu/oO5uUhlgpcwEj8kugZhNx.mp4",
|
|
27
|
+
"videoUrl": "https://playpitchlane.com/video/l3OIfKOHOq22",
|
|
28
|
+
"originalRow": {
|
|
29
|
+
"website": "https://example.com",
|
|
30
|
+
"first_name": "Test",
|
|
31
|
+
"last_name": "User",
|
|
32
|
+
"email": "test@example.com",
|
|
33
|
+
"company_name": "Pipedream"
|
|
34
|
+
},
|
|
35
|
+
"overrideRow": {
|
|
36
|
+
"website": "https://example.com"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"rawVideo": {
|
|
40
|
+
"_id": "Q2ubfK7gTp8Y_NAlg2M2T",
|
|
41
|
+
"shortId": "l3OIfKOHOq22",
|
|
42
|
+
"importId": "API import",
|
|
43
|
+
"campaignId": "O7kkxLnMYXUpAM1VzqHg4",
|
|
44
|
+
"meta": {},
|
|
45
|
+
"createdAt": "2026-01-19T20:55:31.210Z",
|
|
46
|
+
"storagePaths": {
|
|
47
|
+
"video": "oO5uUhlgpcwEj8kugZhNx.mp4",
|
|
48
|
+
"video_mp4": "oO5uUhlgpcwEj8kugZhNx.mp4",
|
|
49
|
+
"thumbnail": "onSzrk5iU0Q4i_6JrIXPM.gif",
|
|
50
|
+
"thumbnail_png": "sp6iLQbA7dsFOfK3Hqz5u.png"
|
|
51
|
+
},
|
|
52
|
+
"userId": "google-oauth2|117665792695448708367",
|
|
53
|
+
"originalRow": {
|
|
54
|
+
"website": "https://example.com",
|
|
55
|
+
"first_name": "Test",
|
|
56
|
+
"last_name": "User",
|
|
57
|
+
"email": "test@example.com",
|
|
58
|
+
"company_name": "Pipedream"
|
|
59
|
+
},
|
|
60
|
+
"originalRowIndex": null,
|
|
61
|
+
"importSource": "API",
|
|
62
|
+
"title": "Video for Test",
|
|
63
|
+
"overrideRow": {
|
|
64
|
+
"website": "https://example.com"
|
|
65
|
+
},
|
|
66
|
+
"_backupVariables": {
|
|
67
|
+
"first_name": "Test",
|
|
68
|
+
"last_name": "User",
|
|
69
|
+
"email": "test@example.com",
|
|
70
|
+
"company_name": "Pipedream",
|
|
71
|
+
"website_0": "https://example.com"
|
|
72
|
+
},
|
|
73
|
+
"bullmqRootJobId": "6af73ea5-7706-46d8-a8b1-b60d3d4a2be2",
|
|
74
|
+
"queuedAt": "2026-01-19T20:55:33.512Z",
|
|
75
|
+
"renderingStatus": "RENDERED",
|
|
76
|
+
"startedProcessingAt": "2026-01-19T20:55:34.206Z",
|
|
77
|
+
"recordingOutputs": {
|
|
78
|
+
"pageResults": {
|
|
79
|
+
"0": {
|
|
80
|
+
"pageResult": {
|
|
81
|
+
"scrollableElementResult": {
|
|
82
|
+
"found": false
|
|
83
|
+
},
|
|
84
|
+
"hasMotionGraphics": false,
|
|
85
|
+
"usedGPU": false,
|
|
86
|
+
"receivedFrames": 1,
|
|
87
|
+
"html": null,
|
|
88
|
+
"languagePreference": "en-US",
|
|
89
|
+
"proxyServer": null
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"backgroundRecordedAt": "2026-01-19T20:56:33.886Z",
|
|
95
|
+
"startedRenderingAt": "2026-01-19T20:56:35.937Z",
|
|
96
|
+
"renderedAt": "2026-01-19T20:57:50.724Z"
|
|
97
|
+
},
|
|
98
|
+
"event": "VIDEO_RENDERED",
|
|
99
|
+
"eventAt": "2026-01-19T20:57:50.767Z"
|
|
100
|
+
}
|