When the Somme Offensive came to its soggy and cold conclusion in November of 1916, German leaders were certainly considering the implications of US troops entering the war on the side of the Allies, as they had courted Mexico's involvement by first plotting (in true spy-like fashion) the return of General Huerta to Mexico to establish a pro-German regime, which had been foiled with his arrest in New Mexico in 1915, but a century ago actually sought permission to use a Mexican port for a U-boat base.
The Germans used spies in the US during #WW1 and, upon discovering the extent of Germany's blatant anti-American activities, such as the involvement of German embassy staff in the (failed) bombing of a bridge between Maine and New Brunswick and creating a $1,300,000 fund to be used to induce longshoremen and munitions workers to go out on strike, President Wilson's decided to publish the Secret Service's files to keep the American public duly informed of the dangers they faced.
In October 1916, U-53 stopped at Newport, Rhode Island and then sank five British and neutral ships just off American waters, all in accordance with prize rules, while American destroyers nearby rescued survivors. U-boats had been expanding their reach over the course of the war, even though their targets had been narrowed by politics.
The possibility of U-boat operations on the American side of the Atlantic having been proven, Germans began to investigate increasing their presence. They understood using American ports could be problematic, given their previous activities.
German strategists saw Mexico as a useful distraction should America enter the war. so, on 12 November 1916, the German ambassador to the United States cabled his counterpart in Mexico City, saying that “the Imperial Government [of Germany] would see with the greatest of pleasure the Mexican Government’s consent to…a [U-boat] base in its territory.”
According to Wikipedia, the Zimmermann Telegram (or Zimmermann Note) was an internal diplomatic communication issued from the German Foreign Office in January 1917 that proposed a military alliance between Germany and Mexico in the event of the United States' entering World War I against Germany.
The proposal was intercepted and decoded by British intelligence. Revelation of the contents enraged American public opinion, especially after the German Foreign Secretary Arthur Zimmermann publicly admitted the telegram was genuine on 3 March, and helped generate support for the United States declaration of war on Germany in April 1917.