From April 16 to June 1918, he worked as the First Secretary of the Plenipotentiary Representation of the Russian Socialist Federative Soviet Republic in Germany – the first Soviet diplomatic mission abroad. In June 1918, he was recalled by the Central Committee of the Russian Communist Party (Bolsheviks) to Moscow, where since July 27, 1918, he has been working as the Secretary of the Moscow City Committee of the Russian Communist Party (Bolsheviks). Delegate to the 8th Congress of the Russian Communist Party (Bolsheviks). In September 1919, together with Felix Dzerzhinsky, he headed the City Defense Committee.