Send Automatic SMS to Customers When Their Shopify Order Ships
Automatically send a personalized SMS message to customers via Twilio the moment their Shopify order is marked as fulfilled. Keep customers informed and reduce support tickets without lifting a finger.
- 1
Set up the Shopify Trigger node
Add a
Shopify Triggernode to your canvas. In its settings, connect your Shopify credentials (you will need a Shopify Custom App API key and secret). Set theTopicfield toorders/fulfilled. This node will fire every time an order ships in your store. - 2
Extract customer data with a Set node
Add a
Setnode after the Shopify Trigger. Create three fields: setcustomerNameto the expression{{$json.customer.first_name}}, setorderNumberto{{$json.order_number}}, and setcustomerPhoneto{{$json.shipping_address.phone}}. This cleans up the data before sending the SMS. - 3
Filter orders with a valid phone number using an IF node
Add an
IFnode after the Set node. Set the condition to check thatcustomerPhoneis not empty: useValue 1as{{$json.customerPhone}}, set the operator toIs Not Empty. Connect theTrueoutput to the next step so only customers with a phone number receive an SMS. - 4
Send the SMS via Twilio
Add an
HTTP Requestnode after the IF node's True branch. Set theMethodtoPOSTand theURLtohttps://api.twilio.com/2010-04-01/Accounts/YOUR_ACCOUNT_SID/Messages.json. UnderAuthentication, chooseBasic Authand enter your Twilio Account SID as the username and your Auth Token as the password. UnderBody Parameters, addToset to{{$json.customerPhone}},Fromset to your Twilio phone number (e.g.+15551234567), andBodyset toHi {{$json.customerName}}, great news! Your order #{{$json.orderNumber}} has shipped. Thank you for shopping with us!.
Frequently asked questions
What if the customer did not provide a phone number at checkout?
The IF node filters out any orders where the phone field is empty, so only customers who provided a valid phone number will receive an SMS. No errors will occur for the others.
Can I customize the SMS message text?
Yes. In the HTTP Request node's `Body` parameter, simply edit the text in the `Body` field. You can include any customer or order details available from the Shopify trigger, such as tracking numbers if your fulfillment service provides them.
Do I need a special Shopify plan to use webhooks?
Shopify webhooks are available on all paid plans. You will also need to create a Custom App inside your Shopify Admin under Settings > Apps and Sales Channels to generate the API credentials required by n8n.