π Feature: Respond.io Integration
This PR implements a comprehensive integration piece for Respond.io, a business messaging platform, addressing the feature request in issue #8613.
π Whatβs Implemented
π Authentication
- API Token Authentication with validation
- Secure token storage and usage
- Authentication validation with error handling
- Support for Respond.io API v2
π Search Actions (1 total)
- Find Contact - Search for contacts by phone number, email, or contact ID with flexible search operators
βοΈ Write Actions (7 total)
Contact Management:
- Create Contact - Create new contact records with phone/email validation
- Create or Update Contact - Upsert contacts by phone, email, or ID
- Delete Contact - Permanently remove contacts with confirmation
- Add Tag to Contact - Assign single or multiple tags for organization
Conversation Management:
- Assign or Unassign Conversation - Manage conversation assignments to team members
- Add Comment to Conversation - Add internal comments with mentions and privacy controls
- Open Conversation - Mark conversations as open for handling
π Webhook Triggers (7 total)
Message Triggers:
- New Incoming Message - Fires when messages are received from contacts
- New Outgoing Message - Fires when messages are sent from Respond.io
Conversation Triggers:
- Conversation Opened - Fires when conversations are opened
- Conversation Closed - Fires when conversations are closed
Contact Triggers:
- New Contact - Fires when contacts are created
- Contact Updated - Fires when contact fields are modified
- Contact Tag Updated - Fires when contact tags are added or removed
π οΈ Additional Features
- Custom API Call Action - Allows arbitrary API calls to any Respond.io endpoint
- Comprehensive Error Handling - Proper error messages for authentication, rate limits, API errors
- Field Validation - Phone number and email validation with formatting
- Webhook Management - Automatic webhook creation and cleanup
- Channel Filtering - Filter triggers by specific communication channels
π― Addresses Issue Requirements
This implementation fully addresses the requirements outlined in issue #8613:
- β
Complete Respond.io business messaging platform integration
- β
API token authentication with validation
- β
All requested search, write actions, and triggers
- β
Webhook support for real-time event handling
- β
Follows Activepieces coding standards and patterns
- β
Comprehensive error handling and field validation
π Files Added
packages/pieces/community/respond-io/
βββ package.json
βββ project.json
βββ tsconfig.json
βββ tsconfig.lib.json
βββ README.md
βββ src/
βββ index.ts
βββ lib/
βββ common/
β βββ auth.ts # API token authentication
β βββ client.ts # API client with error handling
β βββ utils.ts # Utility functions and validation
βββ actions/
β βββ find-contact.ts # Search action
β βββ create-contact.ts # Contact creation
β βββ create-or-update-contact.ts # Contact upsert
β βββ delete-contact.ts # Contact deletion
β βββ add-tag-to-contact.ts # Tag management
β βββ assign-conversation.ts # Conversation assignment
β βββ add-comment-to-conversation.ts # Internal comments
β βββ open-conversation.ts # Conversation management
βββ triggers/
βββ new-incoming-message.ts
βββ new-outgoing-message.ts
βββ conversation-opened.ts
βββ conversation-closed.ts
βββ new-contact.ts
βββ contact-updated.ts
βββ contact-tag-updated.ts
π§ͺ Testing Instructions
Prerequisites
- Respond.io Account - Sign up for free trial at respond.io
- API Access Token - Generate token from Settings > API Access
- Test Data - Sample contacts, conversations, and messages for testing
Authentication Testing
- Configure API Access Token in Activepieces
- Test authentication validation with valid/invalid tokens
- Verify proper error messages for authentication failures
Action Testing
Search Actions:
- Test Find Contact with phone number, email, and contact ID
- Verify search operators and result formatting
- Test with non-existent contacts to verify empty results
Write Actions:
- Test contact creation with required and optional fields
- Test contact upsert functionality with existing/new contacts
- Test contact deletion with confirmation requirements
- Test tag addition with single and multiple tags
- Test conversation assignment and unassignment
- Test comment addition with mentions and privacy settings
- Test conversation opening with status changes
Triggers:
- Set up webhook triggers in test flows
- Send/receive messages to verify message triggers
- Open/close conversations to verify conversation triggers
- Create/update contacts to verify contact triggers
- Add/remove tags to verify tag update triggers
- Verify payload structure matches expected format
Error Handling Testing
- Test with invalid API tokens
- Test with malformed API requests
- Test rate limiting scenarios
- Verify proper error messages are displayed
π Code Quality
- β
TypeScript Compilation - No compilation errors
- β
Code Standards - Follows Activepieces patterns and conventions
- β
Error Handling - Comprehensive error handling throughout
- β
Documentation - Inline comments and README documentation
- β
Type Safety - Proper TypeScript types and interfaces
- β
Modularity - Clean separation of concerns and reusable components
- β
Validation - Input validation and data sanitization
π API Documentation
This integration is built against the official Respond.io API v2:
π Implementation Statistics
- Total Files: 20 new files
- Lines of Code: ~2,500 lines
- Actions: 8 total (1 search + 7 write)
- Triggers: 7 webhook triggers
- Authentication: API token with validation
- Error Handling: Comprehensive throughout
- Documentation: Complete README and inline comments
Closes #8613
/claim #8613