# Connect your AI agent to viaSocket > QwryAI has no viaSocket app. Send leads to viaSocket, or any automation tool, with a webhook QwryAI doesn't have a dedicated viaSocket integration. You can still start a viaSocket flow from your agent: viaSocket can receive webhooks, and QwryAI sends a webhook each time a customer submits a lead, so a flow can pass the lead on to Google Docs, Sheets, a CRM or any app viaSocket connects to. The same steps work with any tool that can start a workflow from a webhook. For a ready-made app, see [Zapier](/docs/user-guides/integrations/zapier). ## Before you start * A QwryAI agent with a [Collect leads](/docs/user-guides/chatbot/actions/collect-leads) Action. * A viaSocket account. > [!NOTE] > > Webhook URLs must start with `https://`. ## Which QwryAI events you can send | Event | Where you add the webhook | | - | - | | `leads.submit`, a customer submits a lead | The **Destinations** step of a **Collect leads** Action | | A **Collect data** or custom form submission | The Action's **Destinations** step, or the form's **Webhooks** step | | `ticket.opened`, `ticket.closed`, `conversation.taken_over` | **Settings › Webhooks › Helpdesk events** | The [Webhook API Guide](/docs/developer-guides/webhooks) lists every event, its payload and how to check the signature. ## How to send leads to viaSocket **1. Create a flow with a webhook trigger in viaSocket** In viaSocket, create a new flow and choose **Webhook** as its trigger. Copy the webhook URL viaSocket gives you. ![In viaSocket, a new flow is created, Webhook is chosen as the trigger and the generated webhook URL is copied.](walkthroughs/viasocket-webhook.gif) **2. Add the URL to your Collect leads Action** In QwryAI, open your agent's **Actions** and open your **Collect leads** Action. In its **Destinations** step, paste the viaSocket URL under **Webhooks** and select **Create webhook**. ![Create Action: selecting the Collect leads card opens its dialog with a sample lead form and Start customizing.](walkthroughs/viasocket-collect-leads.gif) ![The Destinations step of a Collect leads Action, with the viaSocket URL pasted under Webhooks and the pointer on Create webhook.](walkthroughs/viasocket-destination.gif) **3. Check it under Settings › Webhooks** Your agent's **Settings › Webhooks** tab lists every webhook your Actions send to, with a link to each Action. Ticket and takeover events are added on the same tab, under **Helpdesk events**, with **New webhook**. ![The Settings › Webhooks table listing the new viaSocket URL against the Collect leads Action and the leads.submit event.](walkthroughs/viasocket-webhooks-list.gif) ![The agent's Settings page on the Webhooks tab, with the pointer on New webhook.](annotated/02-webhooks.webp "Settings › Webhooks.") ![The New webhook dialog with the Endpoint URL field and the events to send.](annotated/02-webhooks--open.webp "Helpdesk events use New webhook.") **4. Send a test lead and add the next step** Submit a lead in your agent's **Playground** so viaSocket receives a sample, then add the next step to the flow, such as **Google Docs › Append Text to Document**, and map the lead's fields. ![A test lead is submitted in the Playground, viaSocket shows the received payload, and a Google Docs Append Text to Document step is added with the customer's name and email mapped.](walkthroughs/viasocket-action.gif) **5. Test and publish the flow** Run a test in viaSocket, check the result in the target app, then publish the flow. ![The viaSocket flow tested, the new text visible in Google Docs, and the flow published.](walkthroughs/viasocket-publish.gif) ## Frequently asked questions > [accordion] Is there a QwryAI app in viaSocket? > > No. Use a webhook trigger as shown above, or use [Zapier](/docs/user-guides/integrations/zapier), which has a QwryAI app. > [accordion] Can viaSocket send messages to my agent? > > Not through a viaSocket app. A flow can call the QwryAI API with an API key; see the [API reference](/docs/api-reference/v2/overview). > [accordion] How do I know a webhook came from QwryAI? > > Each request carries an `x-qwryai-signature` header made with the webhook's secret. The [Webhook API Guide](/docs/developer-guides/webhooks) shows how to check it. ## Next steps > [card] Webhook API Guide | /docs/developer-guides/webhooks | Every event, its payload and how to verify signatures. > [card] Zapier | /docs/user-guides/integrations/zapier | Connect your agent to thousands of apps with the QwryAI Zapier app.