This project wasn’t just about creating a contact form. The goal was to build a complete, lightweight and reliable lead collection system for a sponsored article on 4881.pl, and then deliver those leads both to the client and to the agency’s internal reporting flow.
That meant combining several parts into one working system: an iframe-embedded form, validation and source tracking, a production webhook in n8n, two Telegram notifications, and two separate Google Sheets integrations.
Context
The form had to be embedded inside an article on 4881.pl about cash loans for Ukrainians in Poland. The technical limitation was very specific: the CMS allowed only an iframe embed. In practice, this meant the entire form had to work as a standalone page inside the iframe.
At the same time, the form could not look like a large landing page. It had to stay compact, visually calm, responsive and convenient on mobile, tablet and desktop. The final result also had to fit the style of a local city portal and not visually break the article layout.
Challenges
Several tasks had to be solved at once:
- preparing a compact form version that works well inside an iframe without support from the article’s own styles,
- keeping the business logic and the required form fields intact,
- collecting tracking data correctly, including UTM parameters, gclid, fbclid, article URL and source page,
- sending data to a production n8n webhook,
- delivering lead notifications both to the client and to the agency’s internal team,
- writing lead data into two separate Google Sheets,
- preparing error handling so technical failures would also be reported via Telegram.
So this wasn’t just a form implementation. It was a compact lead infrastructure built for a specific editorial advertising format.
What we delivered
Compact iframe form
We created a new, denser and more compact version of the form using pure HTML, CSS and JavaScript with no external libraries. The form was redesigned to remain readable while taking up as little vertical space as possible inside the iframe.
The layout was optimized for two columns on larger screens and a compact mobile presentation. We also removed unnecessary external spacing, prevented horizontal scrolling and ensured the page worked correctly inside the iframe.
Form logic and validation
The required fields were preserved, including contact information, employment type, income, active loans, loan purpose and urgency. We also implemented preferred contact channels in a more compact interface.
Validation was added for required fields, a honeypot anti-spam field was implemented, and conditional logic was preserved: when the user selects email as a contact channel, the email field becomes required.
Lead source identification
A key requirement was accurate source attribution. A browser referrer alone is not always enough, so the form was prepared to receive the exact article URL through an iframe parameter and pass it further into the webhook.
This made it possible to identify not only the portal itself but the exact publication that generated the lead. In addition, the system collects UTM parameters, gclid, fbclid, page URL, page title and submission timestamp.
n8n automation
On the n8n side, we built a workflow for lead processing. It normalizes incoming data, generates a lead ID, calculates a simple priority score and prepares the lead for downstream delivery.
The lead does not go into a single channel only. The workflow supports both the client’s operational processing and the agency’s internal marketing reporting at the same time.
Telegram for the client and internal Telegram
We designed two separate Telegram message types:
- a client-facing message with the full lead details for quick follow-up,
- an internal agency message focused on source, article, UTM data and campaign context.
Both message formats were prepared with safe HTML formatting and correct handling of links. The article URL is presented as a descriptive link, Article on 4881.pl, while the spreadsheet URL remains visible as a raw open link on a separate line, which is more convenient for the client.
Two Google Sheets integrations
The workflow was configured to write lead data into two separate spreadsheets in parallel:
- the client’s spreadsheet with full lead details,
- the agency’s internal spreadsheet for simplified reporting, attribution and performance control.
The internal spreadsheet was intentionally limited to only the data really needed to quickly understand when a lead arrived, where it came from and from which article.
Error handling
A separate error handling workflow was also prepared in n8n. If any part of the automation fails, the agency team receives a Telegram notification with the workflow name, failing node, error message and execution link.
This matters because in lead systems it is not enough just to launch the process. It is equally important to detect failures quickly.
What mattered most
The biggest value of this project was combining a simple user experience with a structured and controllable backend process.
The user sees only a short, clear form inside an article. In the background, however, the system performs validation, source attribution, writes into two spreadsheets, sends two different Telegram messages and reports technical errors.
In projects like this, the real complexity is rarely just in the HTML. The main task is making sure all moving parts work together as one predictable system.
Result
The final result was a compact lead collection system for a sponsored article on 4881.pl, working as an embedded iframe form while instantly feeding both the client’s operational flow and the agency’s internal marketing flow.
The client receives each lead in Telegram and in their spreadsheet. At the same time, the agency gets an internal record with the source, campaign context and exact article. If any technical issue occurs, the system reports it separately in Telegram.
This kind of solution can be easily scaled to other articles, other forms and other advertising campaigns without rebuilding the whole process from scratch.
What the client received
In the end, the client received much more than a working form. They received a complete lead handling mechanism for editorial sponsored placement:
- a compact form embedded via iframe,
- accurate lead source identification,
- automatic записи to the client’s Google Sheet,
- instant Telegram lead notification for the client,
- separate internal logging and Telegram reporting for the agency,
- an n8n error handling workflow.
In practice, this means less manual work, better visibility of lead sources and faster reaction time to incoming enquiries.
