lemlist@1.0.0
This adaptor exports the following from common:
- as()
- combine()
- cursor()
- dataPath()
- dataValue()
- dateFns
- each()
- field()
- fields()
- fn()
- fnIf()
- group()
- lastReferenceValue()
- map()
- merge()
- scrubEmojis()
- sourceValue()
- util
- combine()
Functions
listActivities
listActivities([options]) ⇒ Operation
List lemlist activities (emails sent, opened, replied, bounced, etc).
Returns an array of activities to state.data.
Fetches every page until no records remain or limit is reached.
Filters which resolve to undefined, null or '' are ignored.
| Param | Type | Description |
|---|---|---|
| [options] | ListActivitiesOptions | Filters and pagination options |
This operation writes the following keys to state:
| State Key | Description |
|---|---|
| data | the parsed response body |
| response | the response from the HTTP server, including headers, statusCode, body, etc |
| references | an array of all previous data objects used in the Job |
Example: List all replies since a given date
listActivities({ type: 'emailsReplied', minDate: '2026-10-01T00:00:00Z' });
Example: List activities for a campaign
listActivities({ campaignId: 'cam_abc123' });
Example: Fetch at most 500 activities
listActivities({ type: 'emailsSent', limit: 500 });
Example: Fetch every activity, 50 at a time
listActivities({ type: 'emailsOpened', pageSize: 50 });
request
request(method, path, body, options) ⇒ Operation
Make a general HTTP request to the lemlist API
| Param | Type | Description |
|---|---|---|
| method | string | HTTP method to use |
| path | string | Path to resource, relative to https://api.lemlist.com/api |
| body | object | Object which will be attached to the request body |
| options | RequestOptions | Optional request options |
This operation writes the following keys to state:
| State Key | Description |
|---|---|
| data | the parsed response body |
| response | the response from the HTTP server, including headers, statusCode, body, etc |
| references | an array of all previous data objects used in the Job |
Example
request('GET', 'campaigns');
Interfaces
HttpState
State object
Properties
| Name | Description |
|---|---|
| data | the parsed response body |
| response | the response from the HTTP server, including headers, statusCode, body, etc |
| references | an array of all previous data objects used in the Job |
ListActivitiesOptions
Options for listing activities
Properties
| Name | Type | Description |
|---|---|---|
| type | string | Activity type to filter by, ie emailsReplied, emailsBounced, emailsUnsubscribed |
| campaignId | string | Only return activities for this campaign |
| leadId | string | Only return activities for this lead |
| isFirst | boolean | Only return the first activity of each type |
| minDate | string | Only return activities created at or after this date (ISO 8601 or unix seconds) |
| maxDate | string | Only return activities created at or before this date (ISO 8601 or unix seconds) |
| offset | number | Number of records to skip before fetching. Default: 0. |
| limit | number | Maximum total number of records to return, across all pages. Default: Infinity. |
| pageSize | number | Number of records to request per page (max 100). Default: 100. |
| version | string | lemlist API version. Default: v2. |
RequestOptions
Options provided to the HTTP request
Properties
| Name | Type | Description |
|---|---|---|
| errors | object | Map of errorCodes -> error messages, ie, { 404: 'Resource not found;' }. Pass false to suppress errors for this code. |
| query | object | An object of query parameters to be encoded into the URL. |
| headers | object | An object of headers to append to the request. |
| parseAs | string | Parse the response body as json, text or stream. By default will use the response headers. |
| timeout | number | Request timeout in ms. Default: 300 seconds. |