Mautic CRM Operations

This workflow automates Mautic CRM operations via a webhook, managing companies, contacts, and relationships. Key nodes include Webhook (receives POST requests), Input Validation (sanitizes inputs), Check Input Valid (verifies operation), Create/Update Company (manages companies), Create/Update Contact (manages contacts), Add Contact to Company (links contacts), Get Company/Contact (retrieves data), Process Operations Result (summarizes output), Remove Contact from Company, Delete Contact/Company (cleans up), Success Response (returns JSON), and error responses (Invalid Input, Company Creation, Mautic Operations). It uses the Mautic API. Setup Requirements Install n8n from n8n.io or sign up at cloud.n8n.io. Import the JSON into n8n’s workflow editor. Install Mautic locally or use a cloud instance. Create an OAuth2 client in Mautic (Admin > API Credentials > New > OAuth2). Note the client ID and secret. Configure mauticOAuth2Api credentials in n8n under mautic-oauth-credentials with Mautic’s base URL, client ID, client secret, and OAuth2 endpoints (e.g., /oauth/v2/authorize, /oauth/v2/token). Configure the Webhook node by copying its URL (/mautic-operations). Set allowedOrigins (e.g., 'https://your-domain.com') for security. The workflow expects a JSON payload with 'operation' (e.g., full_crm_test), 'companyName', 'contactEmail', 'firstName', 'lastName', 'position', and 'title'. Handle errors like invalid operation (400: Invalid operation) or OAuth failure (401: Unauthorized). Secure credentials and webhook URL. Testing and Deployment Import the JSON into n8n and activate the workflow. Configure Mautic OAuth2 credentials. Test the Webhook with a POST request (e.g., curl -X POST [webhook-url] -d '{"operation": "full_crm_test", "companyName": "TestCo", "contactEmail": "test@example.com"}' -H 'Content-Type: application/json'). Verify company/contact creation, updates, relationships, and cleanup; check Success Response JSON. Test error cases: invalid operation (400: Invalid operation), invalid OAuth (401: Unauthorized), or API limits (429: Too Many Requests). Check n8n and Mautic logs. Integrate the webhook URL into your application, secure credentials, activate the workflow, and deploy. Monitor Mautic API rate limits and response times.

$6.99

Workflow steps: 19

Integrated apps: webhook, set, if

Mautic CRM Operations preview