The relation between level lines of Gaussian free fields (GFF) and SLE(4)-type curves was discovered by O. Schramm and S. Sheffield. A weak interpretation of this relation is the existence of a coupling of the GFF and a random curve, in which the curve behaves like a level line of the field. In the present paper we study these couplings for the free field with different boundary conditions. We provide a unified way to determine the law of the curve (i.e. to compute the driving process of the Loewner chain) given boundary conditions of the field, and to prove existence of the coupling. The proof is reduced to the verification of two simple properties of the mean and covariance of the field, which always relies on Hadamard's formula and properties of harmonic functions. Examples include combinations of Dirichlet, Neumann and Riemann-Hilbert boundary conditions. In doubly connected domains, the standard annulus SLE(4) is coupled with a compactified GFF obeying Neumann boundary conditions on the inner boundary. We also consider variants of annulus SLE coupled with free fields having other natural boundary conditions. These include boundary conditions leading to curves connecting two points on different boundary components with prescribed winding as well as those recently proposed by C. Hagendorf, M. Bauer and D. Bernard.