Quick overview
This workflow receives new leads via webhook and sends an instant SMS from your RingCentral number, using office-hours logic to choose between a callback message or an after-hours booking message.
How it works
- Receives a new lead payload via an incoming webhook.
- Adds your business details, sender phone number, booking link, and office-hours settings to the incoming lead data.
- Normalizes the lead’s US phone number to E.164 format, detects office hours in your configured time zone, and generates either an in-hours or after-hours SMS message while filtering out spam-like inquiries.
- If the lead has a valid US phone number and is not flagged as spam, requests an OAuth access token from RingCentral using JWT bearer grant.
- Sends the SMS through the RingCentral SMS API and outputs the send status, message ID, recipient number, and whether it was an office-hours or after-hours text.
- If validation fails, returns a skipped status indicating the message was not sent.
Setup
- Check business texting first: in the RingCentral Admin Portal (https://service.ringcentral.com) go to Phone System → Business SMS and make sure your number has an approved 10DLC campaign. If not, click Set up SMS. Carrier approval can take 5 to 20 days, so start this early.
- Create the app: open https://developers.ringcentral.com/console → Apps → Create App → REST API App → Next. Under Authentication choose JWT auth flow, add the SMS scope, then click Create. Copy the Client ID and Client Secret from the app's Credentials tab.
- Create the JWT: in the same console, hover over your name (top right) → Credentials → Create JWT. Allow only your new app (paste its Client ID), click Create and copy the JWT right away. It is shown only once. Use the login of the user who owns the texting number.
- Add the credential: open Get RingCentral token → Credential → Create new → Custom Auth, and paste {"headers":{"Authorization":"Basic BASE64"},"body":{"assertion":"YOUR_JWT"}}. To make BASE64, press F12 in your browser, open Console and type btoa("clientId:clientSecret"). Do not use online Base64 websites for secrets.
- Fill in Configure: replace every YOUR_ value, set your time zone (for example America/Chicago), work days (1 = Monday … 7 = Sunday) and hours in minutes after midnight (480 = 8:00 AM, 1050 = 5:30 PM).
- Test and go live: click Listen for test event on the webhook, send the sample JSON from the Test it note with your own mobile number and check the text arrives. Then activate the workflow and point your form at the Production URL.
Requirements
- A RingCentral account with an SMS-enabled business number registered for business texting (10DLC)
- Access to the RingCentral Developer Console (https://developers.ringcentral.com/console, same login as RingCentral)
- A form, landing page or CRM that can send a webhook (Elementor, WPForms, Jotform, Typeform, HubSpot, GoHighLevel and similar)
Customization
- Change the wording: edit sms_text in Build SMS text. Both the office-hours and after-hours messages are plain text.
- Different form field names: change the four lead fields in Configure, for example {{ $json.body.Name }} instead of {{ $json.body.first_name }}.
- Spam filter: add or remove words in the list at the start of to_e164 in Build SMS text.
- Log every text: add a Google Sheets or CRM node after SMS result and Skipped.
- Testing with a sandbox app: change both RingCentral URLs from platform.ringcentral.com to platform.devtest.ringcentral.com.
Additional info
Troubleshooting: invalid_grant or 401 on the token step means the JWT is wrong, expired or not allowed for this app, so create a new one. unauthorized_client means the app is not set to JWT auth or the Base64 value is wrong. A 403 mentioning SMS means the app lacks the SMS scope. A 400 about the phone number means sender_number is not the JWT user's SMS number. Status Queued but no text means the number is not yet approved for business texting (10DLC). Leads in Skipped had no valid 10-digit US number or matched a spam word. Every message ends with Reply STOP to opt out; only text people who contacted you. Official guides: https://developers.ringcentral.com/guide/authentication/jwt/config-app and https://developers.ringcentral.com/guide/getting-started/create-credential