Modules@robinpath/lemlist
lemlist

@robinpath/lemlist

0.1.2Node.jsPublic

Lemlist module for RobinPath.

Lemlist

Lemlist module for RobinPath.

Package: @robinpath/lemlist | Category: Email Marketing | Type: Integration

Authentication

lemlist.setCredentials "your-credentials"

Call this once at the start of your script before using any other function. Credentials persist for the duration of the script execution.

Use Cases

Use the lemlist module when you need to:

  • listCampaigns -- Use lemlist.listCampaigns to perform this operation
  • getCampaign -- Use lemlist.getCampaign to perform this operation
  • listCampaignLeads -- Use lemlist.listCampaignLeads to perform this operation
  • addLeadToCampaign -- Use lemlist.addLeadToCampaign to perform this operation
  • deleteLeadFromCampaign -- Use lemlist.deleteLeadFromCampaign to perform this operation

Quick Reference

FunctionDescriptionReturns
setCredentialsConfigure lemlist credentials.object
listCampaignslistCampaignsobject
getCampaigngetCampaignobject
listCampaignLeadslistCampaignLeadsobject
addLeadToCampaignaddLeadToCampaignobject
deleteLeadFromCampaigndeleteLeadFromCampaignobject
pauseLeadInCampaignpauseLeadInCampaignobject
resumeLeadInCampaignresumeLeadInCampaignobject
markLeadAsInterestedmarkLeadAsInterestedobject
unsubscribeLeadunsubscribeLeadobject
listActivitieslistActivitiesobject
getLeadByEmailgetLeadByEmailobject
listUnsubscribeslistUnsubscribesobject
exportCampaignStatsexportCampaignStatsobject
getCampaignStatsgetCampaignStatsobject

Functions

setCredentials

Configure lemlist credentials.

Module: lemlist | Returns: object -- API response.

lemlist.setCredentials
ParameterTypeRequiredDescription
apiKeystringYesapiKey

listCampaigns

listCampaigns

Module: lemlist | Returns: object -- API response.

lemlist.listCampaigns
ParameterTypeRequiredDescription
inputstringNoInput parameter

getCampaign

getCampaign

Module: lemlist | Returns: object -- API response.

lemlist.getCampaign
ParameterTypeRequiredDescription
inputstringNoInput parameter

listCampaignLeads

listCampaignLeads

Module: lemlist | Returns: object -- API response.

lemlist.listCampaignLeads
ParameterTypeRequiredDescription
inputstringNoInput parameter

addLeadToCampaign

addLeadToCampaign

Module: lemlist | Returns: object -- API response.

lemlist.addLeadToCampaign
ParameterTypeRequiredDescription
inputstringNoInput parameter

deleteLeadFromCampaign

deleteLeadFromCampaign

Module: lemlist | Returns: object -- API response.

lemlist.deleteLeadFromCampaign
ParameterTypeRequiredDescription
inputstringNoInput parameter

pauseLeadInCampaign

pauseLeadInCampaign

Module: lemlist | Returns: object -- API response.

lemlist.pauseLeadInCampaign
ParameterTypeRequiredDescription
inputstringNoInput parameter

resumeLeadInCampaign

resumeLeadInCampaign

Module: lemlist | Returns: object -- API response.

lemlist.resumeLeadInCampaign
ParameterTypeRequiredDescription
inputstringNoInput parameter

markLeadAsInterested

markLeadAsInterested

Module: lemlist | Returns: object -- API response.

lemlist.markLeadAsInterested
ParameterTypeRequiredDescription
inputstringNoInput parameter

unsubscribeLead

unsubscribeLead

Module: lemlist | Returns: object -- API response.

lemlist.unsubscribeLead
ParameterTypeRequiredDescription
inputstringNoInput parameter

listActivities

listActivities

Module: lemlist | Returns: object -- API response.

lemlist.listActivities
ParameterTypeRequiredDescription
inputstringNoInput parameter

getLeadByEmail

getLeadByEmail

Module: lemlist | Returns: object -- API response.

lemlist.getLeadByEmail
ParameterTypeRequiredDescription
inputstringNoInput parameter

listUnsubscribes

listUnsubscribes

Module: lemlist | Returns: object -- API response.

lemlist.listUnsubscribes
ParameterTypeRequiredDescription
inputstringNoInput parameter

exportCampaignStats

exportCampaignStats

Module: lemlist | Returns: object -- API response.

lemlist.exportCampaignStats
ParameterTypeRequiredDescription
inputstringNoInput parameter

getCampaignStats

getCampaignStats

Module: lemlist | Returns: object -- API response.

lemlist.getCampaignStats
ParameterTypeRequiredDescription
inputstringNoInput parameter

Error Handling

All functions throw on failure. Common errors:

ErrorCause
Lemlist API error (${res.status}): ${t}Check the error message for details
lemlist.setCredentials requires apiKey.Check the error message for details
lemlist.deleteLeadFromCampaign requires an ID.Check the error message for details
lemlist.pauseLeadInCampaign requires an ID.Check the error message for details
lemlist.resumeLeadInCampaign requires an ID.Check the error message for details
lemlist.unsubscribeLead requires an ID.Check the error message for details
Lemlist: "..." not configured. Call lemlist.setCredentials first.Check the error message for details
@desc "List campaigns and validate result"
do
  set $result as lemlist.listCampaigns
  if $result != null
    print "Success"
  else
    print "No result"
  end
enddo

Recipes

1. List and iterate Campaigns

Retrieve all items and loop through them.

@desc "Setup authentication"
do
  lemlist.setCredentials $token
enddo

@desc "List campaigns and iterate results"
do
  set $result as lemlist.listCampaigns
  each $item in $result
    print $item
  end
enddo

2. Create a new item with addLeadToCampaign

Create a new resource and capture the result.

@desc "Setup authentication"
do
  lemlist.setCredentials $token
enddo

@desc "Add lead to campaign"
do
  set $result as lemlist.addLeadToCampaign
  print "Created: " + $result
enddo

3. Check before creating

List existing items and only create if needed.

@desc "Setup authentication"
do
  lemlist.setCredentials $token
enddo

@desc "List campaigns and add lead to campaign"
do
  set $existing as lemlist.listCampaigns
  if $existing == null
    lemlist.addLeadToCampaign
    print "Item created"
  else
    print "Item already exists"
  end
enddo

4. Multi-step Lemlist workflow

Chain multiple lemlist operations together.

@desc "Setup authentication"
do
  lemlist.setCredentials $token
enddo

@desc "List campaigns, get campaign, and more"
do
  set $r_listCampaigns as lemlist.listCampaigns
  set $r_getCampaign as lemlist.getCampaign
  set $r_listCampaignLeads as lemlist.listCampaignLeads
  print "All operations complete"
enddo

5. Safe listCampaigns with validation

Check results before proceeding.

@desc "Setup authentication"
do
  lemlist.setCredentials $token
enddo

@desc "List campaigns and validate result"
do
  set $result as lemlist.listCampaigns
  if $result != null
    print "Success: " + $result
  else
    print "Operation returned no data"
  end
enddo

Related Modules

  • activecampaign -- ActiveCampaign module for complementary functionality
  • brevo -- Brevo module for complementary functionality
  • convertkit -- Convertkit module for complementary functionality
  • mailchimp -- Mailchimp module for complementary functionality
  • sendgrid -- SendGrid module for complementary functionality

Versions (1)

VersionTagPublished
0.1.2latest1 months ago
Install
$ robinpath add @robinpath/lemlist

Collaborators

Dumitru Balaban
Dumitru Balaban
@dumitru
View all @robinpath modules
Version0.1.2
LicenseMIT
Unpacked Size4.5 KB
Versions1
Weekly Downloads22
Total Downloads22
Stars0
Last Publish1 months ago
Created1 months ago

Category

marketing