Marketo Webhooks With Marketo API

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Webhooks With Marketo API

I don't understand what you're saying stopped working.  Unless there's something buggy in your Marketo instance in particular, a loopback form post from a Marketo webhook to the same instance still works just fine.

This isn't, of course, actually using an API call (that was the open question). You're just using the standard forms endpoint (http://localhost/index.php/leadCapture/save) not an API.  And, like I said, still works.

Anonymous
Not applicable

Re: Marketo Webhooks With Marketo API

The response I got from Marketo Support:

I had a chance to speak with one of the Senior Engineers and was informed that using webhooks to POST into a Marketo Form in this fashion is no longer supported. Using a webhook in this fashion has the potential to create an infinite loop of activity and can become resource intensive.

So either it's truly no longer supported to webhook to your own instance, or they disabled it for us. Realistically I can think of a couple of ways to take an infinite loop of activity within Marketo without involving a webhook so I'm not sure why that would be a concern. I realize that it's an unsupported feature but "unsupported" shouldn't mean "kill it at random with no warning" which is what happened in our case. My ticket is still open though so maybe I'll hear more from them.

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Webhooks With Marketo API

So either it's truly no longer supported to webhook to your own instance, or they disabled it for us.

That's overly punitive, if so.  Almost bizarre given that such webhooks have not only been used in the wild for a while, but were endorsed in a blog post from 2 months ago that's still up! I know I was at a client last month and saw one that someone had implemented in the past.  I just take it as a matter of course that people still do this, even if I don't generally use it.

Realistically I can think of a couple of ways to take an infinite loop of activity within Marketo without involving a webhook so I'm not sure why that would be a concern.

I agree, I find that justification unconvincing.  But more important, all that's being addressed (if it has been disabled for your instance, it hasn't for us) is a webhook that literally uses the loopback address to post without leaving the Marketo network.  This says nothing about leaving the network and echoing the request back in, which would be extremely easy to set up.  In 5 minutes, you could put up a reverse proxy that does just that.  You can PM me about it if you want.

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Webhooks With Marketo API

Also, is it possible that there was something in your implementation that never should've worked in the first place?  I ask because you weren't using localhost in the the snippet you posted in another thread.  In this case, maybe you're seeing a coincidence: Marketo locked down communication from inside their network to the external IP of your pod/instance and thus broke your webhook, but it would still work with actual loopback.  Just an idea.

Speaking of ideas, though, why not use an Interesting Moment for this?  Or a datetime field on the lead LastCustomEvent{EventName}?

Anonymous
Not applicable

Re: Marketo Webhooks With Marketo API

Ok, quick update (I know David Horne​ found a different solution but this may help other people in the same situation. Big thanks to Sanford Whiteman​ for walking through this with me.

The following structure for a webhook appears to work (at least for now):

URL: set to http://localhost/index.php/leadCapture/save

Request type: POST

Template: include required parameters (munchkinId, formid) and any values or tokens for other fields that you want to include in the POST

Encoding: set to Form/URL

marketo webhook.png

Anonymous
Not applicable

Re: Marketo Webhooks With Marketo API

We wound up taking another route that was more scalable.  Thanks everyone for your help.  After consulting with Marketo experts we found out that webhooks do not operate in a batch function so large imports would take too long.