Loops
App · Email Marketing · 5 actions
Automate Loops: create, find, update, and delete contacts, and trigger lifecycle automations with events.
Actions
| Action | What it does |
|---|---|
| Create contact | Add a new contact to your Loops audience, with optional properties and mailing-list subscriptions. |
| Delete contact | Remove a contact from your Loops audience by email, for offboarding or a data-deletion request. |
| Find contact | Look up a contact by email and return their properties and mailing-list subscriptions. |
| Send event | Send a lifecycle event for a contact to trigger a Loops automation (a 'loop'). |
| Update contact | Update a contact's properties or mailing-list subscriptions by email. |
Create contact
Add a new contact to your Loops audience, with optional properties and mailing-list subscriptions.
Inputs
- Email
emailtextRequired - The contact's email address (Loops' unique identifier for a contact).
- First name
first_nametext - The contact's first name.
- Last name
last_nametext - The contact's last name.
- User ID
user_idtext - Your app's own unique identifier for this user. Lets you find and update the contact later by user id.
- User group
user_grouptext - A group to segment the contact into, e.g. 'Founders' or 'Trial'. Used to target automations and lists.
- Subscribed
subscribedtrue/false - Whether the contact is subscribed to marketing email. New contacts default to subscribed in Loops.
- Mailing lists
mailing_listsobject - Mailing lists to subscribe or unsubscribe the contact from, as a map of mailing-list id to true/false, e.g. {"cmXXXXt0": true}. Find list ids in Loops under Settings > Mailing lists (or via the API).
- Properties
propertiesobject - Any custom contact properties to set, as an object, e.g. {"plan": "pro", "signupSource": "web"}. Loops creates a custom property automatically the first time it sees one.
Outputs
idtextsuccesstrue/false
Example output
{
"id": "clkq1w2xy0000ju0f3z9abcde",
"success": true
}Delete contact
Remove a contact from your Loops audience by email, for offboarding or a data-deletion request.
Inputs
- Email
emailtextRequired - The email address of the contact to delete.
Outputs
successtrue/false
Example output
{
"success": true
}Find contact
Look up a contact by email and return their properties and mailing-list subscriptions.
Inputs
- Email
emailtextRequired - The email address of the contact to find.
Outputs
contactslist
Example output
{
"contacts": [
{
"email": "contact@example.com",
"firstName": "Ada",
"id": "clkq1w2xy0000ju0f3z9abcde",
"lastName": "Lovelace",
"mailingLists": {},
"source": "API",
"subscribed": true,
"userGroup": "Founders",
"userId": "user_123"
}
]
}Send event
Send a lifecycle event for a contact to trigger a Loops automation (a 'loop'). Creates the contact if it doesn't exist.
Inputs
- Email
emailtextRequired - The email address of the contact the event is for.
- Event name
event_nametextRequired - The name of the event, e.g. 'signup' or 'trialStarted'. This is what your Loops automations listen for.
- Event properties
event_propertiesobject - Optional data to attach to the event, as an object, e.g. {"plan": "pro"}. Available in the automation and email templates.
- Contact properties
contact_propertiesobject - Optional contact properties to set on the contact at the same time, as an object.
- Mailing lists
mailing_listsobject - Optional mailing lists to subscribe or unsubscribe the contact from, as a map of mailing-list id to true/false.
Outputs
successtrue/false
Example output
{
"success": true
}Update contact
Update a contact's properties or mailing-list subscriptions by email. Creates the contact if it doesn't exist yet.
Inputs
- Email
emailtextRequired - The contact's email address (Loops' unique identifier for a contact).
- First name
first_nametext - The contact's first name.
- Last name
last_nametext - The contact's last name.
- User ID
user_idtext - Your app's own unique identifier for this user. Lets you find and update the contact later by user id.
- User group
user_grouptext - A group to segment the contact into, e.g. 'Founders' or 'Trial'. Used to target automations and lists.
- Subscribed
subscribedtrue/false - Whether the contact is subscribed to marketing email. New contacts default to subscribed in Loops.
- Mailing lists
mailing_listsobject - Mailing lists to subscribe or unsubscribe the contact from, as a map of mailing-list id to true/false, e.g. {"cmXXXXt0": true}. Find list ids in Loops under Settings > Mailing lists (or via the API).
- Properties
propertiesobject - Any custom contact properties to set, as an object, e.g. {"plan": "pro", "signupSource": "web"}. Loops creates a custom property automatically the first time it sees one.
Outputs
idtextsuccesstrue/false
Example output
{
"id": "clkq1w2xy0000ju0f3z9abcde",
"success": true
}