cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
will-i-am
Level: Powered On

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
Community Support Team
Community Support Team

Re: SQL -> MailChimp List

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.
3 REPLIES 3
Community Support Team
Community Support Team

Re: SQL -> MailChimp List

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.
will-i-am
Level: Powered On

Re: SQL -> MailChimp List

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
Level: Powered On

Re: SQL -> MailChimp List

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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 171 members 4,758 guests
Please welcome our newest community members: