How to Extract Tracking Number from WooCommerce Notes
Have you ever found yourself in a situation where you need to extract a specific piece of information from a larger text? In this case, a tracking number from WooCommerce Customer Notes? If so, you're not alone. This is a common challenge faced by many Make.com users. But don't worry, we've got a solution for you.
The Problem
Let's say you have a note that looks something like this:
Shipped on: 2023-07-27,
Carrier: Delnext,
Tracking number: X7CYTR –
https://www.delnext.com/EN/track_your_parcel?tracking_code=X7CYTR
And you want to extract the tracking number 'X7CYTR' and add it to a field in your Google Sheets. How do you do that?
The Solution
Here's a step-by-step guide on how to solve this problem:
- Add the 'Regular Expression' module to your Make scenario.
- In the 'Regular Expression' module, use the regex pattern: Tracking number: ([A-Z0-9]+).
- Connect the input field of the 'Regular Expression' module to the string containing the text you provided.
- In the output field of the 'Regular Expression' module, you will get the extracted tracking number 'X7CYTR'.
Troubleshooting Tips
If you add the text in the text section, you should get the result. But if you add an 'order notes' map to the text section, you might get an empty output. To fix this, make sure that the 'order notes' map is correctly linked to the 'Regular Expression' module.
Conclusion
Extracting specific information from a larger text can be a daunting task, especially if you're not familiar with regular expressions. But with the right tools and a bit of patience, you can easily solve this problem. We hope this guide has been helpful. Happy Making!
You do have further questions?
Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.