What the lien actually is
A mechanic's lien is a recorded claim against the property you improved, not a lawsuit by itself. Civil Code § 8400 lists who may claim: direct contractors, subcontractors, and material suppliers who furnished labor or materials. The lien is how California lets the job itself secure payment when an owner or upper-tier contractor does not pay.
The two clocks
If you did not contract directly with the owner, Civil Code § 8800's preliminary notice is usually due within 20 days of first furnishing. The lien itself is typically recorded in the county where the job sits within 90 days after completion — or 30 days after a valid notice of completion or cessation. Recording late does not slow the claim. It usually kills it.
What to get right on the form
Name the owner of record, describe the work actually performed, and state a good-faith amount. Overstating the claim, naming the wrong parcel, or skipping the preliminary notice when it was required are the defects that get liens expunged. Serve the recorded lien as the Code requires — recording alone is not notice to the people who can pay you.
After you record
You must start a foreclosure action within 90 days of recording unless you obtain a recorded extension. Settlement, a credit agreement, or a bond can change the path. The lien is a deadline machine: generate the notice while the dates are still in front of you, then calendar the suit date the same afternoon.