Home Forums Newsletter Plugin Support Export for Hubspot

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #292368
    Daniel Fishman
    Participant

    I thought this might help someone — I’m using Hubspot for my my primary CMS, but AWS and Newsletter for my newsletter delivery. It’s pretty easy to get the data from Newsletter into hubspot
    Run the following query:

    SELECT n.email as ’email’,trim(substring_index(e.message_text,’\n’,1)) as ‘body’,’OUTGOING’ as ‘type’,CONCAT(‘newsletter #’,e.id,’ ‘,from_unixtime(s.time,’%Y%m%d’)) as subject,from_unixtime(s.time,’%Y-%m-%d’) as senddate
    FROM wp_newsletter n, wp_newsletter_emails e, wp_newsletter_sent s
    WHERE n.id=s.user_id
    AND e.id=s.email_id
    AND e.id > 7 /* up to you to get the right number */

    I trim the body to be just the first line, but you don’t have to.
    Then export that as a file, import it into hubspot, and you’ve got all your newsletters logged in your CMS!

    I glossed over a few steps, happy to expand if someone is interested.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.