Have Toyota Questions? Ask a Mechanic for Answers ASAP
Thanks for posting
The relay is a very possible cause for intermittent a/c operation and a relatively easy and inexpensive fix, it's available from aftermarket sources for around $20.00 so it's worth a try before going into this deeper.
It's located in the fuse panel under the hood near the battery , the relays are located as per diagram inside the fuse cover, look for the MG/CL relay, give that a try, it's actually a not uncommon issue on these model Corollas, good luck and let me know if you should need additional assistance with this.