Trigger autoresponder via API

Hi to all!
Can i trigger an autorespoder via API?

User signup -> autoresponder -> double opt-in -> first login in my webapp -> api call to send first login email

How can i do this? i was wondering if is it possible to implement updating custom data fileds in users.
So i add a first_login_date to custom fields, update it with the current date on first login trough API and the system wll trigger an autorespoder.

jamesd jamesd, 6 years ago

Here are a few things about autoresponders:

1. You set up autoresponders through the app (not available via the API at this point)
2. You can trigger autoresponders on either subscription date, or based on a date type custom field value for a subscriber

For your example above, you would need a date type custom field as you suggested, which you'd need to populate when your subscriber logs into your site.

You can populate this data by adding the subscriber at that point, or updating their details with the date value.

Your autoresponder would be configured to be triggered based on an offset from the date value you populate for your subscribers when you add them.

What you have suggested sounds completely doable. You should try it.

kilianc, 6 years ago

will the mail delivery instantly after a date field update?

jamesd jamesd, 6 years ago

An autoresponder email is triggered based on an offset you specify, which could be immediately if that is what you have set up. So if your subscriber has a date field value updated and that date field is used as the basis for the autoresponder, and you have an email set up to be sent immediately after that date/time value, your email will be sent immediately after that date/time for that subscriber.

I would suggest that you set up an autoresponder in your account based on a date type custom field, to test out the behaviour of what happens when you make API calls to add/update subscribers with various date/time values.

kilianc, 6 years ago

i can only save date into a Date field, no Time.
after a successful API call, updating a date field, the autoresponder never trigger a new mail.

kilianc, 6 years ago

little update:
email delivery happens at 12.00pm and an update doesn't trigger immediately an autoresponder.

if you create an instant delivery trigger for autoresponder, i can base all my signup/notification webapps system on campaign monitor!

please! make it real :)

jamesd jamesd, 6 years ago
kilianc :

little update:
if you create an instant delivery trigger for autoresponder, i can base all my signup/notification webapps system on campaign monitor!

This "instant delivery trigger" feature is possible using subscription based autoresponders. It sounds like you could use a subscription based autoresponder rather than a date type custom field based autoresponder, and use the API to subscribe someone to your list when they signup at your website. They would then be sent any autoresponder emails you have configured for the autoresponder (which could be immediately upon subscription).

Hope that helps.

kilianc, 6 years ago

jamesd, maybe i didn't explain right my intentions.

When a user signup on my app, i subscribe him via API into a list with a single otpin confirmation.
This list has an autoresponder on signup that deliver a welcome mail.

After this user share my app on facebook, i need to delivery a bonus code.
So i created a date field named bonus_code_trigger and i created an autoresponder based on value of this field.

Now to trigger the bouns code delivery, i update via API the date in bonus_code_trigger with today date.

So it works, but the delivery starts at midnight :) it would be great have an instantly "API triggered autoresponder".

jayc jayc, 5 years ago

I am in a similar situation to kilianc. I want to trigger an immediate autoresponder when a subscriber gets updated.

Ideally, it would be helpful if the app had the following features:

1) Trigger an autoresponder based on a condition (ie; a field meets a certain value)
2) Trigger an autoresponder when a field is updated (to any value)

Even if these features aren't available in the app, it would be nice for the API to be able to trigger an autoresponder.

Or does anyone have a workaround?

Phil Phil, 5 years ago

Hi jayc,

Suggestion 1:

This might not exactly fit your use-case, but there is one poorly-documented little feature that might help you out. The API routes for adding, updating, and importing subscribers all accept an additional boolean parameter called RestartSubscriptionBasedAutoresponders:

{code}"EmailAddress": "",
    "Name": "New Subscriber",
    "CustomFields": [
            "Key": "website",
            "Value": ""
            "Key": "interests",
            "Value": "magic"
            "Key": "interests",
            "Value": "romantic walks"
    "Resubscribe": true,
    "RestartSubscriptionBasedAutoresponders": true

If that parameter is present and true, then when you're reactivating a previously inactive subscriber (deleted or unsubscribed) then we will also restart the subscription-date based autoresponder for that subscriber. It's as though they were starting from fresh.

I do have to stress, the subscriber must be inactive, and you must have Resubscribe set to true, for that parameter to have any affect.

You may be able to use that feature to make a workaround, by unsubscribing an address and then immediately resubscribing them with this parameter set to true.

Depending on what wrapper you're using you may not be able to easily use this feature. It's so poorly documented that it isn't even implemented in most of the wrappers. The .NET wrapper does support it directly, and since the php wrapper works with associative arrays it will definitely take the additional parameter. But the others will require modifications to the wrapper code, i'm afraid.

Suggestion 2:

You might be able to find a clever way to associate a custom field with a date-based field and use custom-field-based autoresponders to trigger on field update (ie update a "SendDate" field at the same time as you update "CustomerStatus" and get your autoresponder to send out on the exact date of that field). It would require some testing, but it may work.

Final expression of regret

I'm really sorry that we don't have the perfect solution just yet. I've added your vote to the feature-request for segment-based autoresponders (which is what this amounts to), but in the meantime, one of the above suggestions might be the best you've got.

I hope that helps,

jayc jayc, 5 years ago

Hello Phil,

Thanks for your help. I had actually already experimented with the custom date field, but like kilianc - I found that it only triggers it after midnight. It would really need to be a 'time-based' custom field to get it to send sooner!

Also thanks for adding my vote to segment-based autoresponders. Would these be triggered as soon as a subscriber is updated? What I'm trying to achieve is to trigger an email once a subscriber updates their preferences. I think it really needs an 'update' trigger - ie; when Field1 is updated or Field2 is updated, then send the autoresponder.

roshodgekiss roshodgekiss, 5 years ago

Hey there jayc, we don't have any plans set in stone just yet, so we'll certainly add your suggestion to have segment-based autoresponders triggered instantly. We'll keep you posted if this is something we include at a later date - thank you so much for your feedback!

Get in touch with us on Twitter:
We're also on Facebook:
Stephen, 3 years ago

Hey guys,

Just updating this thread to let you know that autoresponders to segments is now live!

Thanks again for taking the time to give us your feedback, and we'd love to hear how the new feature works for you! :)

jayc jayc, 2 years ago

Hello Stephen, just came across this thread again and thought I'd let you know that the new feature did not solve my problem. I'm still hoping you will implement segment based autoresponders - ie; a new way to trigger autoresponders, based on updating a subscriber's details.

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free