What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Integration with Marketo Through Webhook for Associate LeadsAsked by ekidman on November 13, 2013 at 07:03 PM
Has anyone successfully imported leads from a Jotform webhook into the Marketo CRM?? I can get it to work by using a custom Thank You page and including the following code:
Email: <?php echo "decodeURIComponent(\"" . rawurlencode($_POST["email"]) . "\")" ?>,
FirstName: <?php echo "decodeURIComponent(\"" . rawurlencode($_POST["name"]) . "\")" ?>,
'<?php echo hash('sha1', 'our-secret-key-here' . $_POST["email"]); ?>'
However, this is not completely ideal as I have to redirect them to a different page to make any of this happen. I'd prefer to use the default thank you page without having to redirect them. I've tried similar code with a webhook, but can't get it to work. I'm not real familiar with webhooks, but I did look at the output using http://requestb.in and attempted to use this code:
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
$result = stripslashes_deep($_REQUEST['rawRequest']);
$obj = json_decode($result, true);
$name = $obj['q1_name'];
$email = $obj['q3_email'];
to get the $name and $email variables, but nothing seemed to work. I'm completely stuck, any help would be great!
JotForm email custom thank you name Marketo Webhook
Hello, Thanks for creating a separate thread.
After researching on Marketo API, I come up with this similar to yours but with minor adjustments. You may use this code and save it as a PHP file, then you can upload it to your own server. After that, attach this file on your form as Webhook.
Please adjust the code and put your Account ID and Marketo API secret keys.
If you need further assistance, please do not hesitate to ask. Thank you
Thanks for the code. The PHP is executing perfectly, and I confirmed that it's grabbing the correct values for $theName and $theEmail by writing those variables to a file. However, the script going to Marketo doesn't seem to run. This same script runs fine when using it in a custon Thank You page - but won;t run when using the webhook. Any ideas??
Hello. Thanks for the update.
It is hard for me to test it out as Marketo does not have free trial without going into business talk with them for approval of free trial.
Can you please paste your current code you copied from the link I provided?
Please use PastieBin and post the link here on the forum. I have updated a revision of the code earlier so I am not sure if what you copied is the old one or the latest revision I made earlier before you replied.
We will wait for your reply. Thank you
I would like to add I just read this from Market API page:
"To get the API names for the fields, go to the Field Management page of the Admin section. Then click the Export Fields button. The API field names will be in that spreadsheet."
So your "Email" and "FirstName" from the code might not really be the ones used on your Marketo list
Thanks for your response. I used the exact code you have posted above. Mine is http://pastiebin.com/528556c58ec11. I'm wondering if it is something on Marketo's end... I posted a question to their forum to see if anyone over there has any idea. I'll post back if I find anything out. In the mean time, if you have any other insight, I'm willing to give it a shot.
And in response to your second response, I just double checked, and the field names are correct (FirstName and Email).
I hope you don't mind me reviving this older thread. We are trying to accomplish something similar—trying to have JotForm and Marketo communicate via a webhook, but don't have the in-house expertise to program it. Anybody out there available for help/hire? Thanks for letting me know.
We can help. However, we advise to create your own thread using this link: Contact JotForm Support. Include the required information such the codes.