Thanks a lot Gursimran. . Our next virtual event for the India Virtual User Group is on July 2nd (Tuesday), where the topic of discussion is " Connecting Your Tech Stack To Power Marketo". Would love to have you in our virtual event. Details for the event are here - Video Link : 2799
Best Always,
Karan Hari
Great article - nice step by step details!
Thank you, Jo Pittsβ. Glad you find it useful.
We are looking to do this, but we want two different types of alerts (differentiated by a field called "MQL Type") with different fields in the alert and ideally a different icon in the Slackbot. Do you know the best way to accomplish this?
Hi great post!
We have set up the Webhook as you have here, but we are getting 400 errors if there is an "&" character in any of the Marketo token values. Updating the "request token encoding" to JSON does not seem to resolve the issue. Do you have ideas of what to do to avoid these 400 errors?
, but we are getting 400 errors if there is an "&" character in any of the Marketo token values.
In fact, the problems with this tutorial go far beyond that one case!
The webhook payload recommended above is extremely flawed, as it does not take a wide variety of special characters into account. You can't not JSON-encode values and try to sneak them inside a hand-crafted JSON object. JSON doesn't work that way.
What you actually need to do is create a separate Textarea field, call it Next Slack Webhook Text or similar.
Populate that field, using a Change Data Value step, with the desired text including one or more {{lead.tokens}}:
Then your webhook payload is simply
{
"text" : {{lead.Next Slack Webhook Text}}
}
and you must set the Request Encoding to JSON.
Thanks for this tutorial! I used it for building out a Slack Alert today.
I tried the webhook with "Request Token Encoding: JSON" and "Response Format: JSON", but whenever there was a special character involved, the webhook call would fail.
However, with a combination of "Request Token Encoding: Form/Url" and "Response Format: JSON", it worked.
I also layered-in your tutorial for inserting line breaks with a {{my.linebreak}} token, which made the Slack Alert perfect!
https://blog.teknkl.com/dark-mkto-alleys-line-break-token/
This was super helpful as a new Admin for Marketo, thank you!
Thank you so much @Gursimran_Chand ! This is super helpful.
I'm also trying to figure out a way to show which campaign the lead was responded to in the Slack message. I used {{program.name}}, but it doesn't work. Anyone know which token will populate the program name to the Slack message? Thanks!