Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First draft for importing Mailchimp campaigns #445

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

saevarom
Copy link

I've created a first attempt at importing the Mailchimp newsletters. It should only import campaigns that have been sent (have a 'send_time' attribute). And it will only import campaigns that have not been imported before.

You will need to put the Mailchimp API key in the environment as MAILCHIMP_API_KEY

@saevarom saevarom changed the title First draft for import Mailchimp campaigns First draft for importing Mailchimp campaigns Dec 15, 2023
@saevarom
Copy link
Author

I have no idea what is going on with the linting, I get a pass from the pre-commit hook locally, but the github action claims that the template fails the check.

@saevarom
Copy link
Author

Did you have a chance to take a look at this @vossisboss ?

@vossisboss
Copy link
Collaborator

@saevarom I did not! I was planning to follow up with you via Slack and I missed this PR somehow. I'll have a look right now. Thank you so much for doing this and for poking me.

@vossisboss
Copy link
Collaborator

Hello @saevarom. This took longer than I expected because of some trouble getting Docker and Poetry to play well together. Anyway, I tested your code in a local installation and the sync worked pretty well. I wasn't sure if the HTML would look good for the individual pages but it worked really well!

The sync itself worked a little too well though. Seems like almost every campaign with an existing archive item was duplicated (see the screenshots) because none of them have the new field that you added . Perhaps we need to add some date parameters.

The last newsletter in the current archive was sent on 14 July 2023, so for the initial sync, we could filter the campaigns down to any that were sent after 15 July 2023. Then maybe could update the sync to check the past month and match against mailchimp_campaign_id to prevent duplicates.

What do you think of that approach? Does that seem reasonable or do you have another idea?

I'm going to email you a test key so that you can run some tests on your own as well as well refine this. It should be in your email inbox shortly after I post this. If you need access to the data and media too, I can poke someone to set that up.

Screenshot 2024-01-13 at 2 11 34 PM
Screenshot 2024-01-13 at 2 11 52 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants