I'm Lucy, and I'd be happy to answer your questions today. I'm sorry to hear that this happened.
Just the fact that your son got a text asking him to get pot probably isn't enough to take the children away from you. For your husband to succeed, he would need some evidence that you're giving drugs to the children, helping them get drugs, supporting your son's drug use, using drugs in front of your son, or something like that. The text you've described doesn't prove that you've done anything wrong. Your ex-husband should be calling the parents of whoever sent that text, not going to court.
The purpose of an emergency order is to rectify an immediate risk to your son's health and safety, and I don't see it here. If you can't care for the kids due to your surgery, that would give him a stronger argument, but that would probably only result in a temporary order.
If you have any questions or concerns about my response, please reply WITHOUT RATING. It's important that you are 100% satisfied with my courtesy and professionalism. Otherwise, please rate my service positively so I am paid for the time I spend answering questions. If you are on a mobile device, you may need to scroll to the right. There is no charge for follow-up questions. Thank you.