ActiveCampaign setup
Connect your ActiveCampaign account so your Plandalf automations can act on your contacts. When someone buys, a sequence can tag them, add them to a list or start an ActiveCampaign automation. The most common use is stopping a sales email sequence the moment someone pays: Plandalf tags the buyer, and your ActiveCampaign automation ends on that tag. When they’re refunded, another sequence can remove the tag again.
Before you start
- An ActiveCampaign account, and an ActiveCampaign user who can open Settings → Developer. On most plans that means an admin user.
- The tags, lists and automations you plan to use. The Add Tag step can also create new tags for you.
- A Plandalf checkout to connect it to, if you want purchases to reach ActiveCampaign.
Get your ActiveCampaign API URL and key
Plandalf needs two things from ActiveCampaign: your account’s API URL and your API key. Both are on the same page.
-
Log in to ActiveCampaign. Click Settings at the bottom left, then choose Developer.
-
Under API Access, copy the URL, which looks like
https://youraccount.api-us1.com, and the Key. The key belongs to your ActiveCampaign user. If you reset it, the old key stops working and you will need to update the connection in Plandalf.
Paste the URL as ActiveCampaign shows it. Plandalf also accepts it without https:// or with /api/3 on the end, and your youraccount.activehosted.com address works too. Any other address is refused, so the key is only ever sent to ActiveCampaign.
Connect ActiveCampaign to Plandalf
-
Find ActiveCampaign in the Marketplace
In Plandalf, open Automation in the sidebar and choose the Marketplace tab. Find ActiveCampaign under Available now and click Connect.
-
In the Connect ActiveCampaign window, keep or change the Integration name, paste the URL into API URL and the key into API Key, then click Connect.
-
Plandalf checks both with ActiveCampaign straight away by loading the user the key belongs to. When you see ActiveCampaign connected, choose Build an automation to start a sequence, or Not now.
Your connection now appears under Automation → My apps. You can connect more than one ActiveCampaign account; each step asks which account to use.
Steps you can add
Every step below takes the contact’s email address. In a purchase sequence, insert {{trigger.customer_email}} from the variable menu.
The steps that add something (a tag, a list, an automation) create the contact first if ActiveCampaign doesn’t have them yet, so you don’t need a separate create step. They also save the contact’s first and last name when you fill those in. Blank names are skipped, so an empty variable never wipes a name in ActiveCampaign.
Add Tag
Adds one or more tags to a contact, creating the contact and any new tags as needed.
- Email Address (required).
- Tags (required): pick tags from your ActiveCampaign account, or type a name. A typed name uses the tag with that name if you already have one, ignoring capitals, and creates it otherwise. Typed names can include variables from the trigger or earlier steps.
- First Name, usually
{{trigger.customer_first_name}}. - Last Name, usually
{{trigger.customer_last_name}}.
Remove Tag
Removes a tag, for example when someone is refunded. If the email isn’t in ActiveCampaign, or the contact doesn’t have the tag, the step is skipped rather than failed.
- Email Address (required).
- Tag (required): a tag from your ActiveCampaign account.
Add Contact to List
Subscribes the contact to a list, creating the contact if needed.
- Email Address (required).
- List (required): a list from your ActiveCampaign account.
- First Name and Last Name.
Add Contact to Automation
Starts an ActiveCampaign automation for the contact, creating the contact if needed. The automation must be active in ActiveCampaign; inactive ones show (inactive) in the list.
- Email Address (required).
- Automation (required): an automation from your ActiveCampaign account.
- First Name and Last Name.
Note. Plandalf doesn't start from ActiveCampaign events The ActiveCampaign app has steps but no triggers: an ActiveCampaign event, such as a tag being added, can’t start a Plandalf sequence through the app. To start a promo timer from an ActiveCampaign automation, use its Webhook step, as shown below. Plandalf also doesn’t create deals or send orders to ActiveCampaign’s ecommerce features.
Example: stop the sales emails when someone buys
This is the setup for a 5-day sales sequence that should stop the moment a contact buys.
-
Go to Automation → Templates, find Tag buyer in ActiveCampaign and click + Add. Pick the checkout you’re selling. Plandalf creates a sequence that runs on Checkout Completed for that checkout, with an Add Tag step already set to
{{trigger.customer_email}}and a tag named “Bought” plus the checkout’s name. -
Open the Add Tag step. Keep the tag, or pick or type the one you want. The tag is created in ActiveCampaign the first time a buyer comes through.
-
End the ActiveCampaign automation on the tag
In ActiveCampaign, open your sales automation and add a Goal at the end with the condition Tags → Tag exists and the same tag. Set it to jump there from anywhere in the automation, so a buyer skips the remaining emails. Instead of a Goal, you can add a second start trigger, Tag is added, that ends the automation.
-
Run the step’s test. Testing makes a real change in ActiveCampaign, so use your own email. Then turn the sequence On.
Test purchases skip automations by default. To try the whole flow with a test card, open the sequence’s Settings, switch on Run on test purchases, buy through the checkout’s test link, and switch it off again when you’re done.
Start each contact’s promo timer from ActiveCampaign
If a promo gives each contact their own deadline, an ActiveCampaign automation can start that timer when the contact enters it, and the same contact sees their own countdown in your emails.
-
Create the enrolment automation
In Plandalf, open the promo and choose the Emails tab. With ActiveCampaign picked as the email platform, click Create enrolment automation. Plandalf creates a sequence with a Webhook trigger and an Enroll in Promo step whose Ref and Email are
{{trigger.contact.email}}, because ActiveCampaign sends the contact as form fields. Copy the catch URL it shows, then turn the sequence On. -
Add a Webhook step in ActiveCampaign
In ActiveCampaign, open the automation that sends the offer’s emails. Directly under its start trigger, click +, open Conditions and workflow and choose Webhook. Paste the catch URL and click Save. Each contact’s timer starts the moment the automation reaches this step.
-
Put the countdown in your emails
Paste the countdown image from the promo’s Emails tab into an HTML block in each email. It ends in
?ref=%EMAIL%, ActiveCampaign’s personalization tag for the contact’s email, so each contact sees their own deadline.
If your enrolment automation was created before you picked ActiveCampaign, open its Enroll in Promo step and set Ref and Email to {{trigger.contact.email}}.
Remove the tag on refund
Take the tag back from refunded buyers with the Remove access on refund template.
-
Go to Automation → Templates, find Remove access on refund and click + Add. Pick the same checkout as your purchase sequence. Plandalf creates the sequence and opens it.
-
Open the Remove Tag step. Email Address is already set to
{{trigger.customer_email}}. Pick the tag your purchase sequence adds. To remove more than one tag, add another Remove Tag step for each. -
The trigger is Invoice Refunded with Full refunds only on, so a partial refund leaves the tag alone. Turn the sequence On.
The template adds a removal step for every connected app that has one, so you may see steps for other apps in the same sequence. Set them up too, or delete the ones you don’t need.
Common errors
| What you see | What to do |
|---|---|
| “ActiveCampaign rejected the API key” when connecting | Check the API Key is the one from Settings → Developer, and that the API URL is from the same page and the same account. Plandalf keeps the failed connection in My apps. Open it there, fix the details and choose Test Connection, rather than connecting again. |
| “The API URL must be your ActiveCampaign API address” | The URL isn’t an ActiveCampaign address. Copy it from Settings → Developer; it looks like https://youraccount.api-us1.com. |
| “Not found in ActiveCampaign (HTTP 404)” | The API URL points at the wrong account name. Copy it again from Settings → Developer. |
| Steps fail after you reset the ActiveCampaign key | The old key stopped working. Open the connection in My apps, paste the new key and choose Test Connection. |
| “Email is empty” | The email field didn’t resolve. Map it to {{trigger.customer_email}} or another step’s email output, and check the trigger sample has an email. |
| “… is not a valid email address” | The email field resolved to something that isn’t an email. Check which variable it uses. |
| “At least one tag is required” | Tags on Add Tag is empty, or every entry resolved to blank. Pick or type a tag. |
| “The selected ActiveCampaign tag no longer exists” | The tag was deleted in ActiveCampaign. Pick a tag again, or type its name to create it. |
| “Pick the ActiveCampaign tag to remove”, “list” or “automation” | The picker on that step is empty. Choose one. |
| Remove Tag shows skipped | ActiveCampaign has no contact with that email, or the contact doesn’t have the tag. Nothing needed changing. |
| Enroll in Promo fails with “requires a non-empty ref” | The enrolment step can’t find the email in the webhook. Set Ref and Email to {{trigger.contact.email}}. |
| A step fails with a rate limit message | ActiveCampaign allows 5 requests a second per account. Plandalf retries twice automatically. If it still fails, re-run the step once the burst has passed. Add Contact to Automation only retries a rate limit, so a contact is never started in the same automation twice. |
