Best way to find forms on a webpage with n8n?

Hi all,

I’d like to know the best way to find forms (get the HTML content of the forms) of a webpage? Which node can I use?

The alternative could be to use beautifulsoup in Python but I’d like to know if there is a way to do that with n8n nodes?

Note that forms can look like this too:

<div class="novaform form" id="myform" novamailto="9f_L2243ETr19XVSgNWjF5EIyuvvA8BMrfpJ89SVgsI"> <input type="hidden" name="mailsubject" value="Hotel Silky Contact form"> <input type="hidden" name="formname" value="Formulaire de contact"> <input type="hidden" name="formpage" value="contact.html"><input displayname="Name" type="text" class="text" placeholder="Prénom &amp; Nom" value="" initialvalue=""> <input displayname="Email" type="text" class="text" placeholder="E-mail" value="" initialvalue=""><textarea displayname="Message" type="text" class="form-message" placeholder="Message" wrap="virtual autoempty"></textarea><label> <input displayname="Newsletter" type="checkbox" class="form-checkbox"><span>Oui, je souhaiterais recevoir les offres spéciales et newsletters par email</span> </label><div id="mysubmit" class="btn">ENVOYER</div></div>


Hi @ydd, seeing your form is wrapped in a <div> element with a form CSS class, you could use the HTML node with a CSS selector of div.form:

1 Like

Hi @MutedJam,

Thanks I’ll try that!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.