-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Import from CSV by generating json data #1997
Comments
I agree that a feature that would be nice to have for basic use is the 'attribute' column to accept a string, and not only a JSON, which is overkill in many cases Because your suggestion seems overly complicated: if then the users export to CSV the data that they imported, they will get a column 'attributes' with JSON data. (Unless the export function is modified to blow up the JSON in separate columns. This will still be unpractical in the general case, because JSON data can be nested in different depth levels, so JSON will remain) In my use-case, I perform a separate pre-processing step to transform strings into JSONs. |
Hi there, Thanks for the reply. My suggestion is not overly complicated, just a checkbox to "consider other columns as json data" data and that's all. Pretty much removes the restriction of the need of a preprocessing stage which mite be a secondary use-case for me. Anyway, thnx. |
Hi @evrim. Adding support for reading flat columns as JSON attributes has multiple consequences:
The ideal solution here is for you to write a simple script or tool that accepts a CSV in the format that is suitable for your usecase, and convert that to listmonk's specific format before uploading. |
If you really need this feature, what you can do is code a special-purpose web app to import CSV files the way you want, transform them into Listmonk format, and then send them to Listmonk through the import API : https://listmonk.app/docs/apis/import/#post-apiimportsubscribers For example, this web app could be based on this video tutorial (in Laravel PHP), which also has code and blog: |
I agree this is one of the major drawbacks of Listmonk and super inconvenient for end-users, so I'm sad to see that @knadh decided not to offer this (even though I understand the arguments made in your posts). In the meantime, I made a python script you can use to do preprocessing: https://gist.github.com/kawie/40cde96369a402ae61e72f54523c61d7 |
Hi there,
I must admit, I am happy with the status of the listmonk project. However, a missing feature is pretty much blocking the integration.
So, the import section requires/looks for json data for custom attributes. However, most of my clients only have access to programs such as spreadsheets (excel, ooffice, gdocs etc.) and it is pretty much not viable to tell them about json and friends.
So my questions is, is it possible to modify the 'import subscribers' functionality as defined in the following:
Data: A csv or some other tabular data file,
Function #1: Look for name, email columns, import them as usual,
Function #2: Import all other columns by converting them to json and assuming them as attributes.
This is crucial as I haven't found any method to make users life easier. This will make online users of collabora/onlyoffice to integrate with listmonk.
best,
evrim.
The text was updated successfully, but these errors were encountered: