Create PinPoint Campaign

Action ID: create_pinpoint_campaign

Description

Create a campaign in PinPoint.

Input Schema

{
  "description": "Import PinPoint campaign node input.",
  "properties": {
    "application_id": {
      "description": "The ID of the application to import the segment to.",
      "title": "Application ID",
      "type": "string"
    },
    "name": {
      "description": "Campaign Name.",
      "title": "Campaign Name",
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": "",
      "description": "Campaign Description.",
      "title": "Campaign Description"
    },
    "segment_id": {
      "description": "Segment ID.",
      "title": "Segment ID",
      "type": "string"
    },
    "email_body": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": "",
      "description": "Email Body.",
      "title": "Email Body"
    },
    "email_html_body": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": "",
      "description": "Email HTML Body.",
      "title": "Email HTML Body"
    },
    "email_title": {
      "description": "Email Title.",
      "title": "Email Title",
      "type": "string"
    },
    "email_from_address": {
      "description": "Email From Address.",
      "title": "Email From Address",
      "type": "string"
    }
  },
  "required": [
    "application_id",
    "name",
    "segment_id",
    "email_title",
    "email_from_address"
  ],
  "title": "CreatePinPointCampaignNodeInput",
  "type": "object"
}

Output Schema

{
  "description": "Create pinpoint campaign node output.",
  "properties": {
    "campaign_id": {
      "description": "The id of the campaign.",
      "title": "Campaign id",
      "type": "string"
    },
    "arn": {
      "description": "The ARN of the campaign.",
      "title": "Campaign ARN",
      "type": "string"
    }
  },
  "required": [
    "campaign_id",
    "arn"
  ],
  "title": "CreatePinPointCampaignNodeOutput",
  "type": "object"
}

How It Works

This node creates email campaigns in AWS Pinpoint by configuring campaign settings and associating them with target segments. It accepts campaign metadata (name, description), segment targeting information, and email content (subject, body, HTML body, sender address). The node communicates with AWS Pinpoint's API to create the campaign resource, configure the email message template, and link it to the specified segment. Upon successful creation, the node returns the campaign ID and ARN for tracking and further operations.

Usage Examples

Example 1: Product Launch Email Campaign

Input:

{
  "application_id": "a1b2c3d4e5f6",
  "name": "Q4 Product Launch",
  "description": "New product announcement for Q4 2025",
  "segment_id": "seg_premium_customers",
  "email_title": "Introducing Our Revolutionary New Product",
  "email_from_address": "[email protected]",
  "email_body": "Dear customer, we're excited to announce our latest innovation...",
  "email_html_body": "<html><body><h1>Introducing Our Revolutionary New Product</h1><p>Dear customer...</p></body></html>"
}

Output:

{
  "campaign_id": "camp_9876543210",
  "arn": "arn:aws:mobiletargeting:us-east-1:123456789012:apps/a1b2c3d4e5f6/campaigns/camp_9876543210"
}

Example 2: Newsletter Campaign

Input:

{
  "application_id": "xyz789abc123",
  "name": "Monthly Newsletter - November",
  "description": "Monthly product updates and company news",
  "segment_id": "seg_all_subscribers",
  "email_title": "November Newsletter: What's New",
  "email_from_address": "[email protected]",
  "email_body": "This month's highlights include new features, customer stories, and upcoming events.",
  "email_html_body": "<html><body><h2>Monthly Newsletter</h2><ul><li>New Features</li><li>Customer Stories</li></ul></body></html>"
}

Output:

{
  "campaign_id": "camp_1122334455",
  "arn": "arn:aws:mobiletargeting:us-west-2:987654321098:apps/xyz789abc123/campaigns/camp_1122334455"
}

Example 3: Minimal Campaign with Text-Only Email

Input:

{
  "application_id": "app_minimal_001",
  "name": "Flash Sale Alert",
  "segment_id": "seg_active_buyers",
  "email_title": "24-Hour Flash Sale - 50% Off",
  "email_from_address": "[email protected]"
}

Output:

{
  "campaign_id": "camp_5544332211",
  "arn": "arn:aws:mobiletargeting:eu-west-1:111222333444:apps/app_minimal_001/campaigns/camp_5544332211"
}

Common Use Cases

  • Product Announcements: Launch new products or features by creating targeted email campaigns to specific customer segments

  • Promotional Campaigns: Send time-sensitive offers and discounts to engage customers and drive sales during promotional periods

  • Customer Retention: Re-engage inactive customers with personalized email campaigns based on behavioral segments

  • Newsletter Distribution: Schedule regular newsletters to keep subscribers informed about company updates and industry news

  • Event Invitations: Send targeted invitations to specific customer segments for webinars, conferences, or product demos

  • Onboarding Sequences: Create automated welcome campaigns for new users or customers to guide them through product features

  • Abandoned Cart Recovery: Trigger campaigns to customers who left items in their cart, encouraging them to complete purchases

Error Handling

Error Type
Cause
Solution

Invalid Application ID

Application ID does not exist in AWS Pinpoint or is malformed

Verify the application ID exists in your AWS Pinpoint account and is correctly formatted

Segment Not Found

Specified segment_id does not exist in the application

Create the segment first or verify the segment ID is correct for the given application

Invalid Email Address

From address is not verified in AWS SES or is malformed

Verify the sender email address in AWS SES before using it in campaigns

Missing Required Fields

Required parameters (name, email_title, etc.) are not provided

Ensure all required fields are populated with valid values before submission

Campaign Name Conflict

Campaign with the same name already exists in the application

Use a unique campaign name or append timestamp/version identifier to avoid conflicts

AWS Credentials Error

AWS credentials are invalid, expired, or lack necessary permissions

Update AWS credentials and ensure IAM role has mobiletargeting:CreateCampaign permission

Quota Exceeded

Account has reached maximum number of campaigns allowed

Delete unused campaigns or request quota increase from AWS support

Notes

  • AWS Permissions: Requires AWS IAM permissions for mobiletargeting:CreateCampaign and related Pinpoint operations

  • Email Verification: The email_from_address must be verified in AWS SES before campaigns can be sent successfully

  • HTML vs Plain Text: Providing both email_body and email_html_body allows email clients to choose the appropriate format

  • Segment Prerequisite: Segments must be created and populated before associating them with campaigns; empty segments will result in zero recipients

  • Campaign State: Newly created campaigns are in DRAFT state by default; use additional API calls to schedule or activate the campaign

  • ARN Usage: The returned ARN can be used for CloudWatch monitoring, IAM policies, and cross-service AWS integrations

  • Cost Considerations: AWS Pinpoint charges per email sent; monitor campaign size and frequency to manage costs effectively

  • Testing Recommendations: Always test campaigns with small test segments before sending to large production segments

Last updated

Was this helpful?