powershell script to sync with mailchimp

Job ID: 31506482

Budget: $30 – $250 USD

I am trying to migrate my contacts from office to mailchimp using (an heavily modified version) of the script in this article

https://gcits.com/knowledge-base/sync-office-365-users-mailchimp-list/

However, i am facing some errors while using a powershell script to do it .

I'll be able to provide the script

here is the error message

Invoke-RestMethod : {"type":"https://mailchimp.com/developer/marketing/docs/err ors/","title":"Invalid Resource","status":400,"detail":"The resource submitted could not be validated. For field-specific details, see the 'errors' array.","i nstance":"aeb15e39-12b7-4458-57e2-67fb7140863c","errors":[{"field":"merge_field s.LNAME","message":"Data did not match any of the schemas described in anyOf."}]} Au caractère D:\Program Files\Ampps\www\mailchimp\ethiopie\final.ps1:116 : 17 + ... tchresult = Invoke-RestMethod -URI $baseUri/3.0/lists/$listId -Method ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation : (System.Net.HttpWebRequest:Ht tpWebRequest) [Invoke-RestMethod], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe ll.Commands.InvokeRestMethodCommand

I've removed all special characters and made sure that all the fields have a default value, using the code below
Related categories: Powershell