Wrexham booked a place in the FA Cup first round thrashing ten man Macclesfield 5-2 at the Racecourse.
Alex Grant headed the Silkmen ahead before Wrexham's Andy Bishop struck twice and had a penalty saved after Grant was sent off.
Johnny Hunt made it 3-1, but Paul Turnbull's stunner gave the visitors hope, before Joe Clarke and Nick Rushton goals sealed victory.
Wrexham now host fellow Conference side Woking in the first round.
The match will be played on the weekend of 7, 8, 9 and 10 November.