For all the President's bombast, Sir Kim knew he was nervous. He was excited about seeing the Queen again – they had met for the first time almost exactly a year earlier – but had been fretting about messing up.
Last time, he had been accused of various gaffes, and he was 'worried about getting the protocol right', Sir Kim later reported.
The Ambassador knew that Her Majesty would take any minor slips in her stride. He was much more concerned about the President meeting Prince Charles.
The President and the heir to the throne did not see eye-to-eye over the environment. What if they had some embarrassing row?
Then there was the diplomatic minefield posed by the looming Tory Party leadership contest. Mrs May was on her way out, and the President would have to decide which of the dozen or so MPs vying for her job he should take time to meet. What if he backed the wrong horse?
Furthermore, there were difficult discussions looming over Chinese telecoms giant Huawei. The President was annoyed by the UK's refusal to cut ties with the company. It could be awkward.
Greatly to Sir Kim's relief, however, everything went to plan.
From his splendid official residence on Massachusetts Avenue in Washington DC – once described as 'Downton Abbey on the Potomac' – Sir Kim reflected on what had been achieved.
He penned a long diplomatic telegram on June 17 on the 'impressions and implications' of the State visit. The memo was sent at 2.15am, UK time, guaranteeing that it would be read at the beginning of the working day in London.
'With this unorthodox President, there were genuine risks… In the event, the gamble paid [off] handsomely,' he wrote in the cable that was sent to No 10 and senior officials across Whitehall.
Though Trump was now 'used to being feted by foreign governments,' the State visit was 'an honour that no other country can match' and Trump had 'revelled in every element of it'.
'The President knew from the outset that it amounted to genuinely special treatment…. Although initially worried about getting the protocol right, he became more relaxed as it progressed; and by the end, he could not have been happier or more fulsome in his assessment,' Sir Kim wrote in the telegram.
According to the Ambassador, the highlight for the President had been the 'extensive personal engagement' with the Queen: at a private lunch, at a glittering State banquet, and at the D-Day commemorations in Portsmouth.
However, he had also got on surprisingly well with Charles and Camilla. Trump 'seemed to deeply appreciate' the effort the Prince of Wales and the Duchess of Cornwall made. 'I think the Prince of Wales, despite differing views on climate change, established an open and easy relationship with the President,' he wrote.
Throughout the visit, Sir Kim had also been conscious of the need to keep Trump's aides happy. The President had travelled with a huge entourage, all of whom needed to be looked after. That had gone equally well.
'His team were also dazzled, telling us that this had been a visit like no other – the hottest ticket of their careers,' he reported.