Democratic presidential candidates wave to the crowd from the stage at James Clyburn’s World Famous Fish Fry in Columbia, S.C., on June 21. (Melina Mara/The Washington Post)

When Ashley Nicole Black wanted to vent about her romantic struggles on Twitter last month, she casually joked about one presidential candidate’s policy-heavy campaign: “Do you think Elizabeth Warren has a plan to fix my love life?”

Lots of people responded, but Black, a comedian and television writer, was startled when Warren was among them. “DM me and let’s figure this out,” the Massachusetts senator tweeted at her. Two days later, Black reported back on Twitter, “Guess who’s crying and shaking and just talked to Elizabeth Warren on the phone?!?!? We have a plan to get my mom grandkids, it’s very comprehensive, and it does involve raising taxes on billionaires.”

The message was retweeted tens of thousands of times, and Warren’s supporters still cite it weeks later as a great viral moment. Still, it was not entirely impromptu. Warren spokeswoman Kristen Orthman said campaign staffers first noticed Black’s original joke, found it intriguing and brought it to the senator, who made a decision to reach out to Black.

As 23 Democratic candidates jostle for the presidential nomination, the hunt for elusive breakout opportunities is increasingly urgent, and this week’s debate will provide another opportunity to create one. But while viral moments are presented as spontaneous — and uniquely revealing about the candidates — the process can be anything but random, and the campaigns are devoting significant resources to spotting, cultivating and publicizing them.

Or in some cases, creating them outright.

After Washington Gov. Jay Inslee released a $9 trillion climate plan last month, his staffers noticed the plan had been parodied twice in one week by the Onion, a popular satirical website. They began brainstorming a “clever and self-deprecating” response in case it happened again, an aide said.

Sure enough, a week later the Onion again poked fun at Inslee, parodying his youth-friendly message by saying he had decided to run for president only after five teenagers “pressed enchanted rings together to call him into existence.”

Inslee responded quickly with a deadpan tweet: “That was supposed to be off the record.” It instantly became one of Inslee’s most popular Twitter posts; aides followed it up with a fundraising appeal, which helped push the candidate across the 65,000-donor threshold to qualify for the first Democratic debates.

Capitalizing on moments like that allows us to pull above our weight,” said Jamal Raad, a spokesman for Inslee’s campaign. “To make this work and effective, you really need to channel the governor’s voice. He’s also a grandpa that likes to joke and likes to make dad jokes. They’re grandpa jokes, really. They’re not even dad jokes.”

A good viral moment can help a candidate stand out in the sprawling field. A great one can telegraph positive qualities — humor, intelligence, compassion — in ways that reverberate far beyond the reach of, say, a coffee shop in New Hampshire.

In the best-case scenario, a single episode pushes interested voters over the fence to become full-fledged supporters.

That is why much of the first Democratic debate, on June 26 and 27, could consist largely of candidates trying to manufacture memorable moments. But they need to be careful.

“One bad viral moment can brand you,” said Meredith Conroy, a political scientist at California State University, San Bernardino. Witness Jeb Bush in 2016, gently urging a town hall crowd to “please clap” for him in the face of a soul-sucking silence. About three weeks later, he would drop out of the race.

This cycle, not having Internet-friendly moments is a handicap. “We’re in a time where there’s a premium on viral moments, and my campaign has not had one yet,” acknowledged Julián Castro, the former San Antonio mayor and U.S. housing secretary who is running for president.

Castro’s soft-spoken style may not lend itself naturally to such breakout moments. At a town hall in Flint, Mich., he spent more than an hour listening to voters’ concerns. There were no flashy theatrics, no one-line zingers — but Castro said he does not intend to change his campaigning style.

“I think the worst thing you can do is try and create one,” Castro said. “So I’m just going to be myself, and I’m confident that, as we go along in this cycle, our connecting with voters will produce those great moments on tape that will go beyond that room that we’re in.”

He added, “If you get a viral moment, it needs to reflect who you are, and it needs to be grounded in your vision for the future.”

It is a fine balance as candidates strive to create “real-life” snippets without appearing inauthentic. When Sen. Kirsten Gillibrand (D-N.Y.) posted a short video herself lifting weights in Iowa in March, some loved it, while others declared it contrived.

As it happened, that weightlifting clip was partly an effort to leverage another, unscripted moment. As the senator spoke at an Iowa restaurant in February, a customer pushed through the crowd, muttering, “Sorry, I’m just trying to get some ranch.” That video went viral, and Gillibrand in her weightlifting video referenced it by wearing a shirt saying, “Just trying to get some ranch,” to show she was in on the joke.

Campaign aides said the senator was “just being herself.” Gillibrand, who has thus far been captured sledding down a hill, playing beer pong for donations, singing a Lizzo hit and arm-wrestling a college student, may appear to be seeking out such moments, and spokesman Evan Lukaske said her staff is trying to put her in environments where she comes off well.

“She is a naturally friendly, outgoing person who is basically up for anything,” Lukaske said. “Not every candidate has those strengths.”

For lesser-known candidates, such moments can be pivotal in building name recognition. In the months after Pete Buttigieg launched his presidential exploratory committee, his communications adviser vowed to put the little-known mayor of South Bend, Ind., in front of any camera, microphone or podcast host that would have him.

“We understand that in a crowded media atmosphere and in a very crowded primary field, you need to take every opportunity and run with it,” said the adviser, Lis Smith.

The approach paid off. In four months, Buttigieg climbed from virtual unknown to prominent candidate. While Smith emphasizes none of those viral moments would have been useful if voters did not also like what Buttigieg stands for, they are what got people to pay attention in the first place.

Former Tempe Mayor Neil G. Giuliano, who remains active in Arizona Democratic circles, said he had known vaguely about Buttigieg, but it was a random Twitter video of the candidate speaking to reporters in April about the fire at Paris’s Notre Dame cathedral — in fluent French — that grabbed Giuliano’s attention.

“When he responded in French to the question about what was going on in France, it was just like, ‘Oh! Oh, okay,’ “ Giuliano said. “Like, this guy really is the real deal. He really is smart. He really does speak all those languages.”

Despite having never met Buttigieg, Giuliano hosted a fundraiser for the candidate at his home in honor of Buttigieg’s first wedding anniversary, complete with wedding cake for the guests. Giuliano said he is still considering multiple Democratic candidates, but he feels good about Buttigieg’s qualifications, as well as the viral episodes that showcase them.

“I think time and time again, with all of those different credentials, there are moments where you’re just reminded how real that capacity is,” Giuliano said. “And you move along a campaign and you add all those [moments] up, and I think it’s going to add up really well for him.”

In interviews with staffers across several campaigns, all agreed few of these viral moments would be possible without a robust campaign structure ready to spot and leverage them right away. They must be prepared to catch a wave of online goodwill that might be gone in a matter of hours — or minutes.

“We are operating so much more quickly than we have in past campaigns that I’ve been on,” said Raad, Inslee’s campaign spokesman.

When C-SPAN clips of Sen. Kamala D. Harris (D-Calif.) grilling a struggling Attorney General William P. Barr went viral one afternoon in May, her campaign circulated fundraising emails by that evening. (“The video of her questioning Barr is taking off across the Internet, and we need your help tonight,” one donor pitch stated.)

Still, at least one candidate is trying to exercise more judiciousness when it comes to going viral. Last year, former Rep. Beto O’Rourke built a formidable, if ultimately unsuccessful, campaign for U.S. Senate by crisscrossing Texas and live-streaming just about every moment of it. No road trip epiphany, parking lot skateboard break, or Willie Nelson jam session was off limits.

In January, however, when he live-streamed a visit to the dentist, he was widely lampooned for going too far. For some, it captured a broader criticism of O’Rourke as a candidate who might not have the gravitas for the presidency.

Lately O’Rourke has stopped letting the camera roll endlessly on drives or when he’s at home in El Paso, though he still livestreams formal campaign events. He has instead tried to focus on the policies he’s launching, part of an attempt to “reboot” his campaign and establish himself as a serious contender.

He is not the only one who has been accused of trying too hard. At a town hall in Des Moines in April, Aracelli “Sally” Goode, chair of the Latino caucus for the Iowa Asian and Latino Coalition PAC, asked Buttigieg about a path to citizenship for undocumented immigrants.

Their conversation, which lasted a few minutes, was conducted entirely in English. But Buttigieg, who had recently gotten a burst of attention for speaking in Norwegian to reporters from Norway, tacked on, unprompted, a brief response in Spanish.

Goode said afterward she did not doubt Buttigieg had good intentions, but wondered if he “just wanted to show me that he could speak Spanish.”

“The enunciation was good, and he did a good job, but it didn’t answer — even in Spanish, it didn’t answer my question,” Goode said. “I think he just wanted to connect with me . . . but I have always spoken English, and so that was not necessary.”

If viral moments are now at a premium, there are also a host of viral videos online on any given day, meaning they can get quickly swallowed up as the public’s attention span moves on, for better or worse.

“If Jeb had done ‘please clap’ in 2020, I think the world would make fun of him, but it wouldn’t stick around as long,” said Conroy, the political science professor. “Things that went viral in 2008 we talked about for months, and now they get like a day or two days. As a candidate, I think you can be more risk-taking in 2019, given that people find a new thing to hate the next day.”

Jenna Johnson contributed to this report.

Read more:

How to watch — and understand — the first Democratic presidential debate

She was ‘on a mission’ for ranch dressing. Not even Kirsten Gillibrand’s campaign event could stop her.

In Fox News town hall, Buttigieg calls out Tucker Carlson, Laura Ingraham as ‘not always there in good faith’