<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.2.0">Jekyll</generator><link href="/blog/feed.xml" rel="self" type="application/atom+xml" /><link href="/blog/" rel="alternate" type="text/html" /><updated>2021-04-04T14:32:06+02:00</updated><id>/blog/feed.xml</id><title type="html">Taha Hichri Notes</title><subtitle>I blog about solving problems and things I have learned while working on projects.</subtitle><author><name>Taha Hichri</name></author><entry><title type="html">How to import AWS Cognito users to MailChimp</title><link href="/blog/How-to-import-AWS-Cognito-users-to-MailChimp/" rel="alternate" type="text/html" title="How to import AWS Cognito users to MailChimp" /><published>2021-01-31T17:06:34+01:00</published><updated>2021-01-31T17:06:34+01:00</updated><id>/blog/How-to-import-AWS-Cognito-users-to-MailChimp</id><content type="html" xml:base="/blog/How-to-import-AWS-Cognito-users-to-MailChimp/">&lt;h2 id=&quot;concepts&quot;&gt;Concepts&lt;/h2&gt;
&lt;p&gt;This tool helps you import AWS Cognito users to the contact list in MailChimp.&lt;/p&gt;

&lt;p&gt;It does not override your current contacts, a contact that already exists will just be skipped&lt;/p&gt;

&lt;h2 id=&quot;in-action&quot;&gt;In action&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/jPOFgSK.jpg&quot; alt=&quot;mailchimp-cognito-import CLI&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;/h2&gt;

&lt;h3 id=&quot;before-you-start&quot;&gt;Before you start&lt;/h3&gt;

&lt;p&gt;In order to import users from cognito to your mailchimp account, you need 3 things:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Cognito userPoolId of the user pool that contains the users you want to add to mailchimp.&lt;/li&gt;
  &lt;li&gt;MailChimp API key: &lt;a href=&quot;https://mailchimp.com/help/about-api-keys/#Find_or_generate_your_API_key&quot;&gt;How to get one&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;MailChimp list ID: &lt;a href=&quot;https://mailchimp.com/help/about-api-keys/#Find_or_generate_your_API_key&quot;&gt;Where to find it&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you run on your local machine, also make sure that your AWS profile credentials are set in  &lt;em&gt;~/.aws/credentials&lt;/em&gt;&lt;/p&gt;

&lt;h3 id=&quot;installation&quot;&gt;Installation&lt;/h3&gt;

&lt;p&gt;If you want to use within a project&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm install --add mailchimp-cognito-import
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you want to install globally and run from anywhere&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm install -g mailchimp-cognito-import
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;run&quot;&gt;Run&lt;/h3&gt;

&lt;h4 id=&quot;use-with-cli-global-install&quot;&gt;Use with CLI (global install)&lt;/h4&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mailchimp-cognito-import &amp;lt;user-pool-id&amp;gt; &amp;lt;mailchimp-api-key&amp;gt; &amp;lt;mailchimp-list-id&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can also show the help prompt by running without args.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mailchimp-cognito-import
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Taha Hichri</name></author><category term="AWS" /><category term="AWS" /><category term="cognito" /><category term="nodejs" /><summary type="html">Concepts This tool helps you import AWS Cognito users to the contact list in MailChimp.</summary></entry></feed>