{"meta":{"instanceId":"workflow-c216450e","versionId":"1.0.0","createdAt":"2025-09-29T07:07:51.639305","updatedAt":"2025-09-29T07:07:51.639367","owner":"n8n-user","license":"MIT","category":"automation","status":"active","priority":"high","environment":"production"},"nodes":[{"id":"693e094e-0329-455d-9c42-ba398dd40955","name":"Webhook","type":"n8n-nodes-base.webhook","position":[-500,-160],"webhookId":"825f729b-34e1-4c34-8687-f48b7118b749","parameters":{"path":"hotel-retell-template","options":{"responseData":"={\"response\":\"Your booking is confirmed\"}"},"httpMethod":"POST"},"typeVersion":2,"notes":"This webhook node performs automated tasks as part of the workflow."},{"id":"6172b8b6-4950-4b7f-a60c-ce782139f24c","name":"Respond to Webhook","type":"n8n-nodes-base.respondToWebhook","position":[300,-160],"parameters":{"options":{}},"typeVersion":1.1,"notes":"This respondToWebhook node performs automated tasks as part of the workflow."},{"id":"6ebeaeb7-4ec5-4f5d-b8d5-3fd51ca8604c","name":"[Replace me!] Set response","type":"n8n-nodes-base.set","position":[-100,-160],"parameters":{"options":{},"assignments":{"assignments":[{"id":"4159ec1f-4bd6-4473-90e5-a0c24e2bf302","name":"response","type":"string","value":"Your booking has been confirmed!"}]}},"typeVersion":3.4,"notes":"This set node performs automated tasks as part of the workflow."},{"id":"86c16dd4-0d9d-40bb-a495-02c1a2ac06f1","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-240,-340],"parameters":{"color":5,"width":400,"height":360,"content":"### 🧠 Place your logic here!\nYour Agent logic goes here.\nYou can, for example, use an **AI Agent** to provide information back to your Retell agent and/or **make an action in a third party service**. For example: book an event, add a contact to a CRM, etc. \nSky is the limit! 🙌"},"typeVersion":1,"notes":"This stickyNote node performs automated tasks as part of the workflow."},{"id":"f8be07ca-1d3f-46cb-b858-bb22b15efe0f","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-560,-340],"parameters":{"color":5,"width":220,"height":360,"content":"### Retell Custom Function Webhook\nPOST Webhook received from Retell's Custom Function each time it is triggered by Retell's Voice Agent"},"typeVersion":1,"notes":"This stickyNote node performs automated tasks as part of the workflow."},{"id":"94ec297f-aa00-4358-b1f9-834438548a19","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[200,-340],"parameters":{"color":5,"width":300,"height":360,"content":"### Retell Custom Function Response\nResponse to the webhook that will be provided back to Retell's Voice Agent.\n\n**Modify the response accordingly** if you want anything else than the first incoming input being sent back"},"typeVersion":1,"notes":"This stickyNote node performs automated tasks as part of the workflow."},{"id":"baff741b-8cd3-4f7d-a56f-5029e1babc26","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-1500,-700],"parameters":{"color":7,"width":880,"height":1220,"content":"## Connect Retell Voice Agents to Custom Functions\n\n## Overview\n- This workflow allows you to **trigger custom logic in n8n directly from Retell's Voice Agent** using [Custom Functions]({{ $env.WEBHOOK_URL }}\n- It captures a POST webhook from Retell every time a Voice Agent reaches a Custom Function node.\n- You can plug in any logic—call an external API, book a meeting, update a CRM, or even return a dynamic response back to the agent.\n\n## Who is it for\nFor builders using [Retell]({{ $env.WEBHOOK_URL }} who want to **extend Voice Agent functionality** with real-time custom workflows or AI-generated responses.\n\n## Prerequisites\n- Have a [Retell AI Account]({{ $env.WEBHOOK_URL }}\n- A Retell agent with a Custom Function node in its conversation flow (see template below)\n- Set your n8n webhook URL in the Custom Function configuration (see \"How to use it\" below)\n- (Optional) Familiarity with [Retell's Custom Function docs]({{ $env.WEBHOOK_URL }}\n- Start a conversation with the agent (text or voice)\n\n## Retell Agent Example\nTo get you started, **[we've prepared a Retell Agent]({{ $env.WEBHOOK_URL }} ready to be imported, that includes the call to this template.\n- Import the agent to your Retell workspace (top-right button [on your agent's page]({{ $env.WEBHOOK_URL }}\n- You will need to modify the function URL in order to call your own instance.\n- This template is a simple hotel agent that calls the custom function to confirm a booking, passing basic formatted data.\n\n## How it works\n- Retell sends a webhook to n8n whenever a Custom Function is triggered during a call (or test chat).\n- The webhook includes:\n    - Full call context (transcript, call ID, etc.)\n    - Parameters defined in the Retell function node\n- You can process this data and return a response string back to the Voice Agent in real-time.\n\n## How to use it\n1. Copy the webhook URL (e.g. `{{ $env.WEBHOOK_URL }}`)\n2. Modify the Retell Custom Function webhook URL (see template description for screenshots)\n    - Edit the function\n    - Modify the URL\n3. Modify the logic in the Set node or replace it with your own custom flow\n4. Deploy and test: Retell will hit your n8n workflow during the conversation\n\n## Extension Ideas\n- Call a third-party API to fetch data (e.g. hotel availability, CRM records)\n- Use an LLM node to generate dynamic responses\n- Trigger a parallel automation (Slack message, calendar invite, etc.)\n\n#### 👉 [Reach out to us](mailto:hello@agentstudio.io) if you're interested in **analyzing your Retell Agent conversations**.\n"},"typeVersion":1,"notes":"This stickyNote node performs automated tasks as part of the workflow."}],"connections":{"Webhook":{"main":[[],[],[],[],[]]},"Respond to Webhook":{"main":[[],[],[],[],[]]}},"name":"Webhook Workflow","settings":{"executionOrder":"v1","saveManualExecutions":true,"callerPolicy":"workflowsFromSameOwner","errorWorkflow":null,"timezone":"UTC","executionTimeout":3600,"maxExecutions":1000,"retryOnFail":true,"retryCount":3,"retryDelay":1000},"description":"Automated workflow: Webhook Workflow. This workflow integrates 5 different services: webhook, stickyNote, set, respondToWebhook, stopAndError. It contains 11 nodes and follows best practices for error handling and security.","notes":"Excellent quality workflow: Webhook Workflow. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."}