It was a one time thing, although now having spoken to him once is just as bad as having an affair. this happened 4 weeks ago…
It was an affair. Sexual relations outside of a marriage is an affair.
Your husband saw it as a betrayal.
Right now you need to figure out what allowed you to make this decision.
Right now you have many thoughts on what made you do it, the real issue here is that you have to come to terms with something inside of you made you believe that having sex outside of your marriage was something acceptable.
You will be tempted to blame your husband, your marriage, stress, alcohol, and other outside influences, but the fact is non of them made you do it. Nothing, No one, was holding a gun to your head making you have sex.
First, I would seek out an individual counselor who is up on the latest research on infidelity and is willing to make you do the hard work. As to meet with ICs to talk about how they treat recovery from infidelity for the the partner who cheated. If they say anything about outside influences being the cause you find a new one. You need to find someone who is going to help you own this decision, and once you own it, you will need someone who will help you through the hard work.
Second, there are too books that you need to get:
How to Help Your Spouse Heal From Your Affair: A Compact Manual for the Unfaithful
https://www.amazon.com/dp/145055332X/refcm_sw_r_cp_api_qagUybCZE9ZZT
This one helps you understand what has happened and actions and attitudes you need to look at inside yourself. Its short, so I consider it a basic primer for the wayward to recover. Treat it like a text book. Read to learn not just to have the information. Your husband will need to see solid actions and remorse for him to even consider reconciling with you.
Not "Just Friends": Rebuilding Trust and Recovering Your Sanity After Infidelity
https://www.amazon.com/dp/0743225503/refcm_sw_r_cp_api_XagUybMQYXFG2
Not just friends is a great book about emotional affairs, and how they lead to physical affairs. It goes into depth about boundaries and how these will help you to become a safe partner by showing you how your actions toward other can be a signal that you are willing to step over the boundaries into emotional infidelity or physical infidelity.
You also understand that healing from infidelity is a 2-5 year process, and this is if you do everything nearly perfectly. I can tell you that you won't. But the problem is that innocent trust of the marital relationship is gone, and it will never come back.
If he asks you about the affair, then you need to be completely honest with him. Do not delete texts or emails that your friend has sent, and if he wants to see it let him read it. You will be tempted to minimize what you have done.
Example if you and this woman had kissed before he caught you together, then tell him it happened. Be specific, and honest no matter how bad it makes you feel. Too many waywards make the choice to lie about the sex using the excuse if they told the BS they will hurt. It will hurt them more if they find out you lied or held back information.
Most importantly, even if this is a deal breaker, embrace this healing and learning, it will make you a safe partner in any future relationships you will have. Living a honest open life is much better than living a life that is tainted with lies and deceit.
Keep posting here, and listen really listen to what people post. We all have been down the road that you are stepping on at this point. While nothing makes this journey worth the destruction, we do know that what we gain afterwards makes us better people. I wish I could have changed my life for the better without destroying my BS life, her trust in me, and the damage I did to the family.