iMessage shipping updates for Shopify customers

Every hour, text just-shipped Shopify buyers a warm iMessage with their tracking link, so they see delivery news in the channel they actually read.

Agentic Task
LoopMessageShopifyGoogle SheetsMarketingCustomer SupportNotifications & Alerts
PromptCreate

Build me an agent workflow that texts my Shopify customers a warm, personal iMessage the moment their order actually ships. Delivery news through iMessage lands where they read, and open rates sit near 98% versus about 20% for shipping emails.

Trigger: cron, every hour.

On each run, do the following:

1. Use Shopify List Orders to pull orders that were updated in the last 90 minutes with fulfillment_status set to shipped or partial. The 90-minute window (versus the 60-minute cadence) gives a safety overlap so nothing falls between runs. Skip anything that already appears in the Google Sheet log.

2. For each candidate order, call Shopify List Fulfillments for Order to grab the carrier name, tracking number, and tracking URL. If there are multiple fulfillments, use the most recent one that has a tracking number. If no tracking number is present, skip and log as awaiting-tracking.

3. Use Shopify Get Customer to fetch the buyer's first name and phone number. Skip and log the order if there is no phone number. Convert the phone number to E.164 (with the country code and a leading plus) before handing it to LoopMessage.

4. Before sending, call LoopMessage Check Contact Status. If the contact is unsubscribed or unknown, skip and log with that reason. Only send when the contact is subscribed.

5. Send the iMessage with LoopMessage Send Message. Keep the text under about 300 characters. Greet them by first name, reference one or two specific items from the order (use the product titles from the line items), include the tracking URL, and give a rough delivery window based on the carrier. No marketing copy, no discount codes, no extra links. Only the tracking link. Example tone: "Hi Sam, your Peak Trail cap and canvas belt just shipped via UPS and should land Tue-Thu. Track it here: <url>".

6. Append a row to the Google Sheet tracker using Google Sheets Append Values with these columns: timestamp, order_id, customer_name, phone_e164, carrier, tracking_number, loopmessage_message_id, and status (sent, skipped_opted_out, skipped_no_phone, skipped_awaiting_tracking, skipped_already_texted, or failed). This log is the dedupe source for future runs, so it must be written every time, even on skips and failures.

Constraints to bake in:

- Keep every message under about 300 characters.

- No marketing copy, discount codes, or extra links. LoopMessage rejects those on opt-in style messages. Only the carrier tracking URL is allowed.

- Phone numbers must be E.164 (leading plus, country code, no spaces or dashes).

- Respect LoopMessage's 2-minute throttle between messages to an inactive contact. If sending to many buyers on one run, pace the sends.

- Always check the Google Sheet log first with Get Values so the same order is never texted twice on a later run.

The Google Sheet should have a header row so it's easy to filter by status. Ask me for the spreadsheet id, sheet tab name, LoopMessage sender id, and Shopify shop domain when you set this up. The workflow should be defensive: any single failed order (missing tracking, bad phone, LoopMessage error) should be logged and skipped, not crash the whole run.

Additional information

What does this prompt do?
  • Scans Shopify every hour for orders that just moved to shipped and pulls the carrier and tracking number.
  • Texts each buyer a short, personal iMessage that greets them by first name, mentions what they bought, and includes the tracking link.
  • Skips anyone who has opted out or is not reachable on iMessage, so nobody gets a message they did not want.
  • Logs every send, skip, and failure to a Google Sheet, so the same order is never texted twice on a later run.
What do I need to use this?
  • A Shopify store you can connect (read access to orders, fulfillments, and customers).
  • A LoopMessage account with an active iMessage sender.
  • A Google Sheet to track which orders have already been texted.
How can I customize it?
  • Change how often it runs. Hourly by default, but you can move to every 30 minutes or once a day.
  • Rewrite the message. Adjust the greeting, tone, delivery window wording, or how many items to name.
  • Point the log at a different tracker, a different tab, or a shared team sheet.

Frequently asked questions

Why iMessage instead of email?
iMessages get opened around 98% of the time, versus roughly 20% for shipping emails. Your tracking link actually gets seen.
Will this text the same customer more than once for the same order?
No. Every send is written to your Google Sheet with the order id, and the workflow checks that log before sending. Reruns are safe.
What happens if a customer has opted out of texts?
They are skipped automatically, and the skip is written to the log with a reason so you have a paper trail.
Can I include a discount code in the message?
Not on this workflow. LoopMessage rejects marketing content, discount codes, and extra links on opt-in style messages. The tracking link is fine.
What if a phone number is missing or not on iMessage?
The order is skipped, logged as unreachable, and moves on. You can pull a report from the sheet later if you want to reach those buyers a different way.

Turn every Shopify shipment into a five-star moment.

Connect Shopify, LoopMessage, and Google Sheets once, and this runs every hour on its own.