Document Workflow

is there any possibility to get a full stack information at the end of a workflow, of all executed nodes and there returns etc… without using logging function.

Yes that would be possible if you query it via the API at the end. Sorry not on the computer right now so can not post an example, should however be quite straight forward.

Great hint thanks. Never played with the API yet. Seems to work if I execute it with curl after the Workflow is finished. But runData is empty if i call it directly within the Workflow at the end. Is that possible?

Ah yes, sorry. Forgot that the execution data does not get saved until the workflow is finished executing. As the HTTP Request node is part of the workflow that will not be the case. So you can do one of two things:

  1. Activate “Save execution progress” in the workflow settings. That will however also slow down the execution and increase the memory usage as it saved the data to the database after each node
  2. Execute the workflow via a Sub-workflow and return at the end of it the execution ID. You can then query the execution data of that ID in the parent workflow.

Thanks works great. Still having a small problem though.

Don’t know if I should open a new question for that.

The execution data contains returns from MongoDB including wild nested { createdAt : { $date …}} fields.
Since I’m trying to import the full Execution result into MongoDB again I’m getting the following error:

“ERROR: key $date must not start with ‘$’”.

I’m aware of the problem but not sure how to solve it with n8n. I tried to set the Date Field to: createAt without success. Any idea?

Thank you for the fast support

Yes please open another ticket for this as it is a different problem. Then maybe also somebody else with more MongoDB experience than I is able to help you.