Skip to content

Cannot assign personalized merge tags to "To: field, such as *|FNAME|* #244

@tan-yong-sheng

Description

@tan-yong-sheng

First of all, appreciate the works. This library is indeed helpful.

It works when I tried to create an email campaign in Mailchimp, but I have still some problems I have faced

(1) Campaign name cannot be set different from subject line
(2) Cannot personalize To Field with merge tags, e.g., |FNAME|
(3) Cannot create preview text.
(4) can i programmatically upload image to mailchimp server and then get the image link?

image

Below is the function I have used to created to create mailchimp campaign.

def campaign_creation_function(campaign_name, audience_id, from_name, reply_to, client):
    campaign_name = campaign_name
    audience_id = audience_id
    from_name = from_name
    reply_to = reply_to

    data = {
        "recipients" :
        {
            "list_id": audience_id
        },
        "settings":
        {
            "subject_line": campaign_name,
            "from_name": from_name,
            "reply_to": reply_to
        },
        "type": "regular"
    }

    new_campaign = client.campaigns.create(data=data)
    
    return new_campaign

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions