InTouch Hub · Blue Isle Software

Constant Contact

Create and send email campaigns and manage contact lists via the Constant Contact v3 API.

Provided free and as is, without warranty of any kind — including merchantability, fitness for a particular purpose, and the accuracy or completeness of any result. See the licence. You are responsible for checking what this produces before relying on it.

campaignsconstantcontactsemailmarketingmarketing-emailstatus

Constant Contact

Create and send email campaigns and manage contacts and contact lists through the Constant Contact v3 API (https://api.cc.email/v3).

This is a self-contained InTouch tool (credentialBased: false) — pass a Constant Contact OAuth2 access token as the apiKey input. Authentication uses the standard Authorization: Bearer <token> header. Implemented with the Python standard library only (no third-party packages).

Important: The Constant Contact v3 API does not accept a bare API/client key on its own. Every call must carry an OAuth2 access token obtained through one of Constant Contact's OAuth2 flows (Authorization Code, PKCE, Device, or Implicit). Pass that access token as apiKey.

Operations

operation Constant Contact endpoint What it does
get-lists GET /v3/contact_lists List all contact lists (with counts).
get-contacts GET /v3/contacts List contacts; optionally filter by email.
create-contact POST /v3/contacts Create a single contact and add it to one or more lists.
get-campaigns GET /v3/emails List email campaigns.
create-campaign POST /v3/emails Create a custom-code (HTML) email campaign in DRAFT status.

Inputs

input Used by Description
apiKey (required) all Constant Contact OAuth2 access token.
operation (required) all One of the operations above.
limit get-lists / get-contacts / get-campaigns Optional max number of results.
email get-contacts / create-contact Filter by email (get) or the contact's email (create).
firstName create-contact Contact first name.
lastName create-contact Contact last name.
listIds create-contact Comma-separated contact list IDs to add the contact to.
name create-campaign Unique campaign name.
subject create-campaign Email subject line.
fromEmail create-campaign Confirmed sender "from" email address.
fromName create-campaign Sender display name.
replyTo create-campaign Reply-to address (defaults to fromEmail).
htmlBody create-campaign Full HTML email body (custom-code, format type 5).

Outputs

The tool never throws on a 4xx/5xx HTTP response — it returns the status and Constant Contact's error JSON in result so a job can branch on it. Only a transport-level failure (DNS/timeout/refused) fails the step.

Getting an access token (apiKey)

  1. Sign in to the Constant Contact Developer Portal and create an application to get a client ID and client secret.
  2. Run an OAuth2 flow (Authorization Code or PKCE recommended) to obtain an access token. See the authentication guide.
  3. Pass that access token as the apiKey input. Access tokens expire (typically after 24 hours) and must be refreshed with your refresh token.

You also need at least one confirmed sender email address in your account to use as fromEmail when creating a campaign.

Examples

List your contact lists

apiKey:    <oauth2-access-token>
operation: get-lists
limit:     50

status: 200, result: {"lists": [{"list_id": "...", "name": "Newsletter", ...}]}

Create a contact and add it to a list

apiKey:    <oauth2-access-token>
operation: create-contact
email:     [email protected]
firstName: Alex
lastName:  Bloggs
listIds:   8f9d2a1b-1111-2222-3333-444455556666

status: 201, result: {"contact_id": "...", "email_address": {...}, ...}

Create a draft email campaign

apiKey:    <oauth2-access-token>
operation: create-campaign
name:      June Newsletter
subject:   What's new this month
fromEmail: [email protected]
fromName:  Your Company
htmlBody:  <html><body><h1>Hello!</h1><p>Our June update...</p></body></html>

status: 201, result: {"campaign_id": "...", "current_status": "DRAFT", ...}

Publishes

The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.

Input Properties

Every property this tool accepts, from its own tool.iml.

Property Type Required Default Description
apiKey string yes DEPRECATED — bind an API Key credential to the task with credentialName instead. A key pasted here is stored in the workflow definition in clear and appears in every export of it. Still honoured for workflows built before the change.
operation string yes One of: get-lists, get-contacts, create-contact, get-campaigns, create-campaign
limit string no get-lists/get-contacts/get-campaigns: optional max number of results to return (e.g. 50).
email string no get-contacts: filter by email address. create-contact: the contact's email address (required for create-contact).
firstName string no create-contact: contact first name.
lastName string no create-contact: contact last name.
listIds string no create-contact: comma-separated contact list IDs to add the new contact to (required for create-contact).
name string no create-campaign: unique campaign name.
subject string no create-campaign: email subject line.
fromEmail string no create-campaign: confirmed Constant Contact sender 'from' email address.
fromName string no create-campaign: sender display name.
replyTo string no create-campaign: reply-to email address (defaults to fromEmail).
htmlBody string no create-campaign: full HTML body (custom-code email, format_type 5).