Skip to content

Commit f193e9e

Browse files
waleedlatif1claude
andauthored
feat(loops): add Loops email platform integration (#3359)
* feat(loops): add Loops email platform integration Add complete Loops integration with 10 tools covering all API endpoints: - Contact management: create, update, find, delete - Email: send transactional emails with attachments - Events: trigger automated email sequences - Lists: list mailing lists and transactional email templates - Properties: create and list contact properties Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ran litn --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c0f22d7 commit f193e9e

20 files changed

+2147
-0
lines changed

apps/docs/components/icons.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3980,6 +3980,17 @@ export function IntercomIcon(props: SVGProps<SVGSVGElement>) {
39803980
)
39813981
}
39823982

3983+
export function LoopsIcon(props: SVGProps<SVGSVGElement>) {
3984+
return (
3985+
<svg {...props} viewBox='0 0 256 256' fill='none' xmlns='http://www.w3.org/2000/svg'>
3986+
<path
3987+
fill='currentColor'
3988+
d='M192.352 88.042c0-7.012-5.685-12.697-12.697-12.697s-12.697 5.685-12.697 12.697c0 .634.052 1.255.142 1.866a25.248 25.248 0 0 0-4.9-.49c-14.006 0-25.36 11.354-25.36 25.36 0 1.63.16 3.222.456 4.765a37.8 37.8 0 0 0-9.296-1.173c-20.95 0-37.935 16.985-37.935 37.935S107.05 194.24 128 194.24s37.935-16.985 37.935-37.935a37.7 37.7 0 0 0-3.78-16.555 25.2 25.2 0 0 0 12.487-3.336 25.2 25.2 0 0 0 4.558 3.336v.02c14.006 0 25.36-11.354 25.36-25.36 0-12.48-9.018-22.855-20.888-24.996a12.6 12.6 0 0 0 8.68-11.972m-77.05 68.263c0-7.012 5.685-12.697 12.697-12.697s12.697 5.685 12.697 12.697c0 7.013-5.685 12.697-12.697 12.697s-12.697-5.685-12.697-12.697'
3989+
/>
3990+
</svg>
3991+
)
3992+
}
3993+
39833994
export function LumaIcon(props: SVGProps<SVGSVGElement>) {
39843995
return (
39853996
<svg {...props} fill='none' viewBox='0 0 133 134' xmlns='http://www.w3.org/2000/svg'>

apps/docs/components/ui/icon-mapping.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ import {
8080
LinearIcon,
8181
LinkedInIcon,
8282
LinkupIcon,
83+
LoopsIcon,
8384
LumaIcon,
8485
MailchimpIcon,
8586
MailgunIcon,
@@ -236,6 +237,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
236237
linear: LinearIcon,
237238
linkedin: LinkedInIcon,
238239
linkup: LinkupIcon,
240+
loops: LoopsIcon,
239241
luma: LumaIcon,
240242
mailchimp: MailchimpIcon,
241243
mailgun: MailgunIcon,
Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
---
2+
title: Loops
3+
description: Manage contacts and send emails with Loops
4+
---
5+
6+
import { BlockInfoCard } from "@/components/ui/block-info-card"
7+
8+
<BlockInfoCard
9+
type="loops"
10+
color="#FAFAF9"
11+
/>
12+
13+
{/* MANUAL-CONTENT-START:intro */}
14+
[Loops](https://loops.so/) is an email platform built for modern SaaS companies, offering transactional emails, marketing campaigns, and event-driven automations through a clean API. This integration connects Loops directly into Sim workflows.
15+
16+
With Loops in Sim, you can:
17+
18+
- **Manage contacts**: Create, update, find, and delete contacts in your Loops audience
19+
- **Send transactional emails**: Trigger templated transactional emails with dynamic data variables
20+
- **Fire events**: Send events to Loops to trigger automated email sequences and workflows
21+
- **Manage subscriptions**: Control mailing list subscriptions and contact properties programmatically
22+
- **Enrich contact data**: Attach custom properties, user groups, and mailing list memberships to contacts
23+
24+
In Sim, the Loops integration enables your agents to manage email operations as part of their workflows. Supported operations include:
25+
26+
- **Create Contact**: Add a new contact to your Loops audience with email, name, and custom properties.
27+
- **Update Contact**: Update an existing contact or create one if no match exists (upsert behavior).
28+
- **Find Contact**: Look up a contact by email address or userId.
29+
- **Delete Contact**: Remove a contact from your audience.
30+
- **Send Transactional Email**: Send a templated transactional email to a recipient with dynamic data variables.
31+
- **Send Event**: Trigger a Loops event to start automated email sequences for a contact.
32+
33+
Configure the Loops block with your API key from the Loops dashboard (Settings > API), select an operation, and provide the required parameters. Your agents can then manage contacts and send emails as part of any workflow.
34+
{/* MANUAL-CONTENT-END */}
35+
36+
37+
## Usage Instructions
38+
39+
Integrate Loops into the workflow. Create and manage contacts, send transactional emails, and trigger event-based automations.
40+
41+
42+
43+
## Tools
44+
45+
### `loops_create_contact`
46+
47+
Create a new contact in your Loops audience with an email address and optional properties like name, user group, and mailing list subscriptions.
48+
49+
#### Input
50+
51+
| Parameter | Type | Required | Description |
52+
| --------- | ---- | -------- | ----------- |
53+
| `apiKey` | string | Yes | Loops API key for authentication |
54+
| `email` | string | Yes | The email address for the new contact |
55+
| `firstName` | string | No | The contact first name |
56+
| `lastName` | string | No | The contact last name |
57+
| `source` | string | No | Custom source value replacing the default "API" |
58+
| `subscribed` | boolean | No | Whether the contact receives campaign emails \(defaults to true\) |
59+
| `userGroup` | string | No | Group to segment the contact into \(one group per contact\) |
60+
| `userId` | string | No | Unique user identifier from your application |
61+
| `mailingLists` | json | No | Mailing list IDs mapped to boolean values \(true to subscribe, false to unsubscribe\) |
62+
| `customProperties` | json | No | Custom contact properties as key-value pairs \(string, number, boolean, or date values\) |
63+
64+
#### Output
65+
66+
| Parameter | Type | Description |
67+
| --------- | ---- | ----------- |
68+
| `success` | boolean | Whether the contact was created successfully |
69+
| `id` | string | The Loops-assigned ID of the created contact |
70+
71+
### `loops_update_contact`
72+
73+
Update an existing contact in Loops by email or userId. Creates a new contact if no match is found (upsert). Can update name, subscription status, user group, mailing lists, and custom properties.
74+
75+
#### Input
76+
77+
| Parameter | Type | Required | Description |
78+
| --------- | ---- | -------- | ----------- |
79+
| `apiKey` | string | Yes | Loops API key for authentication |
80+
| `email` | string | No | The contact email address \(at least one of email or userId is required\) |
81+
| `userId` | string | No | The contact userId \(at least one of email or userId is required\) |
82+
| `firstName` | string | No | The contact first name |
83+
| `lastName` | string | No | The contact last name |
84+
| `source` | string | No | Custom source value replacing the default "API" |
85+
| `subscribed` | boolean | No | Whether the contact receives campaign emails \(sending true re-subscribes unsubscribed contacts\) |
86+
| `userGroup` | string | No | Group to segment the contact into \(one group per contact\) |
87+
| `mailingLists` | json | No | Mailing list IDs mapped to boolean values \(true to subscribe, false to unsubscribe\) |
88+
| `customProperties` | json | No | Custom contact properties as key-value pairs \(send null to reset a property\) |
89+
90+
#### Output
91+
92+
| Parameter | Type | Description |
93+
| --------- | ---- | ----------- |
94+
| `success` | boolean | Whether the contact was updated successfully |
95+
| `id` | string | The Loops-assigned ID of the updated or created contact |
96+
97+
### `loops_find_contact`
98+
99+
Find a contact in Loops by email address or userId. Returns an array of matching contacts with all their properties including name, subscription status, user group, and mailing lists.
100+
101+
#### Input
102+
103+
| Parameter | Type | Required | Description |
104+
| --------- | ---- | -------- | ----------- |
105+
| `apiKey` | string | Yes | Loops API key for authentication |
106+
| `email` | string | No | The contact email address to search for \(at least one of email or userId is required\) |
107+
| `userId` | string | No | The contact userId to search for \(at least one of email or userId is required\) |
108+
109+
#### Output
110+
111+
| Parameter | Type | Description |
112+
| --------- | ---- | ----------- |
113+
| `contacts` | array | Array of matching contact objects \(empty array if no match found\) |
114+
|`id` | string | Loops-assigned contact ID |
115+
|`email` | string | Contact email address |
116+
|`firstName` | string | Contact first name |
117+
|`lastName` | string | Contact last name |
118+
|`source` | string | Source the contact was created from |
119+
|`subscribed` | boolean | Whether the contact receives campaign emails |
120+
|`userGroup` | string | Contact user group |
121+
|`userId` | string | External user identifier |
122+
|`mailingLists` | object | Mailing list IDs mapped to subscription status |
123+
|`optInStatus` | string | Double opt-in status: pending, accepted, rejected, or null |
124+
125+
### `loops_delete_contact`
126+
127+
Delete a contact from Loops by email address or userId. At least one identifier must be provided.
128+
129+
#### Input
130+
131+
| Parameter | Type | Required | Description |
132+
| --------- | ---- | -------- | ----------- |
133+
| `apiKey` | string | Yes | Loops API key for authentication |
134+
| `email` | string | No | The email address of the contact to delete \(at least one of email or userId is required\) |
135+
| `userId` | string | No | The userId of the contact to delete \(at least one of email or userId is required\) |
136+
137+
#### Output
138+
139+
| Parameter | Type | Description |
140+
| --------- | ---- | ----------- |
141+
| `success` | boolean | Whether the contact was deleted successfully |
142+
| `message` | string | Status message from the API |
143+
144+
### `loops_send_transactional_email`
145+
146+
Send a transactional email to a recipient using a Loops template. Supports dynamic data variables for personalization and optionally adds the recipient to your audience.
147+
148+
#### Input
149+
150+
| Parameter | Type | Required | Description |
151+
| --------- | ---- | -------- | ----------- |
152+
| `apiKey` | string | Yes | Loops API key for authentication |
153+
| `email` | string | Yes | The email address of the recipient |
154+
| `transactionalId` | string | Yes | The ID of the transactional email template to send |
155+
| `dataVariables` | json | No | Template data variables as key-value pairs \(string or number values\) |
156+
| `addToAudience` | boolean | No | Whether to create the recipient as a contact if they do not already exist \(default: false\) |
157+
| `attachments` | json | No | Array of file attachments. Each object must have filename \(string\), contentType \(MIME type string\), and data \(base64-encoded string\). |
158+
159+
#### Output
160+
161+
| Parameter | Type | Description |
162+
| --------- | ---- | ----------- |
163+
| `success` | boolean | Whether the transactional email was sent successfully |
164+
165+
### `loops_send_event`
166+
167+
Send an event to Loops to trigger automated email sequences for a contact. Identify the contact by email or userId and include optional event properties and mailing list changes.
168+
169+
#### Input
170+
171+
| Parameter | Type | Required | Description |
172+
| --------- | ---- | -------- | ----------- |
173+
| `apiKey` | string | Yes | Loops API key for authentication |
174+
| `email` | string | No | The email address of the contact \(at least one of email or userId is required\) |
175+
| `userId` | string | No | The userId of the contact \(at least one of email or userId is required\) |
176+
| `eventName` | string | Yes | The name of the event to trigger |
177+
| `eventProperties` | json | No | Event data as key-value pairs \(string, number, boolean, or date values\) |
178+
| `mailingLists` | json | No | Mailing list IDs mapped to boolean values \(true to subscribe, false to unsubscribe\) |
179+
180+
#### Output
181+
182+
| Parameter | Type | Description |
183+
| --------- | ---- | ----------- |
184+
| `success` | boolean | Whether the event was sent successfully |
185+
186+
### `loops_list_mailing_lists`
187+
188+
Retrieve all mailing lists from your Loops account. Returns each list with its ID, name, description, and public/private status.
189+
190+
#### Input
191+
192+
| Parameter | Type | Required | Description |
193+
| --------- | ---- | -------- | ----------- |
194+
| `apiKey` | string | Yes | Loops API key for authentication |
195+
196+
#### Output
197+
198+
| Parameter | Type | Description |
199+
| --------- | ---- | ----------- |
200+
| `mailingLists` | array | Array of mailing list objects |
201+
|`id` | string | The mailing list ID |
202+
|`name` | string | The mailing list name |
203+
|`description` | string | The mailing list description \(null if not set\) |
204+
|`isPublic` | boolean | Whether the list is public or private |
205+
206+
### `loops_list_transactional_emails`
207+
208+
Retrieve a list of published transactional email templates from your Loops account. Returns each template with its ID, name, last updated timestamp, and data variables.
209+
210+
#### Input
211+
212+
| Parameter | Type | Required | Description |
213+
| --------- | ---- | -------- | ----------- |
214+
| `apiKey` | string | Yes | Loops API key for authentication |
215+
| `perPage` | string | No | Number of results per page \(10-50, default: 20\) |
216+
| `cursor` | string | No | Pagination cursor from a previous response to fetch the next page |
217+
218+
#### Output
219+
220+
| Parameter | Type | Description |
221+
| --------- | ---- | ----------- |
222+
| `transactionalEmails` | array | Array of published transactional email templates |
223+
|`id` | string | The transactional email template ID |
224+
|`name` | string | The template name |
225+
|`lastUpdated` | string | Last updated timestamp |
226+
|`dataVariables` | array | Template data variable names |
227+
| `pagination` | object | Pagination information |
228+
|`totalResults` | number | Total number of results |
229+
|`returnedResults` | number | Number of results returned |
230+
|`perPage` | number | Results per page |
231+
|`totalPages` | number | Total number of pages |
232+
|`nextCursor` | string | Cursor for next page \(null if no more pages\) |
233+
|`nextPage` | string | URL for next page \(null if no more pages\) |
234+
235+
### `loops_create_contact_property`
236+
237+
Create a new custom contact property in your Loops account. The property name must be in camelCase format.
238+
239+
#### Input
240+
241+
| Parameter | Type | Required | Description |
242+
| --------- | ---- | -------- | ----------- |
243+
| `apiKey` | string | Yes | Loops API key for authentication |
244+
| `name` | string | Yes | The property name in camelCase format \(e.g., "favoriteColor"\) |
245+
| `type` | string | Yes | The property data type \(e.g., "string", "number", "boolean", "date"\) |
246+
247+
#### Output
248+
249+
| Parameter | Type | Description |
250+
| --------- | ---- | ----------- |
251+
| `success` | boolean | Whether the contact property was created successfully |
252+
253+
### `loops_list_contact_properties`
254+
255+
Retrieve a list of contact properties from your Loops account. Returns each property with its key, label, and data type. Can filter to show all properties or only custom ones.
256+
257+
#### Input
258+
259+
| Parameter | Type | Required | Description |
260+
| --------- | ---- | -------- | ----------- |
261+
| `apiKey` | string | Yes | Loops API key for authentication |
262+
| `list` | string | No | Filter type: "all" for all properties \(default\) or "custom" for custom properties only |
263+
264+
#### Output
265+
266+
| Parameter | Type | Description |
267+
| --------- | ---- | ----------- |
268+
| `properties` | array | Array of contact property objects |
269+
|`key` | string | The property key \(camelCase identifier\) |
270+
|`label` | string | The property display label |
271+
|`type` | string | The property data type \(string, number, boolean, date\) |
272+
273+

apps/docs/content/docs/en/tools/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"linear",
7878
"linkedin",
7979
"linkup",
80+
"loops",
8081
"luma",
8182
"mailchimp",
8283
"mailgun",

0 commit comments

Comments
 (0)