Importing members from Ghost

Clay Gordon
Clay Gordon
@claygordon
one month ago
744 posts
I have been working on SSO from Ghost and running into lots of problems making it work.

In the meantime, I want to import a subset of members. I used to host this community on Jamroom and want to import members that signed up since I made the switch to Ghost.

I can export members from Ghost no problem but I have been looking around for an import feature that was not associated with Ning3 imports. There is no obvious entry in the documentation and I searched for posts on this topic in this forum.

I also want to make sure that the import function:

* will dedupe the imports based on email addresses already in the database
* will send an email to the new members asking them to create a password and complete their profile

Finally, that I know the correct order of columns for the import.

TIA,
Clay
michael
@michael
one month ago
7,772 posts
I've not used it, but we have a module "user Import"
https://www.jamroom.net/the-jamroom-network/networkmarket/606/user-import

Is that what you're after?
Clay Gordon
Clay Gordon
@claygordon
one month ago
744 posts
Michael – That does appear to be the solution, but the link to the documentation generates an "OOPS... PAGE NOT FOUND" error for me with or without my VPN active.
Clay Gordon
Clay Gordon
@claygordon
one month ago
744 posts
One more issue – I am self-hosting and this module does not appear to be in the marketplace.
paul
@paul
one month ago
4,335 posts
There are two modules that can be used in conjunction that will likely achieve what you want, jrExporter and jrImporter. They are still in beta so not in the regular Marketplace.
Its a long time since I developed and used them so I'll refamilerise myself with them and get back later with how they might be able to help.
Paul


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
one month ago
744 posts
Paul:

Thanks!
paul
@paul
one month ago
4,335 posts
Hi Clay, this is what you need to do...

1) Install both the jrExporter and jrImporter modules from the marketplace beta channel.

2) In the Exporter module's plugins/CSV/samples folder there is a sample_members file. Use this to create a csv file with all the exported Ghost members.

3) Configure the Exporter module selecting the CSV plugin and pointing it to your file.

4) Run the Exporter. This will create 'intermediate' JSON files for the Importer module to use.

5) Run the Importer module. This will use the intermedite JSON files to import your members as Jamroom Profiles and Users into your Jamroom site.

hth


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
one month ago
744 posts
Paul:

Thanks.

I have installed both modules and will FTP to my site to find the sample .CSV file.

I want to confirm:

1) the importer module will dedupe email addresses already in the database
2) whether or not the imported members will be notified by email or if that is a manual process for me
paul
@paul
one month ago
4,335 posts
Hi Clay

1) The importer module does check for duplicate email addresses and will not import a new user with the same address.

2) No. What I suggest is that you temporarily clone the quota(s) that you want to import profiles to and instead import them to the clone quota. You can then send emails just to that quota using another module (jrNewsletter I think - need to check that). At some point later you can then move all imported profiles from their clone quota to the original.

As the Importer and Exporter modules are still in beta, can I suggest that when you have created the CSV file you first send it to me so that I can run it on one of my test sites to see if things work ok, before trying it on your live site?

Thanks


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
one month ago
744 posts
Paul:

I am not sure I know how to clone a quota but I was planning on creating a new quota. If I can clone an existing quota with all its attributes – that would be great. I searched the documentation but found no reference to that capability.

I checked and jrNewsletter does allow me to send to specified quotas.

I will be happy to send you a test CSV for you to run.
paul
@paul
one month ago
4,335 posts
Quote: I am not sure I know how to clone a quota

ACP=>Profiles=>Profiles=>Quota Browser

hth


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
4 weeks ago
744 posts
Paul:

I was having some SFTP access issues but was able to finally download the sample_members.csv file from
.../modules/jrExporter/plugins/CSV/samples

Following are the column headings from that file. I don’t know what some of them mean and which are required to have something in them. I can see how to do some of the mapping.

at
user_name
user_email
_profile_export_id
_user_export_id
_profile_created
_profile_updated
_user_created
_user_updated
profile_quota_id
profile_private
user_password
_profile_file.image
_user_file.image

Here are the columns in the Ghost export:

id
email
name
note
subscribed_to_emails
complimentary_plan
stripe_customer_id
created_at
deleted_at
labels
tiers
Clay Gordon
Clay Gordon
@claygordon
4 weeks ago
744 posts
Just a note: here is what a Ghost "id" looks like:

5fc82b97d400910001358315
paul
@paul
3 weeks ago
4,335 posts
Hi Clay - I'd build the Jamroom import CSV as follows -

user_name <= Ghost Name
user_email <= Ghost Email
_profile_export_id <= Ghost ID *
_user_export_id <= Ghost ID *
_profile_created <= Ghost Created At **
_profile_updated <= Ghost Created At **
_user_created <= Ghost Created At **
_user_updated <= Ghost Created At **
profile_quota_id <= Jamroom Target Quota ID ***
profile_private <= 1
user_password <= LEAVE BLANK ****
_profile_file.image <= LEAVE BLANK
_user_file.image <= LEAVE BLANK

* These IDs link Jamroom Profiles and Uses together. Assuming the Ghost IDs are unique, use that
** Jamroom needs this in 'UNixTime. If the Ghost system doesn't use this, or Ghost times cannot be converted, leave blank and the import will apply current time.
*** This is your target Jamroom site quota ID where all imported profiles will be allocated.
**** The import will generate a new password for users.

How many Ghost members are there to be imported?


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
3 weeks ago
744 posts
Paul:

Thanks for this mapping.

1) Will clone an existing quota and use that ID#
2) There are about 1950 names in the database. I will need to do some purging before the import.

• An unknown number are already in the existing Jamroom database. (Some were exported from Jamroom into Maven and then from exported from Maven into Ghost.)
• Some of them are flagged as not wanting to receive email for one reason or another
• Some are flagged as being spammers
• Some people (like me) have multiple accounts

3) Created at entries look like "2020-12-03T00:04:39.000Z"
4) Does the file to be imported need the header row? With all the columns in the same order?
paul
@paul
3 weeks ago
4,335 posts
Quote: An unknown number are already in the existing Jamroom database.
As said above, if an email address is already n the target Jmroom site, that member will not be imported.

Quote: Some of them are flagged as not wanting to receive email for one reason or another
Some are flagged as being spammers
Is this within Ghost? If so you need to get that information out of Ghost?

Quote: Some people (like me) have multiple accounts
The Importer/Exporter modules are designed for one user to have one profile.

Quote: Created at entries look like "2020-12-03T00:04:39.000Z"
That is an alternaton date/time format to UnixTime. I'd still enter it into the CSV file for now - It may be possible to do a conversion prior to the import. I'll look into that.

Quote: Does the file to be imported need the header row?
Yes

hth


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
3 weeks ago
744 posts
Paul:

Not wanting to receive email is a feature in Ghost. As an admin, I can do this as well. I will remove all entries that are flagged to not deliver before uploading.

When I know someone has more than one account (each account is linked to a unique email address, like me) I will dedupe beforehand. Most of these have one of the accounts listed as do not mail.

I will include the date/time data I have.

As for the CSV file. I will email it to you directly rather than attaching it here - to your m***or.net account?
paul
@paul
2 weeks ago
4,335 posts
Great - Yes email to that address and let me know here so that I can look for it.
Thanks


--
Paul Asher - JR Developer and System Import Specialist

Tags