I can't seems to understand were my workflow fail

Hello, I just discovered n8n and I’m already a fan. My first WF was easy to setup but the second one that looks a lot like the first breaks without error. If anyone got an idea of the reason that would be great !

My WF is supposed to check for me if some manga chapter is out on a site and if it is, send me a message on Disord.

I have a very simple postgres database with one table that keep the last chapter number of each manga followed.

I have inserted some logging instructions in the function nodes. It seems that the sub-WF is weirdly partially executed.

My main WF will get the list of website to query, make the requests and pass the HTMLs to the sublow.
The Subflow will parse the HTML check if the chapter is more recent than the one in the DB, if yes send a message on discord and log a string in the terminal else directly log the string.

Main:

Sub workflow:

The database used:

create table mangas
(
    id           serial  not null
        constraint mangas_pk
            primary key,
    name         text    not null,
    source       text    not null,
    last_chapter integer not null,
    site         text
);

alter table mangas
    owner to driky;

create unique index mangas_id_uindex
    on mangas (id);

INSERT INTO public.mangas (id, name, source, last_chapter, site) VALUES (1, 'Skeleton Soldier Couldn’t Protect the Dungeon', 'https://asurascans.com/manga/skeleton-soldier-couldnt-protect-the-dungeon/', 101, 'asura');
INSERT INTO public.mangas (id, name, source, last_chapter, site) VALUES (34, 'A Returner’s Magic Should Be Special', 'https://asurascans.com/manga/a-returners-magic-should-be-special/', 121, 'asura');

The logs:

n8n_1       | Postgres result:
n8n_1       | β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
n8n_1       | β”‚   (index)    β”‚                               Values                                β”‚
n8n_1       | β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
n8n_1       | β”‚      id      β”‚                                      1                                       β”‚
n8n_1       | β”‚     name     β”‚               'Skeleton Soldier Couldn’t Protect the Dungeon'                β”‚
n8n_1       | β”‚    source    β”‚ 'https://asurascans.com/manga/skeleton-soldier-couldnt-protect-the-dungeon/' β”‚
n8n_1       | β”‚     site     β”‚                                   'asura'                                    β”‚
n8n_1       | β”‚ last_chapter β”‚                                     101                                      β”‚
n8n_1       | β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
n8n_1       | Postgres result:
n8n_1       | β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
n8n_1       | β”‚   (index)    β”‚                               Values                                β”‚
n8n_1       | β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
n8n_1       | β”‚      id      β”‚                                 34                                  β”‚
n8n_1       | β”‚     name     β”‚               'A Returner’s Magic Should Be Special'                β”‚
n8n_1       | β”‚    source    β”‚ 'https://asurascans.com/manga/a-returners-magic-should-be-special/' β”‚
n8n_1       | β”‚     site     β”‚                               'asura'                               β”‚
n8n_1       | β”‚ last_chapter β”‚                                 121                                 β”‚
n8n_1       | β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
n8n_1       | TEST
n8n_1       | β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
n8n_1       | β”‚ (index) β”‚    chapter    β”‚                                        link                                        β”‚
n8n_1       | β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
n8n_1       | β”‚  json   β”‚ 'Chapter 102' β”‚ 'https://asurascans.com/skeleton-soldier-couldnt-protect-the-dungeon-chapter-102/' β”‚
n8n_1       | β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
n8n_1       | https://asurascans.com/skeleton-soldier-couldnt-protect-the-dungeon-chapter-102/
n8n_1       | 102
n8n_1       | ASURA2 END
n8n_1       | ASURA2 END

Hey @Driky!

Welcome to the n8n community!

If you’re running in production, the output of the nodes is not displayed. You can check the executions and go to the state where it failed and debug the error. To do that click on β€˜Executions’.

You can then click on the β€˜Open Past Execution’ button.

Also, is there a particular reason that you have two separate workflows here? You can build this as a single workflow. If you’re reusing the sub-workflow then it makes sense.

I haven’t tested your workflow yet, I will try to look more into it.

Let me know if you have any other questions!

1 Like

Thank you for the welcome and the time you took to answer my question.

Regarding the sub WF I will have different SW that can be switched to depending on which site host the manga.

But for development sake I inlined everything and it allowed me to find the problem.

Somehow during development I switched a FunctionItem for a Function, which obviously broke everything =P

Since I was not running in production the Execution menu didn’t help but it’s still nice to learn that it exist :wink:

If you have the workflows set to save failed executions you should be able to also see the error in past-executions of sub-workflows as @harshil1712 explained.

I just discovered that you can also save manually executed worflow, which was the case I was in when developing.

Thank you @jan and @harshil1712 for your help :wink:

1 Like

Ah yes sorry my mistake. I should also have mentioned that!

Glad to hear that it works now.