> ## Documentation Index
> Fetch the complete documentation index at: https://wiredesk.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Pipedream

> Use Wiredesk in Pipedream workflows: instant triggers for finished conversations, leads, handover requests and messages, and actions that talk to an agent, teach it and manage contacts.

The Wiredesk app on [Pipedream](https://pipedream.com/apps/wiredesk) connects with an API key from your workspace. Its actions call the [REST API](https://wiredesk.ai/docs/developers/api.md), so they can do what the API does. Its triggers start a workflow the moment a conversation ends, a lead is captured, an agent asks for a person or a message is written, and when a conversation starts.

## Connect your workspace

**1. Make an API key**

In Wiredesk, go to **Developers → API keys** and make a key for Pipedream. Only owners and admins see the Developers section. Choose **Read only** if the workflows only read. The instant triggers need **Full access**, because they add a webhook endpoint. See [Authentication](https://wiredesk.ai/docs/api-reference/authentication.md).

**2. Connect the account**

In a Pipedream workflow, add a Wiredesk trigger or action, click **Connect Account**, and paste the key.

## Actions

| Action | What it does |
| - | - |
| Who Am I | The workspace the key belongs to, its plan and this month's usage, and whether the key may make changes |
| Get Dashboard | The workspace at a glance: agents, headline numbers, what needs a person and the latest conversations |
| Get Analytics | Resolution and handover rates, ratings, time to a person, hours saved, leads, outcomes, sentiment, topics and unanswered questions for the last 1–90 days, beside the period before |
| Send Message | Sends a customer's message to an agent and returns its reply, like the chat widget. Billed as a chat reply. |
| Create Agent | Creates an agent from a name and instructions, as the dashboard's New agent form does. The plan's agent limit applies. |
| Update Agent | Changes an agent's name, greeting or instructions |
| Delete Agent | Deletes an agent. An owner can restore it from the dashboard for 30 days. |
| Add Knowledge Source | Teaches an agent pasted text, or a website to crawl |
| Delete Knowledge Source | Removes a source. The agent stops answering from it at once. |
| List Knowledge Sources | An agent's sources and their status |
| Search Knowledge | The passages the agent would find for a question |
| Create Contact | Adds a phone or email contact, with the name agents should use |
| Get Contact, Update Contact, Delete Contact | One contact |
| List Contacts | Contacts, optionally of one kind, or the one with an email address or phone number |
| List Conversations | Conversations, optionally for one agent or channel |
| Search Conversations | The same search as the Conversations page |
| Get Conversation | One conversation's summary, outcome, topic and sentiment, and optionally its transcript |
| Export Conversations | The conversations from a date range, each with its transcript |
| Take Over or Hand Back Conversation | Takes a chat, email or WhatsApp conversation over so a person answers it, or hands it back to the agent |
| List Inbox | What is waiting on a person, as the dashboard's Inbox shows it |
| List Leads | Captured leads, optionally for one agent |
| List Webhook Endpoints, Create Webhook Endpoint, Delete Webhook Endpoint | The workspace's [webhook endpoints](https://wiredesk.ai/docs/developers/webhooks.md#manage-endpoints-with-the-api). Create returns the signing secret once. |

**Send Message** works as described in [Talk to an agent](https://wiredesk.ai/docs/developers/api.md#talk-to-an-agent). Pass back the `conversation_id` from the first reply to continue the conversation. Set **User ID** to your own ID for the person, so their conversations share one contact.

## Triggers

| Trigger | Fires when | Arrives |
| - | - | - |
| New Lead Captured (Instant) | An agent saves a lead with a [Capture leads](https://wiredesk.ai/docs/actions/capture-leads.md) action, optionally for one agent | Instantly |
| Conversation Ended (Instant) | A conversation has closed and been summarised, with its summary, outcome, topic, sentiment and message count, optionally for one agent or channel | Instantly |
| Handover Requested (Instant) | An agent asks for a person to take over, with its reason, optionally for one agent or channel | Instantly |
| New Message (Instant) | A customer, the agent or someone on your team writes in a chat or email conversation, optionally for one agent or channel | Instantly |
| New Conversation Started | A conversation starts on any channel, optionally for one agent or channel | Every 15 minutes, which you can change in the trigger |

New Conversation Started checks for new items on a schedule, because Wiredesk sends no event when a conversation starts. It fires before the conversation has a summary. Use Conversation Ended to get the summary.

### How instant triggers work

* Deploying an instant trigger adds a [webhook endpoint](https://wiredesk.ai/docs/developers/webhooks.md) in Wiredesk for the trigger's URL. You'll see it under **Developers → Webhooks**, described as `Pipedream: <event>`. Deleting the trigger removes the endpoint. Changing its settings removes it and adds a new one.
* Adding the endpoint takes a **Full access** key.
* A workspace can have up to 10 webhook endpoints, and each instant trigger that's on uses one. If you've reached 10, delete a trigger you no longer need or remove an endpoint you don't use.
* Every delivery is signed. The trigger checks the signature with the endpoint's secret, which it keeps in its own storage, and answers `401` to a request that doesn't match or is more than five minutes old. Nothing is emitted for it.
* New Lead Captured and Conversation Ended emit up to 10 recent items when they're deployed, so you have real events to build the workflow with.
* Phone and browser-voice lines aren't sent as New Message events. Use Conversation Ended, then **Get Conversation** with the transcript, to read them.

## Errors

A failed step shows the API's error code and message. `unauthorized` means the key is wrong, revoked, or its maker is no longer an owner or admin. `read_only_key` means a change was tried with a **Read only** key. Every request is in **Developers → Logs**, under the key's name. See [Request logs](https://wiredesk.ai/docs/developers/logs.md) and [Conventions](https://wiredesk.ai/docs/api-reference/conventions.md) for the rest.

## Related

* [REST API](https://wiredesk.ai/docs/developers/api.md)
* [Webhooks](https://wiredesk.ai/docs/developers/webhooks.md)
* [n8n](https://wiredesk.ai/docs/integrations/n8n.md)
* [MCP server](https://wiredesk.ai/docs/developers/mcp.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.