A node module that converts Sportlink exports (.csv) into a csv you can import into Mailchimp.
-
Install the node module:
npm install sportlink-to-mailchimp-converter
-
Import the module in your code:
// Javascript const SportlinkToMailchimpConverter = require('sportlink-to-mailchimp-converter')
// Typescript import { SportlinkToMailchimpConverter } from 'sportlink-to-mailchimp-converter'
-
And use it:
const converter = new SportlinkToMailchimpConverter({ nonAthleticsMembershipTypes: ['Gastlid', 'Recreanten'], athleticsMembershipTypes: ['Atletiek'] }) console.log(converter.convertFileToOutput(file))
-
Using in a browser:
<script src="https://cdn.jsdelivr.net/npm/sportlink-to-mailchimp-converter/sportlink-to-mailchimp-converter.umd.js"></script> <script> const converter = new SportlinkToMailchimpConverter.SportlinkToMailchimpConverter({ nonAthleticsMembershipTypes: ['Gastlid', 'Recreanten', 'Overigen'], athleticsMembershipTypes: ['Atletiek'] }); console.log(converter.convertFileToOutput(file)); </script>
You can use example-input.csv to test.
The configuration object looks like this:
{
nonAthleticsMembershipTypes: string[]
athleticsMembershipTypes: string[]
}
These values are used to recognize the "Lidsoorten vereniging" in your Sportlink export. For every string you provide in those arrays, the SportlinkToMailchimpConverter
will scan the lidsoorten column in your csv file:
- For every
nonAthleticsMembershipTypes
it finds, it will add a Mailchimp tag with that membershipType in the output. - For every
athleticsMembershipTypes
it finds, it will add a Mailchimp tag with "Atletiek " in the output.
- Special thanks to the developers and maintainers of papaparse for providing an easy to use library that helps me parse and serialze CSV files.
All trademarks, inlcuding (but not limited to) Mailchimp and Sportlink, are the property of their respective owners.