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.

View solution in original post

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.

View solution in original post

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

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,806)