Async webhooks around a long running workflow

Thanks in advance flowgrammers! I am trying to wrap a long-running workflow with webhooks, so I am implementing async web requests by having 2 webhooks.
First to return immediately with an execution id then start the long running workflow.
Second to check on the status of that execution to see if it’s finished. If it’s finished, then it should return it’s output.

How can I get execution results from the n8n “Get Execution” node in order to return the output of the execution in the very last step? Is there a node where I need to set the data? I know I can store data in an external data store (Airtable, SQL, Google Sheets, etc.), but I feel like this can be done internally within n8n since there is already a n8n node.

Even if I toggle the “Include Execution Details,” the data is large and includes a messy output from each node.

Ultimately, my goal is to have async web requests. If there is a better approach please let me know.

Thanks for the help!

Information on your n8n setup

  • n8n version: latest
  • Database (default: SQLite): cloud
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: