This workflow automates sending SMS and voice messages using the Mocean API in n8n. Key nodes include Messaging Request Webhook for receiving POST requests, Validate Message Request to extract data, Check Required Fields and Determine Message Type for validation, Send SMS Message and Send Voice Message for API interaction, and Process SMS/Voice Response for formatting outputs. Setup Requirements: Install n8n by downloading from n8n.io for local setup or sign up at cloud.n8n.io for cloud access. For Mocean, visit moceanapi.com, create an account, and obtain an API key and secret from the dashboard. In n8n, go to Credentials > Add Credential > HTTP Basic Auth, name it 'moceanApi', and enter the API key as username and secret as password. Configure the Messaging Request Webhook node with a unique path (e.g., 'message-webhook'). Ensure Send SMS Message and Send Voice Message nodes use correct URLs and reference 'moceanApi' credentials. Missing credentials trigger an authentication error; verify key and secret. Invalid phone numbers or missing message_text return a 'Invalid request' error with a 400 status code. Testing and Deployment: Import the JSON into n8n’s workflow editor. Test the webhook with a POST request (e.g., curl -X POST http://your-n8n-instance/message-webhook -d '{"type":"sms","to":"+12345678901","message":"Hello"}'). Validate outputs in Process SMS Response or Process Voice Response nodes, checking fields like message_id, status, and success. Ensure 'success: true' for valid messages. Handle errors like invalid phone formats, which trigger Send Validation Error. Deploy by activating the workflow in n8n and integrating the webhook URL into your application. Monitor logs for issues like failed API calls or missing inputs to ensure reliable messaging and robust error handling.
$6.99
Workflow steps: 12
Integrated apps: webhook, set, if