Integrations
WordPress
Send WordPress form submissions (Contact Form 7 and other form plugins) to nodenly. One from the server, with the secret key.
On WordPress, send contacts from the server with the secret key: it never reaches the visitor's browser, and your existing form plugin keeps working as it is.
1. Keep the key out of your theme
Add the secret key to wp-config.php, above the line /* That's all, stop editing! */:
define('NODENLY_SECRET_KEY', 'sk_live_YOUR_KEY');2. Contact Form 7
Add this to your child theme's functions.php or to a snippets plugin (such as Code Snippets). It runs after each form is sent, with Contact Form 7's default field names:
add_action('wpcf7_mail_sent', function ($form) {
$submission = WPCF7_Submission::get_instance();
if (!$submission) return;
$data = $submission->get_posted_data();
wp_remote_post('https://www.nodenly.com/api/v1/leads', [
'timeout' => 5,
'headers' => [
'Authorization' => 'Bearer ' . NODENLY_SECRET_KEY,
'Content-Type' => 'application/json',
],
'body' => wp_json_encode([
'name' => $data['your-name'] ?? '',
'email' => $data['your-email'] ?? '',
'message' => $data['your-message'] ?? '',
'page_url' => wp_get_referer() ?: home_url(),
'locale' => strpos(get_locale(), 'pt') === 0 ? 'pt' : 'en',
]),
]);
});If your form uses other field names, change the $data['…'] keys.
Other form plugins
Most form plugins have an "after the form is sent" hook or a "webhook" action. The idea is the same: take the submitted values and send them with wp_remote_post as above, using the secret key in the Authorization header. Fields other than name, email, phone, company and message can go in fields.
Check
Send your form once, then open Settings → Integrations → Latest requests in the panel. A refused request shows the reason (for example a missing email).