Our webhook will send the quiz data to your system – for each person who completes your included lead generation form.

Here are some examples how you can use our webhook to integrate with your various data systems.

Check out our blog post if you’d like some background info on how our webhook works. 

The following code snippets are just extracts and not working examples. You can find the complete repository with working code on GitHub.

Simple logger:



SwiftMailer (examples for native PHP mailer and PHPMailer are included):


$message = Swift_Message::newInstance()
        ->setFrom(array($fromMail => $fromName))
        ->setTo(array($toMail => $toName))
        ->addPart(getMailBody($riddle), 'text/html');

$transport = Swift_MailTransport::newInstance();

$mailer = Swift_Mailer::newInstance($transport);

Send riddle data to your Google Spreadsheet Document (although you can also use our native Google Doc integration):


$client = new Google_Client();
putenv('GOOGLE_APPLICATION_CREDENTIALS=' . $authConfigFile);

if ($client->isAccessTokenExpired()) {

$riddleData = new RiddleData(file_get_contents('php://input'));
$riddleSpreadsheet = new RiddleGoogleSpreadsheet($client, $spreadsheetId, $worksheatId);


Leave a Comment

Scroll to Top