Skip to content

feat(loops): add Loops email platform integration#3359

Merged
waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1/add-loops-integration
Feb 27, 2026
Merged

feat(loops): add Loops email platform integration#3359
waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1/add-loops-integration

Conversation

@waleedlatif1
Copy link
Collaborator

@waleedlatif1 waleedlatif1 commented Feb 27, 2026

Summary

  • Adds complete Loops email platform integration with 10 tools covering all API endpoints
  • Contact management: create, update, find, delete contacts with custom properties and mailing list subscriptions
  • Email operations: send transactional emails (with attachments support) and trigger event-based automations
  • List operations: list mailing lists, transactional email templates, and contact properties
  • Property management: create and list custom contact properties
  • Block with 10 operations, advanced mode for optional fields, wandConfig for complex JSON inputs
  • All endpoints validated against the Loops OpenAPI spec (v1.7.0)

Test plan

  • Verify block renders correctly in the workflow editor with all 10 operations
  • Test create/update/find/delete contact operations with a Loops API key
  • Test send transactional email and send event operations
  • Test list mailing lists, list transactional emails, and list/create contact properties
  • Verify advanced mode fields (attachments, pagination, mailing lists, custom properties) toggle correctly
  • Verify wandConfig generates valid JSON for complex input fields

@vercel
Copy link

vercel bot commented Feb 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Feb 27, 2026 5:57am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 27, 2026

Greptile Summary

Complete Loops email platform integration with 10 tools covering contact management, email operations, and list management.

Key Changes

  • Contact Management: Full CRUD operations for contacts with validation ensuring at least one identifier (email or userId) is provided for update/find/delete operations
  • Email Operations: Transactional email sending with attachments and event-based automation triggers
  • List Operations: Retrieve mailing lists, transactional email templates (with pagination), and contact properties
  • Property Management: Create and list custom contact properties
  • Block Configuration: Comprehensive block with operation selector, advanced mode fields, and wandConfig for complex JSON inputs
  • Type Safety: Complete TypeScript type definitions with proper response interfaces
  • Validation: Runtime validation for required identifiers with clear error messages
  • API Key Handling: Correct user-only visibility for API keys following project conventions

Code Quality

  • Uses absolute imports with @/ prefix throughout
  • No console.log statements (follows logger pattern from style guide)
  • Proper error handling with fallback messages
  • Type-safe implementations with explicit type parameters

Confidence Score: 5/5

  • This PR is safe to merge - well-structured integration with proper validation, type safety, and error handling
  • Score reflects comprehensive implementation with all 10 tools properly validated, correct visibility settings for API keys, proper TypeScript types, runtime validation for required parameters, and adherence to all project style guides
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/tools/loops/types.ts comprehensive TypeScript type definitions for all Loops operations with proper response types and parameter interfaces
apps/sim/tools/loops/create_contact.ts creates new contacts with proper validation, correct API key visibility, and handles custom properties with precedence logic
apps/sim/tools/loops/update_contact.ts updates contacts with validation for email/userId requirement, uses upsert pattern, handles custom properties correctly
apps/sim/tools/loops/send_transactional_email.ts sends transactional emails with attachments support, data variables, and optional audience addition
apps/sim/tools/loops/send_event.ts sends events with validation for email/userId requirement, supports event properties and mailing list changes
apps/sim/blocks/blocks/loops.ts comprehensive block configuration with 10 operations, advanced mode fields, wandConfig for JSON inputs, proper field mapping

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Loops Block] --> B{Select Operation}
    
    B -->|create_contact| C[loops_create_contact]
    B -->|update_contact| D[loops_update_contact]
    B -->|find_contact| E[loops_find_contact]
    B -->|delete_contact| F[loops_delete_contact]
    B -->|send_transactional_email| G[loops_send_transactional_email]
    B -->|send_event| H[loops_send_event]
    B -->|list_mailing_lists| I[loops_list_mailing_lists]
    B -->|list_transactional_emails| J[loops_list_transactional_emails]
    B -->|create_contact_property| K[loops_create_contact_property]
    B -->|list_contact_properties| L[loops_list_contact_properties]
    
    C --> M[POST /api/v1/contacts/create]
    D --> N[PUT /api/v1/contacts/update]
    E --> O[GET /api/v1/contacts/find]
    F --> P[POST /api/v1/contacts/delete]
    G --> Q[POST /api/v1/transactional]
    H --> R[POST /api/v1/events/send]
    I --> S[GET /api/v1/lists]
    J --> T[GET /api/v1/transactional]
    K --> U[POST /api/v1/contacts/properties]
    L --> V[GET /api/v1/contacts/properties]
    
    M --> W[Return contact ID]
    N --> W
    E --> X[Return contact array]
    F --> Y[Return success message]
    G --> Z[Return email status]
    H --> Z
    I --> AA[Return mailing lists]
    J --> AB[Return templates + pagination]
    K --> AC[Return success]
    L --> AD[Return properties array]
Loading

Last reviewed commit: a1e9e06

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

20 files reviewed, 8 comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1
Copy link
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Collaborator Author

@greptile

@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/add-loops-integration branch from 78fb920 to 4852f9f Compare February 27, 2026 02:56
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>
@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/add-loops-integration branch from 440a2bc to ad98f8f Compare February 27, 2026 05:53
@waleedlatif1
Copy link
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Collaborator Author

@greptile

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@waleedlatif1 waleedlatif1 merged commit f193e9e into staging Feb 27, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/add-loops-integration branch February 27, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant