-
Notifications
You must be signed in to change notification settings - Fork 24
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
Import contacts with Feed Me #395
Comments
The plugin currently allows importing contacts via CSV file or user sync only, but I’ll look into adding compatibility with Feed Me. |
Thanks a lot! Is there a timeframe for this enhancement? We'd need the import by the middle of June. If that's too soon for this feature, I'll look for a workaround via a CSV file. Speaking of: is there a CLI command we could use for triggering an import with a Cron Job or so? |
No, but I’ll aim to get it in by next week. |
Wow, thanks – much appreciated! 🙏🏼 |
Added in eb5b1aa. You can help test this by running |
That was fast! 😍 Works like a charm – thanks a lot! |
Released in version 2.8.0. |
I successfully implemented the request that fetches the data from an API. The data is sent to the Feed Me feed like this:
However, even though valid JSON is returned from the Could that be a problem with the Campaign plugin, or should I talk to the Craft / Feed Me team about that? |
I’m not sure but can investigate. Did you repeat the test to see if the error occurs multiple times? |
I repeated the test multiple times, and it always fails with the same error on Stage. I never get the error on my local system though. I've also tried the |
Hmm, can you resave the feed setup details again? I’m really not sure where the issue might be. |
I've also tried to resave the feed multiple times – unfortunately, this doesn't change anything. I've also already e-mailed the Craft support with this problem – maybe they know more about this. 🤔 |
The Craft support suggested that Section isn't defined in the feed settings – and sent me this screenshot: Is that something that might help with a solution? |
Um, section?? Did you select a mailing list to import contacts into? |
In that case, the Craft support team’s suggestion is not particularly helpful. |
What I'm surprised is that it works locally, but not on Stage. I have the same code deployed, and the same DB for both environments. Both environments run PHP 8.1. |
Right, I got to the bottom of this. This only happens when The reason is this. The plugin will only register new elements on CP request. I'll leave the awesome @bencroker do his thing now :) |
Great find, @olivierbon, and thank you so much for reporting it! |
Great news! Really appreciate your work on this, @olivierbon & @bencroker! 🙏🏼 Will try it out first thing next week. |
Just tested it – looks good. Thanks again! 🚀 |
We found one issue where I'm not exactly sure if this has to do with the implementation of the feature. I have two feeds that each fetch a set of contacts from an API endpoint. One contact is found in both of these API responses. My understanding would be that this contact would be created and subscribed to the first mailing list when running the first feed, and then subscribed to the second mailing list when running the second feed (I have both feeds set to "Add & Update"). The contact indeed gets created, but it only ever gets subscribed to the mailing list whose corresponding feed I'm running first. Am I doing something wrong, or is this the way it's currently implemented? Thanks for your answer! 🙏🏼 |
That process should work as you expect it to. Does the issue only happen with automated API fetches, or can you reproduce it manually? If you can, then please outline the steps involved so I can test locally. |
The |
Yep, that was it. Thanks for pointing me in the right direction! 🚀 |
I have the same error message as @martinhellwagner This only happens when I think you need this event to register new elements for Feed me: Craft Version: 4.5.5 |
This issue has already been resolved, @maximilian-schwarz, and the event to register elements in Feed Me is already being used. craft-campaign/src/Campaign.php Line 711 in 05ad834
If this is still an issue for you then please update to the latest version of the plugin and create a new issue with further details and I’ll be happy to look into it |
@bencroker thanks for the fast reply. I tested it with the current version and the issue still exist. I have created a new issue with a working solution ;) |
I was wondering if it's possible to run a Feed Me feed against an API
GET
endpoint that imports contacts into a Craft Campaign mailing list. Currently, the only way seems to import these contacts as users, and then run an import for these users into a Craft Campaign mailing list – which seems to be quite a detour since I don't need these Mailing List Contacts as users.The text was updated successfully, but these errors were encountered: