activecampaign-delete

ActiveCampaign Delete

Active campaign delete. In this video we’re going to cover how to delete a contact and active campaign automatically.

Now, active campaign does not have this capability built in. The obvious way to do it would be to put somebody into an automation and then delete them, but active campaign in their wisdom has not implemented that and in my opinion, the reason is you can hurt yourself, which means for instance, what if you put all of your contacts into an automation and deleted them, you probably would not be happy.

So that’s not a capability built into active campaign. However, there is a way around that and it involves web hooks. You’re going to create an automation that has a web hook that pings a script on your site, and at the very bottom there I’ve got the code that you’re going to want to copy and modify and put into your site.

So let’s dive right in. To start with, do you want to visit this site right here and this URL in particular and you’re going to want to copy all this code right here and I want to create a script on my site called delete dot PHP.

So I’ve got a file called delete dot PHP. I’m going to paste this in and I’m going to scroll up to the top and there’s three things we need to provide, the active campaign API URL and API key. And then we have to make up a secret key. And this is for your own protection. Before we do that, let me tell you why. If you go down here to the bottom, there’s a few things in here which won’t run this script unless they’re true.

In other words, there has to be an ID that’s greater than zero. The secret that you send over from active campaign has to match the one that’s in here and you can’t have an empty secret key.

Now the likelihood of some hacker figuring all this stuff out is very, very low, but it’s adjust to case type thing.

So let’s go get our active campaign URL and key and inside your active campaign account you want to go to settings, which is the little gear icon at the bottom typically. Click on developer copy of the URL, go back to your script, paste it in URL there, back to active campaign, copy the key, paste it in there and then make up a random secret key, doesn’t matter.

I’m just going to tap on the keyboard, but they need to be between those single quotes, something like that, and then save this file. Now back to active campaign and you’re going to want to create an automation. I would call it delete and in my opinion, not a bad idea to put something like a wait for five minutes.

It’s kind of a cooling off period just to make sure you act so absolutely want to do it, especially if you’re testing this out in case for whatever reason you put everybody in there and you’re like “WOOOPSS!!!”, I’m mistakenly added them on.

I don’t want to have that to happen, so I put a five minutes wait there. Then the next thing you want to do is you want to click on conditions and workflow, web hook. And here’s where you want to paste in the URL that you’re sending this these people to.

So in my case, no, you have to add one more thing. Put a question Mark secret equals, and then go get your secret, which is this right here. Copy that. Come back to here, paste it just after the equal sign and click on save. And then in this automation. So let’s test this out. I’m going to add this person here.

Okay, I’m going to skip the five minute wait and show you what happens. And you know what? Before I do that, I want to keep this open. I want to keep this contact record open so it’s contact number three 10 and I’m going to skip this.

And sometimes it takes maybe a few seconds or a minute for it to actually move through. So it says it hasn’t happened. Let me refresh this screen right here. Notice it’s no longer there.

So that’s how you can delete a contact programmatically inactive campaign.

>