Want to send your quiz leads and responses automatically to your favorite marketing software or data warehouse?

Send quiz leads & data to your favorite software with a webhook

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

Riddle has a wide range of native integrations – including Mailchimp, ActiveCampaign, Google Sheets, and more.

But if you have different software – a webhook is a great solution.

What’s a webhook? Check out this great overview – especially the difference between APIs and webhooks.

Code examples: connecting Riddle to different software

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

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