Skip to content

Commit 3ff4db2

Browse files
committed
some adjusts
1 parent 9787c89 commit 3ff4db2

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

components/selzy/actions/create-campaign/create-campaign.mjs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { ConfigurationError } from "@pipedream/platform";
2-
import {
3-
clearEmpty,
4-
parseObject,
5-
} from "../../common/utils.mjs";
2+
import { clearEmpty } from "../../common/utils.mjs";
63
import selzy from "../../selzy.app.mjs";
74

85
export default {
@@ -37,12 +34,6 @@ export default {
3734
description: "To track whether there are any click-throughs in email messages, the default value is `false` (do not track). If `true`, all external links will be replaced with special ones that allow you to track the fact of a click-through, and then forward the user to the desired page. The **Track Links** argument is ignored for SMS messages.",
3835
optional: true,
3936
},
40-
contacts: {
41-
type: "string[]",
42-
label: "Contacts",
43-
description: "Email addresses (or phone numbers for sms messages) to which sending of a message should be limited. If this argument is absent, sending will be made to all contacts on the list for which the message is made (possibly, taking into account segmentation by tags). If the contacts argument is present, only those contacts that are on the list will be taken into account, while the other will be ignored. If there are too many addresses (phone numbers) for sending in the contacts parameter, the **Contacts URL** parameter can be used instead. You can't set both parameters at the same time",
44-
optional: true,
45-
},
4637
contactsUrl: {
4738
type: "string",
4839
label: "Contacts URL",
@@ -114,7 +105,6 @@ export default {
114105
start_time: this.startTime,
115106
track_read: this.trackRead && +this.trackRead,
116107
track_links: this.trackLinks && +this.trackLinks,
117-
contacts: parseObject(this.contacts)?.join(","),
118108
contacts_url: this.contactsUrl,
119109
track_ga: this.trackGa && +this.trackGa,
120110
ga_medium: this.gaMedium,

components/selzy/actions/create-email-message/create-email-message.mjs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@ export default {
2626
subject: {
2727
type: "string",
2828
label: "Subject",
29-
description: "String with the letter subject. It may include [substitution fields](https://selzy.com/en/support/letter/other-functions/personalization-tags/). The parameter is optional if **Template Id** is indicated.",
30-
optional: true,
29+
description: "String with the letter subject. It may include substitution fields. If you wish to use substitution fields, specify a string within a Pipedream Custom Expression and escape the curly brackets with a backslash. For example: {{ \"Welcome to Our Newsletter, \\{\\{Name\\}\\}!\" }}. The parameter is optional if Template Id is indicated.",
3130
},
3231
body: {
3332
type: "string",
3433
label: "Body",
35-
description: "If you transfer the entire HTML text, test such letters additionally as headers outside the body may be modified. The parameter is optional if **Template Id** or **System Template Id** is indicated.",
34+
description: "HTML body of the letter. It may include substitution fields. If you wish to use substitution fields, specify an HTML string within a Pipedream Custom Expression and escape the curly brackets with a backslash. For example: {{ \"<p>Hello \\{\\{Name\\}\\},</p><p>Here is your update.</p>\" }}.. The parameter is optional if **Template Id** or **System Template Id** is indicated.",
3635
},
3736
listId: {
3837
propDefinition: [
@@ -43,14 +42,13 @@ export default {
4342
textBody: {
4443
type: "string",
4544
label: "Text Body",
46-
description: "Text version of the template. It is absent by default. If you do not provide the text version along with the HTML version, you are recommended to set the **Generate Text** parameter to 1 for automatic generation of the text part of the letter.",
45+
description: "Text body of the letter. It may include substitution fields. If you wish to use substitution fields, specify a text string within a Pipedream Custom Expression and escape the curly brackets with a backslash. For example: {{ \"Hello \\{\\{Name\\}\\},\\nHere is your update.\" }}.",
4746
optional: true,
4847
},
4948
generateText: {
5049
type: "boolean",
5150
label: "Generate Text",
5251
description: "`True` means that the text part of the letter will be generated automatically based on the HTML part. If you do not provide the text version along with the HTML version, you are recommended to set the **Generate Text** parameter to `true` for automatic generation of the text part of the letter. If the text variant of the letter is provided using the **Text Body** parameter, the **Generate Text** parameter is ignored. Thus, if the **Generate Text** value has been set to `true`, the server's response will contain a warning.",
53-
optional: true,
5452
},
5553
rawBody: {
5654
type: "string",

components/selzy/sources/new-campaign/new-campaign.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ export default {
4747
responseArray.push(item);
4848
}
4949

50+
responseArray = responseArray.filter((item) => item.id > lastId);
51+
5052
if (responseArray.length) {
51-
responseArray = responseArray.filter((item) => item.id > lastId);
5253
responseArray = responseArray.reverse();
5354

5455
if (maxResults && (responseArray.length > maxResults)) {
5556
responseArray.length = maxResults;
5657
}
58+
5759
this._setLastId(responseArray[0].id);
5860
this._setLastDate(responseArray[0].start_time);
5961
}

0 commit comments

Comments
 (0)