ÃÛ¶¹ÊÓƵ

ÃÛ¶¹ÊÓƵ Marketo Engage Champion Deep Dive - Automating & Streamlining Campaign Operations Using the Marketo API

As a Marketo user one of our primary roles is to support the marketing campaigns that our marketing team runs. This means that there is a lot of repetitive work that we have to do when it comes to creating:

  • Email newsletters
  • Attribution tracking programs
  • Content performance tracking programs
  • Merging duplicates
  • Updating program period costs
  • Cloning programs

In this deep dive, we are going to show you how to get started with the Marketo API and then show you how powerful it can be for automating structured workflows so that you can spend more time doing strategic work that can move the needle rather than getting repetitive strain energy from click marathons.

Transcript
If we can go ahead and get started, as I know that there are, there’s a lot of information that we have to get through today. So thank you, everybody, for joining the November Marketo Engage champion deep dive. Before we get started with the actual presentation, we’ll just go through a few housekeeping slides and we’ll go to the next slide. As with all other Marketo engage user groups, there are a couple house. There are a few house rules that we want to make sure that the mug stay user focused, and a safe space for members of Marketing Nation to learn, network, and problem solve. So we ask that all attendees, follow these rules. No self-promotion or pitching of any kind is permission or is permitted at these events. Don’t contact people outside of the user group without their consent. I know we have a couple QR codes with information later on, so. But as long as if people haven’t given their consent, don’t contact them outside of the group. And then if Mug members share their use case at the user group, please don’t share that information without their consent.
Slide and this mug meeting is being recorded, so you do not wish to participate in a live recorded session? You can feel free. We will be distributing both the recording and the slides after today’s, meeting, so feel free to watch the recording at a later date. Do you have any questions? You can send them to advocacy@adobe.com.
And you can stay connected with the mug chapter. So if you’re here, chances are you’re already in the chapter. But in case you don’t have this bookmarked or you joined, you found the link from LinkedIn. You’ll go to Mug start marketo.com/adobe deep dive mug, and then you’d want to create the account that’s associated with your Marketo. Engage your account, your ÃÛ¶¹ÊÓƵ, or in some cases your ÃÛ¶¹ÊÓƵ ID. So go ahead and you can click Join Victor. And then you’re going to be notified of all events that we have posted.
And then we have some upcoming opportunities for chapter members. It looks like there’s just one for the remainder of the month. And that is the international Brisbane, Australia in-person meeting that is on the 21st. So you can RVP by scanning that QR code.
And that will bring me to start the presentation. I can go ahead and thank you for joining our, ÃÛ¶¹ÊÓƵ, Marketo engage deep dive on automating and streamlining the campaign campaign operations using the Marketo API. I’m Christiane Rhoades. I will be your moderator today. I am a marketing technology director at CNI and I have been using Marketo since 2017. I’ll let Lucas and Tyron introduce themselves and get started.
All right. Thank you Kristen. Hello everyone I’m Lucas. I’m a director of AI and automation at Revenue Force.
I’m a very big fan of the API. I see that I did my first API call before I even sent my first email from Marketo. So I’m working on the API, like, forever. To be honest, my first project was with the API and not like with emails or communications, and this matches a lot with my background as applied mathematician, applied and computational mathematician. So I come from this technical background, and I found the marketing operations a place where I can combine that with business and results. So I love this combination, and I’m speaking to all of you from Sao Paulo, Brazil. So a different time zone and a different area for all of you. And if you don’t understand anything that I say, feel free to post on the chat and I can repeat it slowly if it is any, any issue. And you can connect with me on LinkedIn by scanning that QR code, I’m giving you all my consent to reach me. Basically. And you can go Tyron.
Hey, nice to meet everyone. You also have my consent to reach out to me on LinkedIn with that QR code. I’m the marketing operations manager at Telmex. I’ve been over there for five years now and kind of contrary to Lucas, I was actually sending a lot of emails and cloning a lot of programs manually my first year with Intelex. But then I found out our engineering team was using Zapier, and I found out about the Marketo API. So that’s what led me to starting to find ways to automate a lot of the repetitive stuff I was doing. And that’s what actually informed this might have been one of the very first use cases I had for the Marketo API, what I’m about to walk through today. So I’ll give you, bit of insight into how you can streamline your operations overall using the Marketo API. I usually based in San Diego, but in Denver this week. But yeah, excited to do this presentation with you all.
So today what we’ll do, we are going to talk about how you can automate and streamline your company campaign operations using the Marketo API. You can do a lot of things with the Marketo API, but we’ll focus on campaign operations. All right. So there are many other areas that you can tackle with it. But this is going to be our focus today. And we’re going to do that by first talking. Why are API guys important then talking about what is an API and how you can get started with the Marketo API. You’re going to go through two real or use cases that I and I have implemented, and then we’ll have some time for Q&A. So kicking off with why are APIs important? So we have this small meme here for all the reason why they’re fans talking about how we want to automate stuff. And as marketing operations professionals, I think this should always be our mindset. If we have some repetitive tasks that we are doing, like every, every time, like copy and pasting copy into an email like this is not a very good use of our time. We should be focusing more on the strategic stuff and not the copy and pasting stuff all the time. So that’s why most the API is important. They will allow us to automate tasks. They will allow us to get some systems to talk to each other. So basically we have here many, many systems that we probably use every day or most of our days. And APIs are important because they are kind of the language that those systems communicate between each other. And then we will explain more of what an API actually is. But this is how I like to think. Think about it. This is the language of the machines communicating from one job to the other. And if you can get the systems to communicate, then you can take yourself out of the equations many times, like you cannot. You don’t have to be doing manual, repetitive stuff if you can like automatically receive a ticket and create a programing marketer, you don’t have to go to your template, clone it and fill the tokens. No, you can do it automatically whenever you receive a ticket, and we want you guys to learn how you can get there today.
So every system, most systems actually are built on top of APIs. They have APIs that you can connect, and by using it you automate repetitive process. And by that you save money and time. We’re talking about creating email programs about Google Sheets. And Byron did that. When I talk about all this times and money that you save Dion, before we go to what is an API. Yeah, absolutely. So I think this is within my first year, just after my first year at Telmex, I inherited the Marketo instance with 13,000 duplicates. And we’re coming up to renewal time. And obviously we all pay for our database tier sizes in Marketo. And this 13 K was pushing us over the 100 K tier. We’re still a small enough Marketo instance to Telmex.
So I had a task merging all these duplicates coming up to renewal and the prospect of clicking in the graphic interface doing this 6.5 thousand times was daunting. So I actually made a bulk merging Python scripts, which was able to merge the duplicates according to custom rules we had at our company. So if, the lead source is paid search, we want to prioritize that value over like organic if we’re merging two leads together. So we’re able to put all these custom rules in place. And this saved us from actually we were able to get below the 100 K threshold in Marketo. So it saved us, money in that sense. But it also saved us from having to get a tool like Cloud Ingo, because we were looking at having to sign a yearly contract to get their tool to bulk merge this backlog of duplicates. So it ended up ended up saving us 15 K overall in this instance. And then other automation I set up for our email newsletter templates allows people to kick click a button in a Google sheet which transfers content from a Google Sheets. It clones a email program in Marketo, and then pushes the content from the Google Sheets into the email asset in Marketo. And that saved us like 30 minutes of time from having to manually and copy and paste from the Google Sheets and take all the Dropbox images, put them in the design studio, and then put them in the email. That was all automated. And then when it came to tracking content performance, a similar process, a Google form, was filled out. The content will get uploaded from Dropbox to the design studio. The previous content program would be cloned and then, smart campaigns to be activated. So all these kind of things either saved time or money in my day to day. And as Lucas mentioned before, it allowed me to focus on more strategic things at my company where I could move the needle as opposed to manually merging duplicates or cloning programs. So that’s a real value of the API.
Yeah, there is nothing that gets me more mad than cloning a template and filling up tokens. Like those are tasks that we should not be doing. And pages here for that just save us time, focus on more strategic stuff, bring more value to the table, and also save us money as Darren also said. So with that all said, I hope all of you believe now that the API is very, very important. But what is an API? So can you explain to them? Darren. Yeah. So I’ve got the technical definition on the next slide. But to be honest, that doesn’t actually make it any more clear. So if you go so it technically stands for an application programing interface. And it’s a way for two or more computer programs to communicate with each other. So that’s like what Lucas was saying. It allows all these different SaaS companies or machines to talk to one another. But I think an analogy is the best way to describe an API. So you can think about it like a restaurant menu for a software. So when you’re looking at API docs, it’s similar to looking at a restaurant menu where you see all the dishes and you’ve got descriptions of all the dishes. And then when you actually make an API request, this is similar to you ordering a dish off the menu. Your waiter then takes it to the chef in the kitchen. The chef cooks up your meal and then it gets delivered back to your table. So that’s similar to you making an API request. The third party computer or system will carry out your actions, and then you’ll get a response back saying, hey, we carried out your actions. So this is similar to you ordering a meal from a restaurant. So that’s my favorite analogy for explaining an API. And all API structures are the same. If you go to any API docs, all the API requests have the same setup. You’ll see a URL, and the URL will be consistent across all the API calls. So when we look at the Marketo API requests later on, you’ll see they all start with your base URL, which is civic to your Marketo instance. In this case, I use the Pokemon database. This is a free open source API, and you can actually if you have postman installed on your computer, you can make requests to this API right away. And each of these has different endpoints depending on what you’re trying to achieve. So if you’re trying to look up information about a Pokemon, you use the Pokemon endpoint and you put in the Pokemon ID, or you can do the same thing. If you’re trying to look up information about berries or you’re trying to look information, trying to look up information about Pokemon moves. So that’s the structure of a typical URL for an API request. You’ve got a base URL, and you’ve got different endpoints depending on what you’re trying to achieve. So in Marketo will have endpoints for editing email assets, cloning programs and merging needs. So that’s kind of how you can imagine things in the Marketo sense.
And then there are two main request types, particularly with the Marketo API. It’s either a Get request to retrieve information from Marketo, or it’s a Post request to carry out some action within your Marketo instance. A Get request A nice analogy for this is like going to a library to ask for a specific book. You give the librarian the title and the author of the book. They go by, they go behind the scenes, they rummage around, and then they return the book to you and they give you the book. So that’s similar to making a get request, where we’ll make a get request from Marketo, let’s say, about an email asset. It’ll return all the information about that email asset to us, and then they can use this and the rest of our Python program or our Zapier workflow.
And some examples about this in the real world will be populating websites with user information. So if you log in to, I don’t know, Facebook or Google, it’s going to pull in information from their backend databases and so that it is displayed on the web page. When you log in you can see all your information there. So that’s making a Get request from their databases. Retrieving results from Google is similar, or getting the latest weather for a weather app are all examples of how your retrieving information’s from these different systems, and we can get requests.
And then a Post request. The analogy I like to use is like sending a letter to your friend. You write the address on the envelope, you drop it in a mailbox, it gets delivered by the mailman. Your friend will read the letter, carry out the actions you ask them, and then send you a letter back. So this is similar to making a Post request where you’ve got a certain URL that you’re making the Post request to a certain endpoint. The actions will get carried out in your Marketo instance. Let’s say we’re cloning a program. Then Marketo is going to send a response back to you saying, hey, I cloned that program for you. Here’s all the information about the newly cloned program. So that’s a nice analogy to imagine. A Post request is sending a letter to your friend.
And then some examples will be when someone fills out a form on your website, you can send all that information to update a database and create a new row in the database using a Post request. Or if you want to trigger a workflow to run when someone clicks by now on your website, that can trigger a whole other set of actions to be carried out using a Post request. Or what my company tell next does is we make APIs for telecoms and we have a Post request for sending SMS messages. So that’s another example of where Post requests can be used in your day to day lives. Outside of Marketo.
And if you guys are looking to get started with the Marketo API, since this is a deep dive, what Lucas and I are going to go through over the next 30 minutes or so will be a little bit more advanced. So hopefully you guys have experience with the API beforehand, but if not, there is a blog post you can check out which will introduce you to the Marketo API docs. It’ll show you about the free postman testing tool, which will allow you to make your first API requests and also teach you how to get your authentication credentials so that you let Marketo know you’ve got the necessary permission to be using the API. So I’ll walk you through making all of your first requests, and then how to transition to making them in code, and how to transition to making them in an AI pass to like Zapier. So you can check out that blog post to get started.
Because this is kind of the foundation to everything that Lucas and I will be going over in the next 30 minutes. And if you don’t have a lot of experience in the API, you don’t get scared by it. It can be a little scary when we’re getting deeper into the code and the next use cases that we’re going to share. But if you start slow with the time and documentation, it’s going to be pretty quickly since you can implement these programs, this use cases. So don’t get scared by it. We have content for everything that we are presenting. We have most of the code that we use also presented in the in this content. So it’s very, very easy for you guys to implement the use cases that we are going to share here.
So the first one we are going to talk about how to use the API to do a bulk program creation. So first things first, what is our challenge here? Challenge is that a marketer basically sent us a message that he wants to create 30 webinars for the next month, 25 actually webinars for the next month. So you’ll have 3 in 1 day. Clone a template 25 times, fill the tokens and activate all the smart campaigns, which is not the most productive way and not how you intended to spend that day. So this is where you want to get you want to create all of the 25 webinars. And once you do that with the least amount of time possible, because we know how this task can be a little boring.
So to do that, we have a blog post about it first. So if you want it after with most of the code there to, we’ll have to prepare a spreadsheet with the program names and all the tokens that we need. We use a Python script to ingest this spreadsheet and this Python script. Then we’ll clone the program, update the tokens, and activate all data mart campaigns that we need. So here we’ll go step by step in the next few slides. This is how your spreadsheet should look like. You have your program name that will be used to create the program. You have the date of the webinar that will fill up a token. We have the webinar name, the date time that it will have and and the duration too. So we have all of this that you have to be populating to populate the tokens. Then.
And first thing that you have to do is you start the script by getting your access token. Here is how you get it through code. You have the API docs link also in the slides, so you can go through it and learn the entire documentation. You also have how to get the the, the access token. And you can get the links because we are going to share the slides after. So no worries. But it’s important we be after this presentation to clone the program. We use this first we use this endpoint the market arrest asset V1 program. So what this will do is it will clone a specific program within a specific ID. So you can see in the in the dashed red lines inside there is the, the request that we are making the URL that we are calling. You can see that I highlighted 5124. This is the template from the webinar that we are cloning again and again and again 25 times. And you can use code and Zapier and other IPS solutions to make this dynamic. In this use case, we are always cloning the same one, the same webinar 25 times. But I will show you how you can make this dynamic true in his use case. And also we are setting the folder so you can go to you can look here in the second highlighted part 911. This is the folder ID that we are cloning the program to. We have to specify this on the call to. So we are saying clone program 51242 folder 9211. And we are going to call this 25 times. But we are making both of them constant, always the same. But you can make this dynamic. But these are important parameters for our use case for our for this case here.
Then after you created the program, you have to update the tokens. And you can do that by using the two endpoints that I have the same endpoint actually that I highlighted. That will first use the program ID. So when you clone the program, when you send this API call, Marketo will return to you. What is the program ID and this program ID you use here to then update the tokens using the values from the spreadsheet that you have. So in the end, you have something looking like this. You have your webinar date, your duration, your name, and your start date time. After you run this code so you don’t copy and paste it. After you update the, the tokens, the idea now is that you are going to activate your smart campaigns and you do that first you have to get these smart campaign IDs, because when you clone the program, Marketo will return to you. Okay, now we are talking about program one, two, three, four. This is the ID, but it won’t tell you the IDs of the things that are inside that program, like smart campaigns. So the first thing that you have to do is that you have to search those smart campaigns inside that program. So this is the first call that you do. And Marketo will return all the campaign IDs for you. And then you run another call to go and activate this campaigns. I think we had question here on the chat saying how you can update flows inside, smart campaigns. And the thing is that you mostly can’t update it. You can use tokens inside flows, but directly via the API you cannot update, you cannot add, for example, a change data value. Step two is my campaign. Because it has to already be there. The API doesn’t have this capability. So you can build your program. You can build your structure in order to scale that. So whenever you clone a program in Marketo, some things can automatically be updated for the new program. So for example, if you are using a trigger called fills out form in a specific page, that leaves a landing page that leaves inside your program. When your program is cloned, that web page will also change automatically if you are using a program status trigger about the program that you are in. When this program is clone that program that that trigger also change if you’re using flow steps like add to list related to a specific program, and that list lives inside that program. When you clone that program, the list will change automatically too. So basically, if you are referring directly to assets that live inside that program or program status or program member custom fields, when you clone a program, this triggers and flow steps will update automatically. So you can leverage that. When we are talking about cloning a program, but other things like fill out a form in a random page or with a specific query string, or you using a data value change as a as a trigger. This won’t leverage program cloning. Another thing that leverages program cloning are they use the is the usage of tokens in flow steps that I’m going to talk more about it, but when it comes to triggers and filters and some flow steps, sometimes you can build program templates to leverage program cloning. So sometimes you have the option of using a specific trigger, a different one. If you know that, and you prepare your templates for you for the API for leverage this program cloning, you can save more manual effort. So that happened in a project that I could use different triggers. And we selected the program data program member status change it because that would automatically update when cloned instead of added to list, which we also could use.
And finally we get all this code together and we run it for all the webinars that we have. And this is the final result that we have. We have all of the 25 programs created in Marketo easily, which are we have some benefits from this. That is not just saving time. Of course. Saving time is very, very important. So you can see the program, the tokens are filled in the gift and it looks like one smart campaign is not active. But it was just a UI issue. It was actually active. But other than just saving time, we also earn consistency with this because when you copy and pasting 25 different program names tokens for all these programs, what can happen is that you can make a mistake. Anyone can make a mistake when it comes to cloning all of this in once. So, and the program will be consistent on creating all of this programs and also filling the token with the right values. Of course, it is important that you have the right data in, otherwise the tokens will be miss miss fields. It will have wrong values, but if you have the right data in your spreadsheet, you have the right programs in Marketo, Q and faster and with more consistency. But this use case could be better. And and Darren will help us take this to the next level and a few minutes because the data source of this use case is not the best one or day to day. Who here receives a spreadsheet with all the information that they need to create a program? That’s not usually how maps works. We usually have some kind of ticketing system that we receive a ticket. It might be a Google form, it might be Zendesk, might be Jira, and we will work from that ticket.
We also have to pick the right template, as I said, like we were in this use case, always speaking the same template and the same folder to clone the program to. And in a real use. In the real world that rarely happens. We usually have to create five six programs in the same day, and they are different types of programs. They have different channels, they go in different folders. So it is important that we can automatically pick the right template and also find the right folder in our program structure. And it’s also important that we communicate with the marketing ops team that the program was created like. It’s not just about creating the program, but our team has to know that it was created and that they can test it and deploy it easily so we can make this program better. And in the second use case, Dion will walk us through how we can do it to.
Thank you Lucas. So contrary to that, overview slide we showed initially I was going to do, email newsletter population via API, but I’ll save that for another deep dive. I just wanted to expand on what Lucas presented. So Lucas’s use case is when you have a bulk program to create all at once. But I want to do more on demand and show you a process for how you could work with your with the rest of your marketing team to fulfill some of their asked and use cases. So the use case I have here is your demand generation team. They want to create a paid campaign, and they want you to give them UTM parameters to use to track the campaigns performance. And they want you to set up a program in Marketo to clone a program in Marketo to track visitors to those UTM campaigns on your website. So if you go to next slide, Lucas.
There we go. So the way the flow works is there’s going to be a form submission where your demand Gen team will fill out the form with all the information about their ad campaign. This then triggers a Zapier workflow, which will create the UTM parameters to track that campaign using Google Sheets formulas. And then automation is kicked off to clone a relevant Marketo program to track those UTM parameters.
So there is a blog post for this which walks you through. There’s a YouTube video about probably 30 minutes long walk you through, and I share all the code that I’m about to go through in the in the subsequent slides, so you can copy and paste the code directly from there. So there’s no need to, you know, try and take the code down as I’m going through the next few slides.
So as I mentioned, the very first step is here’s a Google form that gets filled out. We asked them for the campaign name, the landing page that the campaign is going to point to, and whether it’s an advertising campaign or a paid search campaign, if they select paid search, we then ask them the next field is a Bing is a Google is a DuckDuckGo. If it’s advertising, we ask them, is it LinkedIn, is it Facebook? Is this Reddit, etc. so when they fill out this form, this then triggers a Zapier workflow to run on. The very first step of this is a new row will get created in a Google sheet. So if you go to next slide. Lukas. So these app gets triggered will get a new row from that Google form submission. And then this is going to go to another Google Sheet we have where all the form fill information will get submitted. And then based on whether they selected advertising or paid search, we then have Google Sheets formulas which will pick the correct UTM source, UTM medium, and then to get the UTM campaign name, we just very simply, we very simply lowercase the campaign name that they gave us and replace all the whitespace characters with underscores. Because I’m not sure if you guys are all familiar with this, but probably a lot of you are. If you have whitespace in URLs, they often get encoded as like a percentage sign 20 and it looks a bit messy. So it’s always better to replace whitespace characters with an underscore.
So using these Google Sheets formulas, we automatically generate the UTM parameters that will track this ad campaigns performance. And then the next part of this is we want to create a marketo program that will track visitors to our website and our web pages that have these UTM parameters appended. So in our Marketo instance, we have a quite a detailed folder hierarchy here where we’ve got all our paid campaigns in one folder. Then we’ve got a folder for each year, and then we’ve got a folder for each month.
So the very first part of the automation workflows to find the correct folder, the latest month folder that we want to create our tracking program within.
So the very first request we’re going to make.
Oh is obviously get our access token first. That’s essential. So we make a request to get our authentication credentials. And that bearer token will last for a maximum of 3600 seconds. But once we have that token we’re then going to see if the year campaign already exists. So in this case, we’re looking for the 2021 paid campaigns folder. And we’re checking the current year. So we do like DateTime update time now to get the current year. And then we’re checking if that folder already exists with that request URL we’re going to make is in that red box. So we’re seeing those 2021 paid campaigns folder already exist. So we’re going to do a search for this. And then if no assets are found for the given search criteria, if that comes back in the response, that means that the folder does not yet exist. And we need to create it. So then we’re going to make a request to this other end point in the red box to create the 2021 Paid campaigns folder. So the payload parameter just above it there we’re going to set the name of the program, which is going to be 2021 paid campaigns, and the parent folder, which is going to contain the 2021 paid campaigns folder that is going to be defined just above it there where the ID is 2154 and it’s of the type folder. And I can hardcode this in because it’s going to be always going to put our paid campaigns in this paid campaign tracking folder, so I can hardcode in what the ideas of that folder. So that’s always going to be the parent. We have the name and we URL encode these because when you’re making API requests, whitespace characters can cause your requests to break. So in the case and in this example here we do have whitespace characters in the names of our programs. So we have to early encode them. So the request break. So that’s what that URL lib dot pass is doing.
So we either find the existing year folder or we create it and we return the id.
And then it’s a very similar process. Once we have the year folder to find the current month folder. So if you go to the next slide, Lucas. So we’re just going to use that exact same API request before where at this time we know the naming structure. We know it’s going to be year hyphen month month. So we’re going to guess that format. We’re going to get the year put in a hyphen and then get the month. And then we’re going to search to see if that folder already exists. And then same as before. If no assets are found for given search criteria, if that gets returned, we know the one folder doesn’t exist, so we need to create it.
And that’s what’s covered on the next slide. It’s the same as before. In this case the parent folder is going to be the yearly folder that we just created in the previous step. So we’re going to pull in the parent ID as an input to this program. So we’re going to create a new Monte folder within that yearly folder and return the ID.
And then the next part of this is we want to find the latest Marketo program for a particular subchannel. So if it’s paid search Google. We want to find the most recently created program we have in Marketo that tracks our Google campaigns. And we’re going to get the most recent one, because it’s most likely that this is the most up to date one and the one we should be cloning. And similarly, if this is advertising Facebook, which we try and find the most recent Facebook program in Marketo.
So in this case we’re making a Get request here. And we’re specifying that we want to look back a year in time. So you can see that we set the earliest updated parameter to one year in the past. And then we set the latest updated that to be today. And we’re going to return a maximum of 200 programs. So we make this request to get the 200 programs we’ve created over the past year.
And then there’s a little bit of formatting here, basically just to map what we get from the Google form to what we actually call the things from our kettles of it’s advertising in the Google form, or paid underscore search, paid underscore search in the Google form, we actually call those digital advertising and paid search that will be contained in the Marketo program name within Marketo. So that’s just a mapping that’s probably specific to my instance. You might need to do that.
But then the search string we’re going to generate the name of the Marketo program. All the Marketo programs follow the exact same. All the names follow the exact same syntax. So I’ll know what the name should look like. So I’ll put in the channel name which will either be paid search or digital advertising into the search string. And I know it will always have like 20 2411 paid search. Google will always be of that structure. So I’m going to search for that string within the 200 programs that were returned. And there’s just a bit of nuance there. If it’s a Legion program for LinkedIn or Facebook, we also include that in the Marketo program name. So that gets added to the search string. So in this way we’ll take those 200 programs that were created over the past year. And we’ll search them for the latest paid search Google program that was created.
And then we’re going to return that program ID or the default. If we don’t find the latest paid search Google program or advertising Facebook, we’re just going to default to cloning, a default program, which in my case is like a paid search, Google brand, program that will always clone. So that’s the fallback in case we don’t find the latest program.
And then the final part of this is we know the program we want to clone. So let’s go ahead and clone us. And we’re going to use that URL in the red box. It’s just a different endpoint. We know what the name of the program should be. And we specify that, near the bottom of the code down there where it’s year, month, the channel. So paid search or advertise using the platforms will be Google or Facebook.
And then we’re going to create the program and it will return the program ID.
But a little bit of a nuance with Zapier. That’s a bit of a pain is it gives you a 32nd timeout. So you might not have this if you’re doing this in a different Epos platform, like for keto. But the Marketo API often took longer than 30s to return the response back to Zapier. So Zapier would think the request failed, and the rest of this app wouldn’t progress because it thought that this program wasn’t cloned. But it’s just because Marketo took longer than 30s to return the response, and the program was cloned successfully. So the way I dealt with that is if we go to the next one, even though the previous step did return the program ID, we can’t depend on that being marked as successful in Zapier. So what I actually had to do is create a different or create a subsequent request in step number nine here to get the new program ID, because I know what the name of the program should be, because I defined that when I was cloning ES. So I just do a search for that because I know it was cloned successfully. I’m just going to search for that now in step number nine. So if you go to that next slide, Lucas.
So in this case we’re just going to search for that program name that we know we cloned in step number eight. And we’re going to guess the program ID that way. And we’re going to use this program ID in the subsequent steps.
And as Lucas mentioned before, unfortunately there isn’t a way to update smart campaign flows via API. But the workaround for this is if you’re using change data values, you can update program tokens via API, and if you use these program tokens within your flow, that’s kind of a hacky workaround for updating your flows in Marketo. So in this case, when someone comes in to the Smac campaign, we want to update all their first touch attribution fields. So we want to update their person source lead source detail and these three UTM fields. And these are all set to their equivalent program tokens. So we want to update these tokens when we create the program in Marketo.
So the request to do this or the URL we’re going to hit is in the red box again. And then we define all the token names that we want to update.
And then we just have a loop down the very bottom which is going to take all our input token values which are supplied as an input to zap here. So you can see we’re passing in the lead source detail on the right hand side of the screen and passing in the lead source, we’re passing in the query string.
And from the query string we can get what the UTM source, medium and campaign should be. So we’re like passing at all the values. And then in the for loop we’re going to make five API requests. So that URL in the red box and update each one of those five tokens in the program with the value they should have that was supplied as the input to this up here step.
And similarly to flows, you can’t update smart lists via API either. But we want to make this as easy as possible. So when someone comes in there’s a JIRA ticket that will be created at the very end that I’ll show you. But when someone comes in to manually activate all these campaigns later, I want to make it as easy as possible for them. So I put the query string in the smart campaign description. So it’s very easy for them to copy the UTM campaign parameter from the description and then come in to the smart list and then just paste that value in, because this needs to be changed, for each attribution program that’s created. So I just want to make that manual process as easy as possible.
So to facilitate that, I’m going to make a request to update each of those smart campaign descriptions with the description. So the first part of it is we want to get all the smart campaigns that exist underneath the program. So we’re going to specify the program ID that we want to search within. And then we’re going to make a request to get all the smart campaigns underneath that program, and return all those smart campaign IDs.
And then in the next step, once we have all those Smart campaign IDs as an input to this program, we’re then going to loop through all those IDs and make the request to the URL shown in the red box. We’re going to make that for each of the smart campaigns, to update the description of the Smart campaign to be equal to the query string parameter that this Marketo program was set up to track.
So then at the very end of us, we’re going to create a Jira ticket. We use Jira and my company to kind of track our work. But you could use any other, you know, Kanban software to do this, but you’re going to do a ticket which will contain the campaign, the landing page that’s pointing to so that conform that was filled out at the very start. It’s going to contain a link to the Marketo program that was just cloned. It’s going to create it’s going to contain links to any other assets you think are useful, like the UTM builder, Google Sheets. And you can also automate it. So a link to this Geo ticket will get posted in the slack channel. And you can tag relevant people. So then they can just click on a link to the JIRA ticket. Come in here. They’ve got a link to the Marketo program. They can open that up. They can manually copy and paste the UTM campaign parameter from the Smart campaign description and put it in the smart list and then activate all the smart campaigns. So we try to make this process, requires little manual work as possible and make it as easy. So if there is manual work that needs to be done, we can like simplify that for them. So they can just click on the geo tick and go where they need to go. So yeah that’s that’s it for this use case. We do have some other ones. Hopefully this is kind of got you thinking about how you can streamline some repetitive and well structured workflows you have. The more well structured the workflow, the easier it is to automate. And we’ve hopefully also showed you how you can make it easy if there is manual work that needs to be done by putting it in a JIRA ticket and then alerting people via slack and linking to the relevant Marketo assets to make that easier. So hopefully this has got you thinking. And then if you’re looking for further inspiration, we’ve got six different use cases here. Three of which Lucas will walk you through.
All right. Yeah, I added three here. The first one is how you can use the API to revert data changes. So in case you’ve made a bad listing for it and you want to revert the data as quickly as possible, here you have this use case and all the code for it. We have also the use case for deduplication. So merging leads. The theorem said in the beginning how that can cause a lot of money and be very hard to do using the user interface. So you can use the API for this too. And there is another use case that I call I see also the reason that you use the API to connect Marketo with AI to explain to a salesperson why lead Mql. So these are other three use cases that you have with AI APIs that you can use in our day to day to streamline your work or get more value from your Marketo instance.
And then what was mentioned percent on this time, but I’ll save for a future. Deep dive is email newsletter automation how you can let your product marketing managers fill out a Google Sheet template for your newsletter, and then when they click a submit button, that will cause a Google App script to send all that information to Zapier. And then Zapier will clone a newsletter program and populate the email asset with all the content from the Google Sheets. Another example is if you have historic paid campaign costs and you want to upload those into their corresponding Marketo program so you can do cost per acquisition in Marketo, then I’ve got a script here which will allow you to import all those costs and then assign them to the period costs across all the relevant Marketo programs.
And the last one is how similar to the workflow I just showed you there, a Google form can be filled out where they’ll link to a Dropbox link for like an e-book, or like a fact sheet that will trigger a Zapier workflow, or that e-book or fact sheet will get uploaded to the design studio, and then we’ll clone a content performance tracking program that will track the performance of people visiting this asset, or filling out a form to look at this asset. So these are some other ways, in which Lucas and I have used the API to streamline workflows. But you can take a look at these blog posts here and hopefully they inspire you. And if you have any questions, feel free. Feel free to follow up with either of us on LinkedIn. And if you like any of these use cases very much, even before you read it, post here in the chat that you really want to deep dive about it so we can bring that up the following month or in the future. So, we are here for you. With that, I think we can go to Q&A, right? Yeah, we do have quite a few questions. If one of the first questions, if I don’t have Xavier, is there another environment you recommend using to interact with the Marketo API? It depends on your use case. So if you’re doing things in bulk, like if you’re merging 13,000 duplicates or like Lewis Lucas’s example where you want to clone 30 programs, you can use any environment, any coding environment to run that script. So could be Visual Studios, it could be PyCharm. But if you want to do things on a triggered basis, like when a Google form gets submitted, then it’s easier to use something like Zapier or Keto or some other Epos tool that allows you to make the API requests either using like webhooks or Http actions, or if they allow you to have like code steps within the Epos workflow.
Now, in the past, I’ve used more, with Carol, and I think it works really well with the Marketo API. They already have some native stuff that will save you time. Someone also asked about Microsoft apps. I did use a little Power automate. I think it’s a little harder to integrate well, but it also works. You can use that, but it has less native features. It takes a little more effort to do stuff like parsing data and all of that that comes native. With. Zapier or work auto and those more well-established tools.
For UTM values, is there any difference in using an underscore or any difference in using an underscore or hyphen? So you would mentioned using underscores, but could you use a hyphen instead? Absolutely. Yep. No difference. Both works. Okay. And how do you manage the API usage with all of these various tasks? Are there any considerations and limitations when it comes to marketplace API call allowance? Would you, Lucas, be able to share going to Admin Web Services to show people how they can see their day by day breakdown of API requests? I can log in to Marketo instance where with while we speak, but it takes me a few minutes. If you can entertain everyone I know. The. Debate basically is Lucas is going to show you how you can see a view where you can see the API calls used for every service using the API every day. And the recommendation is that you create a launch point service for each service that needs access to the API. So if you have an integration with Domo or Power BI that will have its own launch point service, if you have an integration with Zapier, it will have its own service. If you have one with Ricardo, it will have its own service because this makes it very easy to see which service is using, API calls in your instance. And it’s very easy to say, hey, Zapier is causing us to exceed our daily API quota. Let’s see, can we optimize our workflow? So we’re using less API calls and Zapier? I had a horrific experience where it looked like Zapier was using all our API calls, but it turns out someone was using the Zapier service within Domo.
And there’s actually Domo using all the API calls, but it was masquerading as Zapier, so that made it very hard to debug, and fix the issue. So that’s why it’s important to have a different launch point service for each API integration. Yeah. And so what I’m saying here is here we have all our land launch point. Cloud services is a sandbox. So it’s kind of a mess. But you can get how it works. And if you go here to web services and go to the request the last seven days, you can see by, by each user and you should have one user per pre-launch point service. Two so you can see that. And yeah, other way that you like, I know that it’s very this is definitely helpful to track the API calls per user. But one thing that I also think it is really pretty valuable is to build thinking of scale. So if you’re using a solution like Ricardo that doesn’t have the timeout limit that I was saying for the, for Zapier, I think it actually Ricardo has 60s instead of 30s. So basically Marketo always respond in time for Ricardo. You can, for example, start the program ID in a table, and then you can go through that table instead of doing another API call. So this way you’re saving a call every time you need to find a program ID and this type of thing, you can build your systems thinking about scale. So this way you don’t have to always be calling the API again and again and again.
And this is helpful. And if even using scale, you can sort of some things you could do via the bulk API instead of the rest one, like massive lead imports could be used done via the bulk one. That will also help you manage your limits and not reach them. And if you’re still reaching them using all this, this, these ideas, then you need to go to Marketo Support to try to improve your limit.
And then after webinars are over, how do you deactivate them so that you can clean up? All right. Actually did that not a long ago. Like three months ago. The same way that you can activate smart campaigns, you can deactivate them via the API. So you can have like a workflow schedule to run every time, a webinar passes, you can deactivate all the smart campaigns, you can move, and you can even move the program to, an archive folder if you want. So you can do all of that using the API. You.
And then can you automate subject lines and snippet uploading as well? I know that subject line you can get tokens, right. But snippet I’m not completely sure. Some. Do you know that. Byron snippets I’m not so sure, but I know when creating emails and updating emails for fire API, you can set the subject line directly, but I’ve never tried with snippets. Yeah, and if you don’t want to do that, you can set the subject line the token and update the token in the program chair. So subject lines defines a snippet. Maybe.
I see there’s a question about gotchas with AI pass solutions. Like one of the gotchas as I mentioned is the 32nd timeout limit when it comes to, code functions in Zapier. So that’s one limitation. You don’t have access to some custom libraries. So, Jeff, Kathleen made a marketo API library where he makes it very easy to interact with the API, but you can’t access this library within Spears and Python. You can’t actually import it. So that’s another restriction of using an AI pass tool.
Can you think of any others? Lucas. I would normally think of the pricing structure too. So there are some, I every high pass is priced in a different way, and there are ones that are priced like by running a program, running a flow. So if you have like a very easy to be match condition, then then you filter out like latest created. And if A has a specific property, you run the Pro the flow them that might be triggering your flow many and many times unnecessarily. And that will probably bring our price up unnecessarily too, because they’re not really using it, they’re just triggering it for nothing. So be aware of the pricing structures. You know how you build it to so your price doesn’t skyrocket.
And I also will say to anyone who’s, like, a little bit intimidated by all the screenshots of the code and the API requests, ChatGPT is excellent. Giving you Python code to make my API requests, and it requires very little intervention. It usually runs straight away. So don’t be afraid of saying, hey. ChatGPT. I’d like a Python script to use my API to do x, y, and z, and they’ll usually work right off the bat. And if not, you could pass any error messages you’re getting in into the chat and then they’ll say, oh, sorry, that was an oversight of mine. Here’s the corrected code. So you can kind of work with iterate with this and paste in your errors and eventually you’ll get working code. So, ChatGPT has made it easier than ever to make Marketo API requests.
You think those were all, the questions that I saw? I know there was a question, one question in there about the roadmap, and I don’t know that any of us have any any insider information on what’s going on on the roadmap, unfortunately. So we wouldn’t be able to comment on that. But. If you have information, please share in the chat. We are also curious about it.
With just like three minutes left, any kind of last thing, any quick tips or anything you want to provide for folks on the call? I’d say take a look at, if you’re a new API, take a look at that quick start guide to see how you can start making your first requests in postman, and then take a look at, those six blog posts we gave to see if can get inspiration and ideas for how you could automate your own workflows, and then hopefully sit down and think about any structure to repetitive workflows you have, and start thinking about how you could use any Epos tool you already have, along with the Marketo API, Google Forms, Google Sheets, whatever to try and automate the process.
Let’s say that’s my advice. Anything you have, Lucas. Mine is not to be afraid. When you look through a lot of code and you’re not proficient at developing you, you’re getting a little afraid like it is. It seems to be a lot, but I promise is promise for you guys that that it’s not a lot. We have a lot of resources that I share. This we shared with all of you that you can go through. As Tyrone said, ChatGPT is great to write code to, so you can use that to help you. And there is a lot of research resources around Python, C and all other programing languages on the internet that you can learn and like. Try to start slow. Don’t try to build a whole automation in the beginning. If you’re starting like try to on one program to one folder, and that will already make you feel like you’re a magician and that you can the amazing things with the API. And then you o update one token and you activate one’s mind campaign and all of a sudden you like you are addicted to it. So start slow and you will get there. Don’t be afraid of it.
Great. Thank you everybody for attending. Thank you Lucas and Tyron for a great presentation. And as mentioned, we will send out both the slides and the recording. As soon as they are ready.
Thank you everyone. Thank you everyone. No worries. See you all later.

Key Takeaways

  • Focus The session focused on automating and streamlining campaign operations using the Marketo API.
  • API Importance APIs are crucial for automating repetitive tasks, allowing systems to communicate, and saving time and money.API Basics** Explanation of what an * **API is, including the difference between Get and Post requests, and how they function.

Use Cases

  • Bulk Program Creation Using a Python script to clone programs, update tokens, and activate smart campaigns. ​
  • On-Demand Program Creation Using Zapier to automate the creation of Marketo programs based on form submissions, including generating UTM parameters and creating * **JIRA tickets for tracking.
  • API Management Tips on managing API usage, including creating separate launch point services for different integrations and monitoring API call usage.Tools and * Resources Recommendations for using tools like Postman for testing API requests and ChatGPT for generating Python code.
  • Additional Use Cases Mention of other potential use cases for the Marketo API, such as reverting data changes, deduplication, and connecting Marketo with AI.
recommendation-more-help
7bb6a267-e711-49b2-a29d-57541f7f2fe8