A LinkedIn lead engine for a client, part 2: building it and shipping it live
Part 2: building the client's lead automation in n8n, wiring automatic email delivery and a Listmonk newsletter sync with double opt-in, then self-hosting it live on their own server.
Part 1 covered the goal and the intake. This part is the build and the launch.
The build
I built the automation in n8n. It has three parts: a form, an email, and a newsletter sync.
The form
A hosted signup form is the entry point: name, email, and a yes or no on whether the person wants future updates. The client's LinkedIn post links straight to it. This matters, because LinkedIn has no clean way to auto-message people who comment, and tools that try to break the platform's rules and risk the account. A plain link to a form sidesteps all of that and stays safe.
Automatic email delivery
The moment the form is submitted, the workflow emails the person the resource over the client's own email sending. They have it in about a minute, with no manual step. The same step can send any resource, so the client can run different lead magnets through the same automation.
Newsletter sync with consent
Every signup is written into the client's self-hosted Listmonk. Everyone lands on a master list, so no email is ever lost. People who opt in are also added to a marketing list set to double opt-in, which means Listmonk sends its own confirmation email and adds an unsubscribe link to every campaign. Consent and opt-out are handled automatically, and the client keeps full control of the audience.
The detail that mattered
The opt-in list runs double opt-in on purpose. Subscribers confirm by email before they receive any campaign, which keeps deliverability healthy and consent clean. The master list still holds every lead regardless, so the client never loses a contact even if someone does not confirm.
Putting it online
The automation runs on the client's own server with Docker, behind a reverse proxy that gives it HTTPS on their domain. Once it was live I activated the workflow and took the form's public URL. That link is what goes under each LinkedIn post. Because it is self-hosted, the client owns the pipeline and the data end to end, with nothing sitting in a rented tool.
Testing before handover
I ran signups both ways, opt-in yes and opt-in no, and confirmed the three things that matter: the resource email arrives, every lead lands on the master list, and opted-in people get the confirmation email and join the marketing list. Duplicate signups are handled so a repeat entry never breaks a run.
Result
The client now has a repeatable loop they can run behind any post: publish, drop in the form link, and let the automation deliver the resource and grow an owned, consented newsletter list in the background. No manual sending, no third-party lock-in, and a clean list they can email whenever they have something worth saying.
Building scalable systems and developer-first tools. Lead Software Engineer at DSRPT.
Frequently asked
-
No. The post links to a signup form, which keeps the account safe and stays within LinkedIn's rules. There is no auto-DM or comment scraping.
-
Through double opt-in in Listmonk: subscribers confirm by email before receiving campaigns, and every campaign includes an unsubscribe link.
-
On the client's own server with Docker, behind a reverse proxy for HTTPS, so the client owns the data and the pipeline end to end.