A little over five years ago, I gave up my job as a British civil servant and a place in the U.K. immigration line to take a job as a speechwriter for José Manuel Barroso, then president of the European Commission.

It was an honor to join the president’s team — that word "president" was so hard to say no to. In my mind’s eye, I was already striding purposefully from meeting to meeting, pen in hand, ready to project European leadership on the Arab Spring, help save the eurozone, and nail the holy grail of speechwriting: a State of the Union speech.

But as we began work on the speech, the European equivalent of the U.S. president’s address to Congress, I discovered that reality was less "West Wing" and more "The Office."

The idea behind the State of the Union speech was to combine a rallying cry for Europe with to-do lists for the EU institutions. Barroso had given the first one the year before, delivering an address that had lacked everything a speechwriter aims for: glamor, brevity, levity and legitimacy. The writers knew it, and had shared their concern with communication colleagues across the Commission.

This year was going to be different — or so we told ourselves.

The drafting process got underway in May, when a group of four officials convened to begin research for this unnamed project.

What he was looking for — if he expressed it to anyone — was never communicated to me. It felt like writing for a black box.

Beyond me, the group included Commission Secretary-General Catherine Day, Barroso’s Head of Cabinet Johannes Laitenberger and the Head of the Spokespersons’ Service, Koen Doens. Other Barroso speechwriters as well as the head of the president’s think tank and former MEP Margaritis Schinas — now the Commission spokesperson — joined later meetings.

When I’d drafted something, I would file it in the system where it would ping-pong between top officials. Barroso himself didn’t appear at our meetings, except once, and then only briefly. What he was looking for — if he expressed it to anyone — was never communicated to me. It felt like writing for a black box. Once in a while, someone would come back to me with critiques or suggestions, but it was unclear if any of it came from Barroso.

Still, I consoled myself that Barroso at least allowed the existence of speechwriters. His foreign policy chief, Catherine Ashton, refused such support, preferring to jot her first draft of history in bullet points en route to the podium.

* * *

Effective speechwriting is a fine balance between drafting and inspiration. Winging it doesn't work for most speakers, but neither does overplanning.

“If you hit on the story too soon in the process, you destroy it in the end,” says Vincent Stuer, who worked on Barroso’s 2013 State of the Union speech. “It means you rewrite it so many times that even the best speech will get ruined. Catching the story is not the thing. Getting it safely to harbor is the key.”

Stuer’s advice is simple: “There should be maximum of three people holding the pen. If you don’t get that right, it will always be crap at the end.”

Team Barroso in 2011 had well over half a dozen pen-holders.

Indeed, there were so many meetings, with so many different groupings of people, that at least 16 versions of the speech were produced before the president even read one.

To help overcome Barroso's reluctance to focus on the speech — to be fair, he was quite busy helping hold the eurozone together that summer — his main advisers agreed that I could accompany him to Australia and New Zealand in early September, three weeks before the big speech, in order to pin him down for his thoughts.

My mission was an unmitigated disaster.

One low point came towards the end of the trip when, after Barroso gave a speech at a casino in Auckland to Pacific Island leaders, the motorcade left without me.

Barroso had little time for me. He stayed by himself in his first-class cabin, relegated me to the rear car of the motorcade and left me begging his security detail to slip drafts under his hotel room door.

One low point came towards the end of the trip when, after Barroso gave a speech at a casino in Auckland to Pacific Island leaders, the motorcade left without me. Clutching his discarded cue cards, I walked back alone to the hotel along the city’s hilly streets.

Barroso either willfully ignored me or didn’t seem to know what I was there for.

* * *

Turned out, getting noticed would be worse. That same trip, in the VIP lounge at Singapore airport, I tried to corner Barroso on the speech but he didn’t want to talk. He instead wanted me to research links between his family and a wine region in Australia called the Barossa Valley. There being no such link, I produced a list of “10 things you don’t know about Australia” to distract and amuse him. He was not amused.

Left alone in the VIP suite as Barroso met with the Singaporean prime minister in another suite, I thought there was no point in writing yet another draft of the speech. So I decided instead to take a bath in Barroso’s private bathroom, the only one available, to refresh after the 12-hour flight from Europe. There was just one problem: After I was done, the bathtub refused to drain.

I desperately called in hotel staff, trying to express in the strongest possible terms that the water had to leave the bathtub. We failed, and Barroso returned to a tub full of soapy bathwater.

For four months, I had seen people come and go from the core speechwriting group, invited and disinvited from meetings, as they came in and out of favor.

This time, it was my turn be disinvited to the next State of the Union meeting. I returned to Brussels empty-handed and Barroso never spoke to me again. I was left to tweet bits from the televised speech from inside my gray Brussels office until my boss eventually put me out of my misery and told me to find another job.

So, on Wednesday, if you hear Jean-Claude Juncker going off-script in the 2016 State of the Union or see a young suited figure grimace at the edge of the stage — spare a thought for them. That could be a lonely speechwriter, wondering whether they'll ever get it right.

Ryan Heath, senior EU correspondent at POLITICO, writes the Brussels Playbook. He has written two books, including "Please Just F* Off, It's Our Turn Now," and was speechwriter for Barroso and former Commission Vice President Neelie Kroes.