Mayor Martin J. Walsh says he can work with Donald Trump despite their campaign clashes — and adds that Boston could benefit from Trump’s push to keep jobs in the United States, saying he would forge a relationship with the president-elect despite concerns over his actions during and after the campaign.

“You can’t hold grudges in this business, you just can’t — there’s a day when you need something,” Walsh said in a Herald interview yesterday, adding that he thinks Trump will also let bygones be bygones. “You can’t take it personal. I don’t think he’s going to take it personal, it doesn’t seem like it.”

And while Walsh has said he’s concerned with some of Trump’s Cabinet appointments — two weeks ago singling out Oklahoma Attorney General Scott Pruitt’s selection as head of the Environmental Protection Agency — he thinks Trump would be pragmatic in how he works with Boston and other large cities. His goals for keeping jobs from leaving the country in particular could align with Boston’s economy, Walsh said, and a successful Boston would benefit a Trump White House.

“Having companies that want to invest in cities, bring more manufacturing to cities, that’s kind of what Trump’s talking about, keeping more manufacturing in the United States of America,” Walsh said. “If companies want to stay, they want to stay in a place with a talented workforce. There’s not many more cities as talented as Boston with a workforce that educated. The White House needs cities to be successful.”

Walsh, a longtime Hillary Clinton supporter, repeatedly spoke out against Trump during the presidential campaign and last year said Trump would have to apologize for denigrating Mexican immigrants if he wanted to build a hotel in Boston. Trump fired back, saying that if Walsh did not apologize to him, “voters should vote him the hell out of office.”

Walsh said he was concerned about the “uneasy, unsettling” political climate since Trump’s election, and said the president-elect had encouraged bad behavior on the campaign trail. But Walsh said Trump is moderating his tone, and he plans to reach out to Trump after he is inaugurated next month.

Meanwhile, as Walsh prepares for his re-election campaign in 2017, he said the 2016 presidential race and Clinton’s campaign offered an important lesson: Don’t assume anything.

“You can’t take anything for granted, no matter who your opponent is,” Walsh said.

While District 7 Councilor Tito Jackson has been mentioned as a potential opponent, Jackson has not declared his candidacy. Walsh said his record would stand up against any challenger, and said he was confident about his support in minority neighborhoods.

“Go with me to Roxbury next time I go, tell me how you think the people of Roxbury feel about me,” Walsh said.