Skip to content

Commit

Permalink
Merge pull request #2 from anantanandgupta/feature/node/get-by-email
Browse files Browse the repository at this point in the history
added a new node to get the subscribers by email
  • Loading branch information
LucasSovre authored Mar 18, 2024
2 parents d341698 + 1c0d619 commit e654338
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
14 changes: 14 additions & 0 deletions nodes/Listmonk/businessOperations/subscribers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,20 @@ export const subscriberOperations: INodeProperties[] = [
},
},
},
{
name: 'Get by Email',
value: 'getByEmail',
action: 'Get by Email',

Check failure on line 54 in nodes/Listmonk/businessOperations/subscribers.ts

View workflow job for this annotation

GitHub Actions / publish-npm

Change to sentence case [autofixable]

Check failure on line 54 in nodes/Listmonk/businessOperations/subscribers.ts

View workflow job for this annotation

GitHub Actions / publish-npm

Change to sentence case [autofixable]
routing: {
request: {
method: 'GET',
url: '/subscribers',
qs: {
query: '=email=\'{{$parameter.subscriberEmail}}\'',
},
},
},
},
{
name: 'Get Subscriber by ID',
value: 'geSubscriberById',
Expand Down
13 changes: 13 additions & 0 deletions nodes/Listmonk/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,4 +340,17 @@ export const listmonkOptions: INodeProperties[] = [
},
},
},
{
displayName: 'Subscriber Email',
description: 'Search subscriber by email address. Although the email address in listmonk a unique field, it doesn\'t provide a direct API to get one the subscriber by email address. This method will return a list of subscribers if found, containing one element.',
required: true,
name: 'subscriberEmail',
type: 'string',
default: '',
displayOptions: {
show: {
operation: ['getByEmail'],
},
},
},
];
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n8n-nodes-listmonk",
"version": "1.0.3",
"version": "1.0.4",
"description": "A n8n node to interact with Listmonk app",
"keywords": [
"n8n-community-node-package",
Expand Down

0 comments on commit e654338

Please sign in to comment.