Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of how to create a Mailchimp list through the gibbon api
# create lists in mailchimp using gibbon gem (not currently inthe docs)
lists = [
"Fly Fishing",
gibbon =
lists.each do |list|
body =
name: list,
email_type_option: false,
contact: {
company: 'YOUR COMPANY',
address1: 'YOUR ADDRESS',
address2: '',
city: 'YOUR CITY',
state: 'CO',
zip: '80205',
country: 'US',
phone: '',
abuse_name: 'Someone',
abuse_email: ''
from_name: 'YOUR COMPANY',
from_email: '',
subject: list,
language: 'en'
permission_reminder: "You signed up for the " + list
result = gibbon.lists.create(body: body)
Rails.logger.debug(list + " successfully created")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment