I just received a letter from a friend saying he's coming to see me next week.

Literal

Next-week me [to-に] meet [to-に] come-[quotative-と] written-is [attributive-てある] friend from [possessive-の] letter [object-を], just receive-just-did.

A complex multi-clause sentence. ~と書いてある ('it is written that') is a set pattern for quoted written content. The whole phrase 来週私に会いに来ると書いてある friend-からの手紙 is a long relative clause modifying 手紙 ('letter'). ちょうど...たところ ('just did X, just now') is a temporal close-to-present pattern. Multi-layered clauses like this are typical in written Japanese.