The notorious hacker collective WikiLeaks dumped a massive trove of e-mails from the Democratic National Committee onto the Web Friday just as Hillary Clinton was preparing to celebrate her presidential nomination at the Democratic convention next week.

In the thousands of internal e-mails, it was revealed that a Democratic Party official tried to use Bernie Sanders’ supposed religious beliefs to derail his presidential campaign; one staffer pitched an idea for a phony sexist Trump ad and DNC Chair Debbie Wasserman Schultz tried to score a staggering seven tickets to the Broadway smash “Hamilton.”

BURNING BERNIE

The suggestion of going after Sanders based on religion was included in one of 19,252 ­e-mails.

In one message dated May 5, 2016, with the subject line “No s–t,” the chief financial officer of the Democratic National Committee, Brad Marshall, plotted how to portray Sanders, who was raised Jewish in Brooklyn, as an atheist.

“It might [make] no difference, but for KY and WVA can we get someone to ask his belief,” Marshall wrote, apparently referring to Sanders and upcoming Kentucky and West Virginia primaries.

“My Southern Baptist peeps would draw a big difference between a Jew and an atheist.” - DNC official Brad Marshall

“Does he believe in a God. He had skated on saying he has a Jewish heritage,’’ Marshall asked.

“I think I read he is an atheist.”

“This could make several points difference with my peeps. My Southern Baptist peeps would draw a big difference between a Jew and atheist.”

The chief executive officer at the DNC, Amy Dacey, responded with a single word: “Amen.”

Marshall told The Intercept that he didn’t recall the sleazy e-mail.

But then he claimed it wasn’t an attempted hit job on Sanders.

“I can say it would not have been Sanders. It would probably be about a surrogate,” Marshall told the Web site.

He did not explain why the DNC would try to slime a Sanders surrogate.

NB-SEETHING

The DNC was supposed to be neutral in the primary between Clinton and the Vermont senator.

But the e-mails confirm the party establishment was in the tank for Clinton long before the primaries were decided.

And top DNC officials were not happy when they were called out for taking sides.

Wasserman Schultz sent an ­e-mail to NBC anchor Chuck Todd complaining about MSNBC’s “Morning Joe” co-host Mika Brzezinski, who was calling for her to resign for taking sides in an intra-party battle.

The subject line read: “Chuck, this must stop!”

In another e-mail, dated May 21, 2016, DNC press secretary Mark Paustenbach wrote to communications director Luis Miranda suggesting they plant a story that the Sanders campaign was in chaos.

“Specifically, [Wasserman Schultz] had to call Bernie directly in order to get the campaign to do things because they’d either ignored or forgotten something critical,” Paustenbach wrote.

“It’s not a DNC conspiracy, it’s because they never had their act together,” he wrote.

PLOT AGAINST TRUMP

In one oddball e-mail chain, a DNC deputy communications director plotted to create a fake Craigslist ad that portrayed Donald Trump as sex crazed.

Christina Freundlich — who took a smiling selfie at the scene of a tragic East Village gas explosion in March 2015 — pitched the idea for a fake employment ad for “hot” women who want to work for a Trump organization.

“Seeking staff members for multiple positions in a large, New York-based corporation known for its real estate investments, fake universities, steaks, and wine,” the copy read.

The job title was listed as “Honey Bunch (that’s what the boss will call you)” and the list of job requirements were as follows:

“No gaining weight on the job;” “Must be open to public humiliation;” and “A willingness to evaluate other women’s hotness for the boss’ satisfaction is a plus.”

The ad also noted that the boss may “greet you with a kiss on the lips or grope you under the meeting table.”

Freundlich sent the fake ad up the flagpole and got an OK from Miranda that read: “As long as all the offensive s–t is verbatim I’m fine with it.” It’s not clear if the ad ever ran.

AIN’T LIFE GRANDE

In an e-mail from Sept. 10, 2015, titled “Performer for POTUS” DNC finance director Zach Allen asks if pop star Ariana Grande can be vetted for a White House performance.

After she was probed, the answer came back, “Nope, sorry,’’ because she was once caught on video “licking other peoples’ donuts while saying she hates America.”

The e-mail said Grande’s donutgate “brought on two long YouTube apologies, but [the incident] won’t lead to criminal charges.”

ON SECOND THOUGHT

In one e-mail chain from May 12, Democrats considered allowing the lawyer representing a pedophile to host a fund-raiser with President Obama — but ultimately decided against it.

Lawyer Roy Black, who has represented Bill Clinton pal Jeffrey Epstein, a convicted pedophile, raised red flags when he underwent a thorough investigation before being given the honor of hosting Obama.

But he didn’t pass.

The White House’s Bobby Schmuck made the final call: “[N]o hosting, fine to attend.”

‘HAM’ IT UP

Wasserman Schultz asked DNC finance director Allen Zachary if he could snag seven tickets to “Hamilton,” the sold-out Broadway show, so she could celebrate a 50th birthday party with her college roommates.

“I’ve never seen an order of 7 fulfilled, I have seen as many as 4. Would you guys be willing to split up 4 and 3?” he responded May 24.

She said she would.

But it’s not clear from the exchange if Zachary came through.