Add Subscriber from Capture Form

Brian Hazel

New Member
Hello,

I've read through multiple forum posts of adding a subscriber via API, but I believe there is a small part I'm missing that's not adding the subscriber to the list.

On the capture form I have the subscriber input their email -
<form onsubmit="" action="" method="post" accept-charset="utf-8">
<div class="form-group">
<label>Email <span class="required">*</span></label>
<input data-sync="input-81592" class="form-control" name="EMAIL" placeholder="" value="" required="" type="text">
</div>
</form>

Then the funnel(ClickFunnels) sends the subscriber email via a Webhook to my MailWizz Webhook URL using Zapier in the JSON Format.

<?php
require_once dirname(__FILE__) . '/setup.php';
if (!empty($_POST)) {
$listUid = '[LIST_UNIQUE_ID]';// you'll take this from your customers area, in list overview from the address bar.
$endpoint = new MailWizzApi_Endpoint_ListSubscribers();
$response = $endpoint->create($listUid, array(
'EMAIL' => isset($_POST['EMAIL']) ? $_POST['EMAIL'] : null,
));
$response = $response->body;

// if the returned status is success, we are done.
if ($response->itemAt('status') == 'success') {
exit(MailWizzApi_Json::encode(array(
'status' => 'success',
'message' => 'Thank you for joining our email list. Please confirm your email address now!'
)));
}

// otherwise, the status is error
exit(MailWizzApi_Json::encode(array(
'status' => 'error',
'message' => $response->itemAt('error')
)));
}
?>

I've configured the setup.php also. But in the end, the subscriber is not added.
 
Not that I know of, Zapier states the test are successful along with Postman.. All I receive is "COMMENT ME TO TEST THE EXAMPLES". Not exactly sure what's missing, the 3rd Party App sends a Webhook to Zapier about the new contact and Zapier then sends the webhook in a JSON format to the URL specific for the list the subscriber is being added to, and the results are nothing.
 
Not that I know of, Zapier states the test are successful along with Postman.. All I receive is "COMMENT ME TO TEST THE EXAMPLES". Not exactly sure what's missing, the 3rd Party App sends a Webhook to Zapier about the new contact and Zapier then sends the webhook in a JSON format to the URL specific for the list the subscriber is being added to, and the results are nothing.

perhaps you can try get debug info for working/error case
from the other two instances in the flow (zapier/clickfunnels)
so that you can compare with another example (e.g. other mailer)
 
Back
Top