cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
will-i-am
Regular Visitor

SQL -> MailChimp List

Hi there,

 

I've been tinkering around with an idea that I haven't yet gotten to work.  I'd like to get data from a SQL table and create a new list in MailChimp.  My thought process is:

 

1. Recurrence: x days

2. Get Rows (table inserted)

3. Apply to each - MailChimp Add Member to List

    (list ID inserted, appropriate dynamic fields from SQL table inserted)

 

It always fails with the following error:

{"type":"http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/","title":"Invalid Resource","status":400,"detail":"The resource submitted could not be validated. For field-specific details, see the 'errors' array.","instance":"","errors":[{"field":"","message":"Required fields were not provided: email_address"},{"field":"email_address","message":"Schema describes string, NULL found instead"}]}

 

I discovered that not all rows in the SQL table have an email address, so I know that I need to filter those out that are null, but I haven't been able to figure that out.  Can anyone point me in the right direction?

1 ACCEPTED SOLUTION

Accepted Solutions
v-micsh-msft
Community Support
Community Support

Hi @will-i-am,

 

We could take use of the Filter Query under the SQL Server Get Rows Action.

To filter the Email Address that is not Null, we could write the formula in the following way:

EmailAddress ne null

Example:

To get the rows that Sales field is not null, 

92.PNG

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-micsh-msft
Community Support
Community Support

Hi @will-i-am,

 

We could take use of the Filter Query under the SQL Server Get Rows Action.

To filter the Email Address that is not Null, we could write the formula in the following way:

EmailAddress ne null

Example:

To get the rows that Sales field is not null, 

92.PNG

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thank you for the reply!  I see the context now, and will try to expand upon it.  It didn't seem to filter out the null values, which still hangs up in the import to MailChimp step, but perhaps there may be that there is a space or hidden character in the SQL data.

 

I was able to filter by a last name and that worked.  I used the following filter, and the last name did filter out correctly.

EMAIL ne null and LASTNAME eq 'SMITH'

 

Thanks again for pointing me in the right direction.  I'll play around with it some more.

StephenM
Advocate II
Advocate II

have you managed to pass the Mailchimp list dynamically? my SQL to Mailchimp works if i hardcode the list i want as part of the flow but it wont work if i use a column from my SQL data to be the list name. 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (83,126)