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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 [kobotoolbox] Fix query,sort + use question name in attachments #3017
Conversation
I believe that's all @RicardoE105 As well as uses the question name corresponding to each attachment, if no prefix is provided: |
Hey @RicardoE105 quick ping on this one, and apologies to pressure you... It should be fairly straightforward to validate since these are small improvements over #2765... I think the attachment names is maybe less crucial, but the ability to query for form submissions is very much needed to make this node fully useful. |
@Yann-J Sorry for the late response, I missed the first comment.
If I remember correctly, the filter was not working properly and even if it did, it should have been with the pattern the Notion node has, where you can build the filter either manually with a fixedCollection or provide a JSON. Assuming that is too much work, then you can only add the option to filter with JSON.
Adding this back would not be a breaking change? I believe it will. With the approach that I followed you will not have conflicts either. We use this pattern in other nodes as well. |
Thanks for getting back @RicardoE105 . The filter definitely works (one is applied in the above screenshot for instance... if it wasn't working, that form would return ~300k submissions...) - but crafting the JSON predicate is not necessarily trivial as it's a MongoDB query passed directly to the engine - not very much we can do about this, as this is how the API works. The sample provided in the description, The current logic is indeed to pass the raw JSON string. Is there anything that you'd expect me to change in my PR? Concerning the attachment naming, you're right, I realize this would be a breaking change... I think it's not too late to do this, since presumably there are still very few users of this node - and even fewer might depend on attachment namings. I do believe it makes sense to use my proposed logic as the default behavior, since this is what users would likely expect, but I suppose we can also add a new boolean to "Name attachments after their related question". Let me know what you'd suggest here... The objective here is not to avoid naming conflicts, but to make it easy to identify the correct attachment, since those are always linked to a specific form question (even though the API does not make that link very clear - the value for these form questions will be the attachment's filename). With the current naming logic, the relationship is lost. For example, one of our forms is used to collect farmer's picture and national ID. These are 2 separate form questions of type |
It's ok if it's only a JSON string for the moment. Just do it like in the Notion example and only enable the JSON and none option.
You can add the optional to the PR, so it does not break anything. |
OK, both tasks completed @RicardoE105 See below screenshot showing the updated menu structure, with working filters, as well as a new "Attachments Naming Scheme" dropdown, with a default behaviour replicating the current strategy (i.e. numbered sequence), and a new option to use the original form question. Default behaviour: And with the "form question" option: This also works on the Trigger node: Can we please have this fairly rapidly 馃檹... Without both of these options, none of the workflows we were planning to roll out can be implemented... |
Hey @RicardoE105 gentle nudge here... |
Will review it before the next release so we can include it. |
Any update on this please @RicardoE105? ... I know you're busy, but we've been waiting on this node since December... |
Hey @Yann-J, Just started to look at this one, It looks like when the filter is set to None it doesn't work and throws an error as Love the naming feature for binary data I can see why you would prefer that I know I would, The only bit that bugs me you have already talked about with @RicardoE105. It would be great if we could have a simple filter and a json filter this would make it more accessible, I couldn't find any api documentation for KoBo to see if they have a call to get the fields but that would be the place to start. I do agree it isn't urgent but it would be worth thinking about, It could be that we keep an eye on community support requests and if it pops up a lot we can spend some time implementing it. |
Oops, you're right! I had done my tests with an empty filter, but not with Filter = None in the dropdown... Thank you, well spotted! Should be fixed now in the latest commit! I do agree that building some basic filters with the UI would be nice. I don't believe Kobo will document this API since it seems they're just passing the filter over to MongoDB, so the API is basically the MongoDB one - which is quite exhaustive (and recursive), but in practice we probably only need to support a basic grammar. The problem is the fields, which we won't always know in advance. But for sure this can probably wait, and I'd suggest to get this one released ASAP, as I think the current version (without the filter) has limited usefulness... Thanks for the review @Joffcom ! |
@Joffcom any update on this one? |
Hey @Yann-J, Initial review is complete it has been passed up and is waiting for one last review to make sure I have not missed anything then it will be merged in. |
@Joffcom @RicardoE105 @janober folks, sorry to insist once again, but I see we missed the last release, and this is getting difficult for us to trust n8n to evolve fast enough for our needs. My original PR was raised last December. I understand that the initial review took some back and forth to adhere to n8n's standards in terms of menu structure, but when it was merged, 2 important features were unilaterally dropped without discussion, which in my opinion make this node significantly less useful. This new PR is fairly straightforward and meant to restore these dropped features, which we have now been waiting for for 6 months, as none of our workflows can currently make use of the node as it is now. I've done my very best to make the PR clean and address any comment practically overnight, because my organization is really counting on this node to perform some crucial automations. I hope you can understand my frustration. Can I please ask for a speedy review completion? 馃檹 |
Hey @Yann-J, It looks like this is still in the last review column internally I will pop a note on it now. |
Sorry, that it took so long. Got now merged and will be released with the next version beginning of next week. |
Got released with |
Thank you so much this will be mightily useful for us! |
Follow-up to #2765 to add some missing parameters, and use the form's corresponding question name as attachment name.