Skip to content
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

Unable to use windmill because there is nothing Nextcloud related - Inadequate documentation #24

Open
1994rstefan opened this issue Nov 17, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@1994rstefan
Copy link

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Use the Flow (Windmill) App (Tried everything from manual installation to Nextcloud AIO)

Expected behaviour

There are some scripts or anything Nextcloud related.

Actual behaviour

I am not sure what I should expect exactly, because the documentation, at its current state is not very clear how exactly someone should create his first workflow. I am unable to find anything which is Nextcloud related.
The docs (https://docs.nextcloud.com/server/latest/admin_manual/windmill_workflows/index.html#nextcloud-scripts) state that there should be scripts for Nextcloud available. But where do i find them? My Windmill interface is just empty.
I tried synchronizing (via Admin Workspace) and those logs sync some nextcloud resources. But where to find them? Inside the Nextcloud Workspace I cant find anything about that anymore.

Image

Image

But when i go to the hub.windmill.dev i can see Nextcloud:
Image

So basically the problem is - the Docs are very inadequate and I have no idea how it should look like, if it looks correct, if there is a real error, or what I should do after installing the Flow App and opening windmill.

Server configuration

Web server: Tried with manual Apache and AIO

Database: Tried with Maria and AIO

PHP version: 8.3 and AIO

Nextcloud version: Nextcloud Hub 9 (30.0.2)

List of activated apps Basic manual and AIO installation, no special other Apps or anything else installed.
Nextcloud configuration
{
    "system": {
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "check_data_directory_permissions": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "cloud.stggetraenke.at",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "cloud.stggetraenke.at"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "30.0.2.2",
        "overwrite.cli.url": "https:\/\/cloud.stggetraenke.at\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "updatedirectory": "\/nc-updater",
        "loglevel": 2,
        "app_install_overwrite": [
            "nextcloud-aio"
        ],
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": 10485760,
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "7": "OC\\Preview\\Krita",
            "0": "OC\\Preview\\Imaginary"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": 30,
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one                                                                                                                                   \/discussions\/2726",
        "maintenance_window_start": 100,
        "allow_local_remote_servers": true,
        "davstorage.request_timeout": 3600,
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "AT",
        "mail_smtpauth": 1,
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "DOMAIN": "***REMOVED SENSITIVE VALUE***"
    }
}
@1994rstefan 1994rstefan added the bug Something isn't working label Nov 17, 2024
@nicolashimmelmann
Copy link

Hi,

I am currently trying out the flows as well, and came across the same issue. Even though it says it syncs some Nextcloud related things from the hub, they do not show up.

I helped myself by just going to the public Windmill Hub and copying those scripts I needed.

To get a flow being triggered by a webhook, the documentation mentions CORE:LISTEN_TO_EVENT. Since this is also not available, I created it myself:

  • Create a new node of type "TypeScript (Deno)". Name it "CORE:LISTEN_TO_EVENT"
  • Put the "magic function" in there as mentioned in the documentation
  • Then, under "All Static Inputs", fill in the event and the filters.

Image

Cheers

@1994rstefan
Copy link
Author

@nicolashimmelmann Thanks for your info, I have tried this now and at least I got a step further.

I have created the CORE:LISTEN_TO_EVENT Node and added two events - NodeCreatedEvent and NodeWrittenEvent.
But Windmill stops the execution early because "Flow job stopped early because of a stop early predicate returning true".
Any idea why this could happen or how I could debug this further in Windmill? I cant find any more specific information why the execution stops early exactly.

Image

@nicolashimmelmann
Copy link

nicolashimmelmann commented Nov 23, 2024

It's funny because you are going through the same issues I faced at the beginning 😆 Maybe these common issues should be put in the documentation to make things easier for future users...

Your "CORE:LISTEN_TO_EVENT" node has a little stop sign. This means on a certain condition the flow will stop at this point. Check the documentation here: https://www.windmill.dev/docs/flows/early_stop You need to flip a switch in the Advanced settings of the node.

EDIT: Let me know if you find a way to trigger a flow when a file is moved within Nextcloud (not freshly uploaded). Up to now I don't see any event being available for that

@huntx
Copy link

huntx commented Nov 26, 2024

Hi,

I am currently trying out the flows as well, and came across the same issue. Even though it says it syncs some Nextcloud related things from the hub, they do not show up.

I helped myself by just going to the public Windmill Hub and copying those scripts I needed.

To get a flow being triggered by a webhook, the documentation mentions CORE:LISTEN_TO_EVENT. Since this is also not available, I created it myself:

  • Create a new node of type "TypeScript (Deno)". Name it "CORE:LISTEN_TO_EVENT"
  • Put the "magic function" in there as mentioned in the documentation
  • Then, under "All Static Inputs", fill in the event and the filters.

Image

Cheers

Can I ask the script kind for "CORE:LISTEN_TO_EVENT" should be "Trigger" or "Action" ?

and can help to verify if I am doing these correctly for passing values between blocks ?

                    "input_transforms": {
                        "userId": {
                            "type": "static",
                            "value": ""
                        },
                        "formHash": {
                            "expr": "flow_input.event.form.hash",
                            "type": "javascript"
                        },
                        "submissionId": {
                            "expr": "flow_input.submission.id",
                            "type": "javascript"
                        },
                        "useAppApiAuth": {
                            "type": "static",
                            "value": false
                        },
                        "nextcloudResource": {
                            "expr": "resource(u/admin/exapp_resource)",
                            "type": "javascript"
                        }
                    }

@nicolashimmelmann
Copy link

Can I ask the script kind for "CORE:LISTEN_TO_EVENT" should be "Trigger" or "Action" ?

I always chose Action. Trigger scripts are "intended to be used as scheduled poll with schedules and states" (docs)

and can help to verify if I am doing these correctly for passing values between blocks ?

Looks good. However, you are not referring other nodes/blocks, you just refer to the flow_input. To refer to the output of another block, you need to use results.<letter_of_the_block>, for example results.x. I suggest reading the most important parts of the Windmill documentation. Helped me a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants