> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/build/integrate-ai/ai-examples/set-a-human-fallback-for-ai-workflows.md).

# Set a human fallback for AI workflows

This is a workflow that tries to answer user queries using the standard GPT-4 model. If it can't answer, it sends a message to Slack to ask for human help. It prompts the user to supply an email address.

This workflow uses the [Chat Trigger](broken://spaces/BKcbOzIWja8NfqKDcqHc/pages/ufgV9cVbZYhO7UuKUvU1) to provide the chat interface, and the [Call n8n Workflow Tool](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolworkflow.md) to call a second workflow that handles checking for email addresses and sending the Slack message.

{% @n8n-blocks/n8n-workflow-demo content="%7B%0A%20%20%22name%22%3A%20%22Ask%20a%20human%22%2C%0A%20%20%22nodes%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%22a60c8572-56c1-4bf3-8352-a6419a475887%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Simple%20Memory%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22%40n8n%2Fn8n-nodes-langchain.memoryBufferWindow%22%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%201.1%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%20900%2C%0A%20%20%20%20%20%20%20%20760%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22name%22%3A%20%22dont\_know\_tool%22%2C%0A%20%20%20%20%20%20%20%20%22description%22%3A%20%22Use%20this%20tool%20if%20you%20don%27t%20know%20the%20answer%20to%20the%20user%27s%20question%2C%20or%20if%20you%27re%20not%20very%20confident%20about%20your%20answer.%22%2C%0A%20%20%20%20%20%20%20%20%22workflowId%22%3A%20%22%3D%7B%7B%20%24workflow\.id%7D%7D%22%2C%0A%20%20%20%20%20%20%20%20%22fields%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22values%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%22chatInput%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22stringValue%22%3A%20%22%3D%7B%7B%20%24%28%27Chat%20Trigger%27%29.item.json.chatInput%20%7D%7D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%22b4f2e26c-903b-46b8-bd8b-110fd64de9e4%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Not%20sure%3F%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22%40n8n%2Fn8n-nodes-langchain.toolWorkflow%22%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%201%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%201120%2C%0A%20%20%20%20%20%20%20%20760%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%22951cc691-b422-4ce6-901f-b7feb3afd1ad%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Execute%20Workflow%20Trigger%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22n8n-nodes-base.executeWorkflowTrigger%22%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%201%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%20540%2C%0A%20%20%20%20%20%20%20%201360%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22content%22%3A%20%22%23%23%23%20Sub-workflow%3A%20Custom%20tool%5CnThe%20agent%20above%20can%20call%20this%20workflow.%20It%20checks%20if%20the%20user%20has%20supplied%20an%20email%20address.%20If%20they%20haven%27t%20it%20prompts%20them%20to%20provide%20one.%20If%20they%20have%2C%20it%20messages%20a%20customer%20support%20channel%20for%20help.%22%2C%0A%20%20%20%20%20%20%20%20%22height%22%3A%20775.3931210698682%2C%0A%20%20%20%20%20%20%20%20%22width%22%3A%201118.3459011229047%2C%0A%20%20%20%20%20%20%20%20%22color%22%3A%207%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%22194ba9c0-e256-449a-8da7-ac5339123a99%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Sticky%20Note1%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22n8n-nodes-base.stickyNote%22%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%20500%2C%0A%20%20%20%20%20%20%20%201020%0A%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%201%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22content%22%3A%20%22%23%23%23%20Main%20workflow%3A%20AI%20agent%20using%20custom%20tool%22%2C%0A%20%20%20%20%20%20%20%20%22height%22%3A%20486.5625%2C%0A%20%20%20%20%20%20%20%20%22width%22%3A%20927.5%2C%0A%20%20%20%20%20%20%20%20%22color%22%3A%207%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%2238c6b363-45a7-4e72-9e40-8c0df3cc480f%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Sticky%20Note2%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22n8n-nodes-base.stickyNote%22%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%20500%2C%0A%20%20%20%20%20%20%20%20460%0A%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%201%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22content%22%3A%20%22%2A%2AThis%20tool%20calls%20the%20sub-workflow%20below%2A%2A%22%2C%0A%20%20%20%20%20%20%20%20%22height%22%3A%20179.21380662202682%2C%0A%20%20%20%20%20%20%20%20%22width%22%3A%20197.45572294791873%2C%0A%20%20%20%20%20%20%20%20%22color%22%3A%205%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%220389315b-e48d-4b00-b9a1-899302b1b094%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Sticky%20Note%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22n8n-nodes-base.stickyNote%22%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%201060%2C%0A%20%20%20%20%20%20%20%20700%0A%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%201%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22content%22%3A%20%22%2A%2ASet%20your%20credentials%2A%2A%22%2C%0A%20%20%20%20%20%20%20%20%22height%22%3A%20213.44323866265472%2C%0A%20%20%20%20%20%20%20%20%22width%22%3A%20150%2C%0A%20%20%20%20%20%20%20%20%22color%22%3A%202%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%22fb11064a-4cf5-4110-9e39-af24a3225164%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Sticky%20Note5%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22n8n-nodes-base.stickyNote%22%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%201%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%20700%2C%0A%20%20%20%20%20%20%20%20680%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22content%22%3A%20%22%2A%2ASet%20your%20credentials%20and%20Slack%20details%2A%2A%22%2C%0A%20%20%20%20%20%20%20%20%22height%22%3A%20250.57252651663197%2C%0A%20%20%20%20%20%20%20%20%22width%22%3A%20178.0499248677781%2C%0A%20%20%20%20%20%20%20%20%22color%22%3A%202%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%22d689021d-0a46-4dff-a01a-0b01ecdd198b%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Sticky%20Note4%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22n8n-nodes-base.stickyNote%22%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%201%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%201020%2C%0A%20%20%20%20%20%20%20%201180%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22content%22%3A%20%22%23%23%20Try%20it%20out%5Cn%5CnSelect%20%2A%2AChat%2A%2A%20at%20the%20bottom%20and%20enter%3A%5Cn%5Cn\_Hi%21%20Please%20respond%20to%20this%20as%20if%20you%20don%27t%20know%20the%20answer%20to%20my%20query.*%22%2C%0A%20%20%20%20%20%20%20%20%22height%22%3A%20214.8397420554627%2C%0A%20%20%20%20%20%20%20%20%22width%22%3A%20185.9375%2C%0A%20%20%20%20%20%20%20%20%22color%22%3A%204%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%220926cd61-c0b8-4bae-ae65-9afd130d17cd%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Sticky%20Note3%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22n8n-nodes-base.stickyNote%22%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%20340%2C%0A%20%20%20%20%20%20%20%20520%0A%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%201%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22content%22%3A%20%22%23%23%20Next%20steps%5Cn%5CnLearn%20more%20about%20%5BAdvanced%20AI%20in%20n8n%5D%28https%3A%2F%2Fdocs.n8n.io%2Fadvanced-ai%2F%29%22%2C%0A%20%20%20%20%20%20%20%20%22height%22%3A%20144.50520156238127%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%22cde69dfe-252e-4a05-8d56-fa79431df5d8%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Sticky%20Note6%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22n8n-nodes-base.stickyNote%22%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%201%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%201580%2C%0A%20%20%20%20%20%20%20%201600%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%22927b775a-47f6-4067-a1a5-5f13dea28e45%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Chat%20Trigger%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22%40n8n%2Fn8n-nodes-langchain.chatTrigger%22%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%201%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%20600%2C%0A%20%20%20%20%20%20%20%20520%0A%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%22webhookId%22%3A%20%22785e0c0c-12e5-4249-9abe-47bb131975cb%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22jsCode%22%3A%20%22response%20%3D%20%7B%5C%22response%5C%22%3A%5C%22I%27m%20sorry%20I%20don%27t%20know%20the%20answer.%20Please%20repeat%20your%20question%20and%20include%20your%20email%20address%20so%20I%20can%20request%20help.%5C%22%7D%3B%5Cnreturn%20response%3B%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%22971e7b90-c2d8-4292-9da8-732d7d399f04%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Prompt%20the%20user%20to%20provide%20an%20email%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22n8n-nodes-base.code%22%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%202%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%201060%2C%0A%20%20%20%20%20%20%20%201520%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22jsCode%22%3A%20%22response%20%3D%20%7B%5C%22response%5C%22%3A%20%5C%22Thank%20you%20for%20getting%20in%20touch.%20I%27ve%20messaged%20a%20human%20to%20help.%5C%22%7D%5Cnreturn%20response%3B%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%226f5a21b3-c145-46c8-8e69-660100c4a6fc%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Confirm%20that%20we%27ve%20messaged%20a%20human%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22n8n-nodes-base.code%22%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%202%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%201300%2C%0A%20%20%20%20%20%20%20%201260%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22options%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22systemMessage%22%3A%20%22Try%20to%20answer%20the%20user%27s%20question.%20When%20you%20can%27t%20answer%2C%20or%20you%27re%20not%20confident%20of%20the%20answer%2C%20use%20the%20appropriate%20tool.%20When%20you%20use%20the%20dont\_know\_tool%2C%20respond%20with%20the%20message%20from%20the%20tool.%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%228b17da5e-e392-4028-91b0-bc02d34e46ed%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22AI%20Agent%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22%40n8n%2Fn8n-nodes-langchain.agent%22%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%201.2%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%20820%2C%0A%20%20%20%20%20%20%20%20520%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22conditions%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22options%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22caseSensitive%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22leftValue%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22typeValidation%22%3A%20%22strict%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22conditions%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22id%22%3A%20%225e21e7c5-db60-4111-bb17-c289ae0fc159%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22leftValue%22%3A%20%22%3D%7B%7B%20%24%28%27Execute%20Workflow%20Trigger%27%29.item.json.chatInput%20%7D%7D%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22rightValue%22%3A%20%22%2F%28%5Ba-zA-Z0-9.*-%5D%2B%40%5Ba-zA-Z0-9.*-%5D%2B%5C%5C.%5Ba-zA-Z0-9*-%5D%2B%29%2Fgi%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22operator%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22string%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22operation%22%3A%20%22regex%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%22combinator%22%3A%20%22and%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%22options%22%3A%20%7B%7D%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%22990ecd3b-6aa0-4b17-8d01-d606b9164fa8%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Check%20if%20user%20has%20provided%20email%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22n8n-nodes-base.if%22%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%202%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%20760%2C%0A%20%20%20%20%20%20%20%201360%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22select%22%3A%20%22channel%22%2C%0A%20%20%20%20%20%20%20%20%22channelId%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22\_\_rl%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22mode%22%3A%20%22name%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3D%7B%7B%20%5C%22A%20user%20had%20a%20question%20the%20bot%20couldn%27t%20answer.%20Here%27s%20their%20message%3A%20%5C%22%20%2B%20%24%28%27Execute%20Workflow%20Trigger%27%29.item.json.chatInput%20%7D%7D%22%2C%0A%20%20%20%20%20%20%20%20%22otherOptions%22%3A%20%7B%7D%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%22d14da0ae-06ca-422b-b5b6-e7759e74c787%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Message%20Slack%20for%20help%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22n8n-nodes-base.slack%22%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%202.1%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%201060%2C%0A%20%20%20%20%20%20%20%201260%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22model%22%3A%20%22gpt-4%22%2C%0A%20%20%20%20%20%20%20%20%22options%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22temperature%22%3A%200.2%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22id%22%3A%20%22278391c7-6945-495e-a4f1-74fb8fcc3549%22%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22GPT4%22%2C%0A%20%20%20%20%20%20%22type%22%3A%20%22%40n8n%2Fn8n-nodes-langchain.lmChatOpenAi%22%2C%0A%20%20%20%20%20%20%22typeVersion%22%3A%201%2C%0A%20%20%20%20%20%20%22position%22%3A%20%5B%0A%20%20%20%20%20%20%20%20740%2C%0A%20%20%20%20%20%20%20%20740%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%5D%2C%0A%20%20%22pinData%22%3A%20%7B%7D%2C%0A%20%20%22connections%22%3A%20%7B%0A%20%20%20%20%22Simple%20Memory%22%3A%20%7B%0A%20%20%20%20%20%20%22ai\_memory%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22node%22%3A%20%22AI%20Agent%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22ai\_memory%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22index%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22Not%20sure%3F%22%3A%20%7B%0A%20%20%20%20%20%20%22ai\_tool%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22node%22%3A%20%22AI%20Agent%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22ai\_tool%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22index%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22Execute%20Workflow%20Trigger%22%3A%20%7B%0A%20%20%20%20%20%20%22main%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22node%22%3A%20%22Check%20if%20user%20has%20provided%20email%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22main%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22index%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22Chat%20Trigger%22%3A%20%7B%0A%20%20%20%20%20%20%22main%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22node%22%3A%20%22AI%20Agent%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22main%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22index%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22Check%20if%20user%20has%20provided%20email%22%3A%20%7B%0A%20%20%20%20%20%20%22main%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22node%22%3A%20%22Message%20Slack%20for%20help%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22main%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22index%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22node%22%3A%20%22Prompt%20the%20user%20to%20provide%20an%20email%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22main%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22index%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22Message%20Slack%20for%20help%22%3A%20%7B%0A%20%20%20%20%20%20%22main%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22node%22%3A%20%22Confirm%20that%20we%27ve%20messaged%20a%20human%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22main%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22index%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22GPT4%22%3A%20%7B%0A%20%20%20%20%20%20%22ai\_languageModel%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22node%22%3A%20%22AI%20Agent%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22ai\_languageModel%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22index%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D" url="<https://raw.githubusercontent.com/n8n-io/n8n-docs/refs/heads/main/docs/_workflows/advanced-ai/examples/ask_a_human.json>" %}

## Key features <a href="#key-features" id="key-features"></a>

This workflow uses:

* [Chat Trigger](broken://spaces/BKcbOzIWja8NfqKDcqHc/pages/ufgV9cVbZYhO7UuKUvU1): start your workflow and respond to user chat interactions. The node provides a customizable chat interface.
* [Agent](/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent.md): the key piece of the AI workflow. The Agent interacts with other components of the workflow and makes decisions about what tools to use.
* [Call n8n Workflow Tool](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolworkflow.md): plug in n8n workflows as custom tools. In AI, a tool is an interface the AI can use to interact with the world (in this case, the data provided by your workflow). It allows the AI model to access information beyond its built-in dataset.

## Using the example <a href="#using-the-example" id="using-the-example"></a>

To load the template into your n8n instance:

1. Download the workflow JSON file.
2. Open a new workflow in your n8n instance.
3. Copy in the JSON, or select **Workflow menu** <img src="/spaces/GixZThfitWP21x2gQFpD/files/LPMolGd367bGOPTPoinr" alt="Workflow menu icon" data-size="line"> > **Import from file...**.

The example workflows use Sticky Notes to guide you:

* Yellow: notes and information.
* Green: instructions to run the workflow.
* Orange: you need to change something to make the workflow work.
* Blue: draws attention to a key feature of the example.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.n8n.io/build/integrate-ai/ai-examples/set-a-human-fallback-for-ai-workflows.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
