> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atako.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Loops

> Connect Loops to your Atako agents — 5 read and 5 write actions.

Let your agents manage contacts and contact properties, send events that trigger workflows, and send transactional emails via the Loops API.

## Connection

* **Authentication**: API key.

<Note>
  Sign in at app.loops.so → Settings → API → Generate key. Copy the key.

  See [Loops's documentation](https://app.loops.so/settings?page=api).
</Note>

## Read actions (5)

| Action                      | Description                                                                                                                      |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `find_contact`              | Find a contact by email or userId (exactly one of the two).                                                                      |
| `list_contact_properties`   | List contact properties: "all" (default) or only "custom" ones.                                                                  |
| `list_mailing_lists`        | List mailing lists (id, name, description, isPublic).                                                                            |
| `list_transactional_emails` | List transactional emails, most recent first (ids for send\_transactional\_email). Paginate with cursor = pagination.nextCursor. |
| `test_api_key`              | Check the API key and return the team it belongs to.                                                                             |

## Write actions (5)

| Action                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `create_contact`           | Create a contact. Args: email (string, required); firstName, lastName, source, userGroup, userId (strings); subscribed (boolean); mailingLists (object \{ mailingListId: boolean }, ids from list\_mailing\_lists); properties (object of custom property name → string \| number \| boolean, names from list\_contact\_properties).                                                                                                                 |
| `create_contact_property`  | Create a custom contact property. Args: name (string, camelCase, e.g. "planName"); type (one of "string", "number", "boolean", "date").                                                                                                                                                                                                                                                                                                              |
| `send_event`               | Send an event to trigger workflows for a contact. Args: eventName (string, required); email or userId (string, at least one); eventProperties (object of string \| number \| boolean values, available in the emails sent); mailingLists (object \{ mailingListId: boolean }); contactProperties (object of contact property name → string \| number \| boolean, updated on the contact); idempotencyKey (string, max 100 chars, avoids duplicates). |
| `send_transactional_email` | Send a transactional email from a published template. Args: transactionalId (string, required, from list\_transactional\_emails); email (string, required, recipient); addToAudience (boolean, creates the contact if missing); dataVariables (object of template variable name → string \| number, or array for array blocks); idempotencyKey (string, max 100 chars, avoids duplicate sends). Attachments are not supported.                       |
| `update_contact`           | Update a contact by email or userId (at least one; creates the contact if none matches). To change an email, pass userId plus the new email. Args: email, userId (strings); firstName, lastName, source, userGroup (strings); subscribed (boolean — omit unless (un)subscribing); mailingLists (object \{ mailingListId: boolean }); properties (object of custom property name → string \| number \| boolean).                                      |

## Permissions

Every action above must be explicitly granted to an agent before it can be used. See [Permissions](/integrations/permissions) for the grant model and [Security](/integrations/security) for how credentials are protected.
