Manage your Campaign Monitor account via Hubot
Campaign Monitor has provided this helpful article for locating the necessary credentials in your account. This particular module is built around the idea of subscribing/unsubscribing users one particular email list and viewing the latest campaigns for one particular client.
It is heavily inspired (and borrows some code) from the hubot-mailchimp module.
In your hubot repository, run:
npm install hubot-createsend --save
Then add hubot-createsend to your external-scripts.json
:
["hubot-createsend"]
Environment Variable | Required? | Description |
---|---|---|
CREATESEND_API_KEY |
Yes | API key of account or particular client |
CREATESEND_CLIENT_ID |
Yes | Unique identifier for desired client |
CREATESEND_LIST_ID |
Yes | Unique identifier for desired mailing list |
Returns the the statistics for the last sent campaign. You can use hubot cm ...
if you prefer to use a few less keystrokes.
alice> @hubot createsend
hubot> Last campaign "Campaign One" was sent to 1000 subscribers (298 opened, 132 clicked, 43 unsubscribed)
Add an email address to the list.
alice> @hubot createsend subscribe [email protected]
hubot> @alice Subscribing [email protected] ...
hubot> Subscribed [email protected].
Remove an email address from the list.
alice> @hubot createsend unsubscribe [email protected]
hubot> @alice Unsubscribing [email protected] ...
hubot> Unsubscribed [email protected].