A senior administration official said Trump latched on to the language because it was a recollection of his own communications.

Trump’s language mimicked a talking point Trump’s team was circulating on Wednesday. The bullet points were developed in war rooms across Washington that brought together staffers from the White House, Trump’s campaign and the Republican National Committee.

“Ambassador Sondland said in his opening remarks that he followed President Trump’s direction,” read one bullet point. “This would include, by Sondland’s own testimony, the President’s insistence on no quid pro quo.”

Another senior administration official said the White House anticipated from the start that Sondland would be the most challenging witness, given his shifting testimony in recent weeks.

“There’s been a lot of work to prepare for today and how to handle: from Hill coordination; to facts and questions; to rapid response and messaging; to what [Trump] should consider saying, and when,” the official said.

And while the president himself avoided attacking Sondland, the White House sought to undermine his testimony by saying he “acknowledged that much of his testimony was based off presumptions, guesses, inferences, beliefs and assumptions.”

And internally, White House aides said they were livid as Sondland implicated nearly every member of Trump’s inner circle, including Vice President Mike Pence, acting White House chief of staff Mick Mulvaney and Secretary of State Mike Pompeo.

A person close to the president said Trump is unsure if Democrats or Republicans are winning the public perception battle over the last two weeks.

“I think he's in a decent mood under the circumstances,” the person said. “He's frustrated and irritated but he's not overly frustrated and irritated given the situation he's in.”

Trump had been privately and publicly fuming for weeks that Republicans weren’t doing enough to defend him. But that changed last week when the hearings started and he could watch the full-tilt defenses from allies on Capitol Hill, including Reps. Devin Nunes (Calif.) and Jim Jordan (Ohio).

"I think when you're trying to issue somebody the death sentence politically, even a guy with a constitution as strong as his ... that's got to bother anyone,” said Sen. Mike Braun (R-Ind.). “But mostly they're building the case for why he's going to get re-elected because the American public doesn't like it either."

Still, Trump’s feelings have risen and fallen based on the story of the moment.

On the first day of public hearings last week, Trump was feeling more optimistic because he thought William Taylor, the top U.S. diplomat in Ukraine, was a weak opening witness, given that he had little firsthand knowledge of the situation, said two people with knowledge of the president’s thinking.

But on Friday, the second day of hearings, he felt frustrated after multiple people inside and outside the White House told him he made a mistake by criticizing Marie Yovanovitch, the former ambassador to Ukraine, as she was testifying. Democrats immediately accused him of trying to intimidate a witness.

House Democrats expect to wrap up their public Ukraine hearings on Thursday.

“There are good days. There are bad days,” said a former Trump campaign adviser. “He fully expects that. He knows in a big rolling production like this there are going to be both.”

On Wednesday, Trump’s production was all about the notes. After touring an Apple plant in Texas, the president pulled them out again when he got another question on the subject.

“I want nothing,” he said.

Nancy Cook, Meridith McGraw and Marianne LeVine contributed to this report.