Loops
Loops is an email marketing and transactional email platform built for modern SaaS companies, helping businesses automate onboarding, product updates, and lifecycle messaging with simple workflows, API integrations, and scalable contact management.
Categories: Advertising
Type: loops/v1
Connections
Version: 1
API Key
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| token | API Key | STRING | To find your API key go to Settings -> API in Loops and click Generate key. | true |
Connection Setup
Generate API Key
- Login to your Loops
- Click here to go to Settings.
- Click on API.
- Click on Generate key button.
- By clicking here you can copy your API Key.
Actions
Create Campaign
Name: createCampaign
Create a draft campaign. Loops creates an empty email message for it; set its subject and content with Update Email Message.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| name | Name | STRING | The campaign name. | true |
| campaignGroupId | Campaign Group ID | STRING | The ID of the group to add this campaign to. Defaults to the team's Unsorted group when empty. | false |
| mailingListId | Mailing List ID | STRING | The ID of the mailing list to send to. | false |
| audienceSegmentId | Audience Segment ID | STRING | The ID of an audience segment to send to. | false |
Example JSON Structure
{
"label" : "Create Campaign",
"name" : "createCampaign",
"parameters" : {
"name" : "",
"campaignGroupId" : "",
"mailingListId" : "",
"audienceSegmentId" : ""
},
"type" : "loops/v1/createCampaign"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| id | STRING | The ID of the campaign. |
| url | STRING | The URL of the campaign in the Loops app. |
| name | STRING | The name of the campaign. |
| status | STRING | The status of the campaign, for example Draft or Sent. |
| createdAt | STRING | ISO 8601 timestamp for when the campaign was created. |
| updatedAt | STRING | ISO 8601 timestamp for when the campaign was last updated. |
| emailMessageId | STRING | The ID of the campaign's email message. |
| campaignGroupId | STRING | The ID of the campaign group this campaign belongs to, if set. |
| mailingListId | STRING | The ID of the mailing list this campaign sends to, if set. |
| audienceSegmentId | STRING | The ID of the audience segment this campaign targets, if set. |
| emailMessageContentRevisionId | STRING | The content revision of the new email message. Pass it as Expected Revision ID on the first Update Email Message. |
Output Example
{
"id" : "",
"url" : "",
"name" : "",
"status" : "",
"createdAt" : "",
"updatedAt" : "",
"emailMessageId" : "",
"campaignGroupId" : "",
"mailingListId" : "",
"audienceSegmentId" : "",
"emailMessageContentRevisionId" : ""
}Create Contact
Name: createContact
Create a new contact with an email address and any other contact properties.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| Email Address | STRING | The contact’s email address. | true | |
| firstName | First Name | STRING | The contact’s first name. | false |
| lastName | Last Name | STRING | The contact’s last name. | false |
| userGroup | User Group | STRING | You can use groups to segment users when sending emails. Currently, a contact can only be in one user group. Groups like “Users”, “VIPs”, “Investors” or “Customers” | false |
| userId | User ID | STRING | A unique user ID (for example, from an external application). | false |
| mailingLists | Mailing Lists | ARRAY Items[STRING] | List of mailing lists the user will be subscribed to. | false |
Example JSON Structure
{
"label" : "Create Contact",
"name" : "createContact",
"parameters" : {
"email" : "",
"firstName" : "",
"lastName" : "",
"userGroup" : "",
"userId" : "",
"mailingLists" : [ "" ]
},
"type" : "loops/v1/createContact"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| success | BOOLEAN Optionstrue, false | Indicates whether the contact was created successfully. |
| id | STRING | The internal ID of the new contact. |
Output Example
{
"success" : false,
"id" : ""
}How to find Mailing List ID
- Go to Setting.
- Click on Lists.
- There you will see your Mailing lists.
- Copy ID of the desired mailing list.
Get Campaign
Name: getCampaign
Get a campaign, including the ID of its email message.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| campaignId | Campaign ID | STRING | The ID of the campaign to get. | true |
Example JSON Structure
{
"label" : "Get Campaign",
"name" : "getCampaign",
"parameters" : {
"campaignId" : ""
},
"type" : "loops/v1/getCampaign"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| id | STRING | The ID of the campaign. |
| url | STRING | The URL of the campaign in the Loops app. |
| name | STRING | The name of the campaign. |
| status | STRING | The status of the campaign, for example Draft or Sent. |
| createdAt | STRING | ISO 8601 timestamp for when the campaign was created. |
| updatedAt | STRING | ISO 8601 timestamp for when the campaign was last updated. |
| emailMessageId | STRING | The ID of the campaign's email message. |
| campaignGroupId | STRING | The ID of the campaign group this campaign belongs to, if set. |
| mailingListId | STRING | The ID of the mailing list this campaign sends to, if set. |
| audienceSegmentId | STRING | The ID of the audience segment this campaign targets, if set. |
Output Example
{
"id" : "",
"url" : "",
"name" : "",
"status" : "",
"createdAt" : "",
"updatedAt" : "",
"emailMessageId" : "",
"campaignGroupId" : "",
"mailingListId" : "",
"audienceSegmentId" : ""
}Get Email Message
Name: getEmailMessage
Get an email message, including its subject, preview text, LMX body and current content revision.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| emailMessageId | Email Message ID | STRING | The ID of the email message, for example the Email Message ID of a campaign. | true |
Example JSON Structure
{
"label" : "Get Email Message",
"name" : "getEmailMessage",
"parameters" : {
"emailMessageId" : ""
},
"type" : "loops/v1/getEmailMessage"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| id | STRING | The ID of the email message. |
| campaignId | STRING | The campaign this email message belongs to, if any. |
| transactionalId | STRING | The transactional email this email message belongs to, if any. |
| subject | STRING | The email subject. |
| previewText | STRING | The email preview text. |
| fromName | STRING | The email sender name. |
| fromEmail | STRING | The sender email address, without the team's sending domain. |
| replyToEmail | STRING | The email reply-to address. |
| emailFormat | STRING | The rendering format of the email: styled or plain. |
| lmx | STRING | The email body serialized as LMX. |
| contentRevisionId | STRING | The current content revision. Pass it as Expected Revision ID on the next update. |
| updatedAt | STRING | ISO 8601 timestamp for when the email message was last updated. |
| warnings | ARRAY Items[{STRING(rule), STRING(severity), STRING(message), STRING(path)}] | Non-fatal issues raised while compiling the submitted LMX. |
Output Example
{
"id" : "",
"campaignId" : "",
"transactionalId" : "",
"subject" : "",
"previewText" : "",
"fromName" : "",
"fromEmail" : "",
"replyToEmail" : "",
"emailFormat" : "",
"lmx" : "",
"contentRevisionId" : "",
"updatedAt" : "",
"warnings" : [ {
"rule" : "",
"severity" : "",
"message" : "",
"path" : ""
} ]
}Update Email Message
Name: updateEmailMessage
Update the subject, preview text, sender or LMX body of an email message. Only the fields you fill in are changed. A campaign's email message can be updated only while the campaign is a draft.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| emailMessageId | Email Message ID | STRING | The ID of the email message to update. | true |
| expectedRevisionId | Expected Revision ID | STRING | The content revision you last read: the Content Revision ID from Get Email Message, or the Email Message Content Revision ID from Create Campaign. The update is applied only if the email is still at this revision, so a newer edit is never overwritten. | true |
| subject | Subject | STRING | The email subject. | false |
| previewText | Preview Text | STRING | The email preview text. | false |
| fromName | From Name | STRING | The email sender name. | false |
| fromEmail | From Email | STRING | The sender email address without the team's sending domain, for example hello for hello@yourdomain.com. | false |
| replyToEmail | Reply-To Email | STRING | The reply-to email address. | false |
| lmx | LMX | STRING | The email body in LMX, Loops' XML-like email markup, for example <Paragraph>Hello, {firstName}!</Paragraph>. Styles go in the LMX <Style /> tag. The payload is limited to 100KB. See https://loops.so/docs/creating-emails/lmx for the format. | false |
Example JSON Structure
{
"label" : "Update Email Message",
"name" : "updateEmailMessage",
"parameters" : {
"emailMessageId" : "",
"expectedRevisionId" : "",
"subject" : "",
"previewText" : "",
"fromName" : "",
"fromEmail" : "",
"replyToEmail" : "",
"lmx" : ""
},
"type" : "loops/v1/updateEmailMessage"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| id | STRING | The ID of the email message. |
| campaignId | STRING | The campaign this email message belongs to, if any. |
| transactionalId | STRING | The transactional email this email message belongs to, if any. |
| subject | STRING | The email subject. |
| previewText | STRING | The email preview text. |
| fromName | STRING | The email sender name. |
| fromEmail | STRING | The sender email address, without the team's sending domain. |
| replyToEmail | STRING | The email reply-to address. |
| emailFormat | STRING | The rendering format of the email: styled or plain. |
| lmx | STRING | The email body serialized as LMX. |
| contentRevisionId | STRING | The current content revision. Pass it as Expected Revision ID on the next update. |
| updatedAt | STRING | ISO 8601 timestamp for when the email message was last updated. |
| warnings | ARRAY Items[{STRING(rule), STRING(severity), STRING(message), STRING(path)}] | Non-fatal issues raised while compiling the submitted LMX. |
Output Example
{
"id" : "",
"campaignId" : "",
"transactionalId" : "",
"subject" : "",
"previewText" : "",
"fromName" : "",
"fromEmail" : "",
"replyToEmail" : "",
"emailFormat" : "",
"lmx" : "",
"contentRevisionId" : "",
"updatedAt" : "",
"warnings" : [ {
"rule" : "",
"severity" : "",
"message" : "",
"path" : ""
} ]
}What to do if your action is not listed here?
If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.
To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.
How is this guide?
Last updated on