Connect a custom agent
Connect your own external AI agent to monday.com so it can be @mentioned, assigned to items, and act on boards under its own identity.
A custom agent is an external AI agent that you own and host. Once connected, it gets its own monday.com identity, can be @mentioned in updates or assigned to items, and acts on boards through the monday.com API.
When the agent is triggered, monday.com sends a signed HTTP POST to a callback URL you provide. Acknowledge that request within 30 seconds. For agent chat, deliver the visible reply afterward with send_custom_agent_message, using payload.conversationId from the webhook. Your service can also act on monday.com independently using an API token issued at connection time.
This feature is in alpha and under active development as of June 2026. Breaking changes are expected before general availability. All requests require the request header
api-version: dev.
The GraphQL mutations referenced here (connect_external_agent_sync,update_custom_agent,send_custom_agent_message,disconnect_external_agent,add_agent_resource_access) are documented in full on the Agents API reference.
Step 1. Create the agent
From the UI: go to Agents → Manage agents → Bring your agent, choose Custom agent, enter a name, and optionally provide a Callback URL. On the success modal, copy the API Token and Signing Secret — they are shown only once.
From the API: call connect_external_agent_sync. It returns the agent_id, signing_secret, and api_token.
The callback URL is optional. Provide one if you want monday.com to notify your service when the agent is triggered. If you omit it, the agent is still created and you receive an API token — drive it through the monday.com API using that token; you just won't receive webhook events.
signing_secretandapi_tokenare returned only once and are never shown or logged again. Store them immediately in a secrets manager. If lost, disconnect and reconnect the agent to generate new credentials.
Step 2. Receive the trigger webhook
When the agent is triggered, monday.com sends a signed POST to your callback URL.
Request body:
{
"event": "agent_triggered",
"triggerType": "chat",
"payload": {
"text": "<trigger text>",
"conversationId": "v1.example-conversation-token"
},
"timestamp": "2026-06-15T10:30:00Z"
}| Field | Values | Description |
|---|---|---|
event | agent_triggered | Always agent_triggered for custom agent webhooks. |
triggerType | chat, mention, assigned, unknown | How the agent was triggered. Aliases such as assign may appear — normalize them. |
payload.text | string | The text that triggered the agent. |
payload.conversationId | string | Chat only. Opaque conversation ID. Pass it through unchanged as conversation_id on send_custom_agent_message. |
timestamp | ISO 8601 string | When the event occurred. |
Request headers:
| Header | Description |
|---|---|
x-monday-signature | sha256=<hex> — HMAC-SHA256 signature of the request. |
x-monday-timestamp | Epoch milliseconds — when monday.com sent the request. |
x-monday-agent-id | The agent ID that triggered the event. |
content-type | application/json |
Step 3. Reply to the webhook
monday.com POSTs the trigger to your callback URL and waits up to 30 seconds for HTTP 200. The response body is capped at 1 MB. For agent chat, that HTTP response is only the acknowledgement. The message the user sees is sent afterward with send_custom_agent_message.
Reply in chat
- Read
payload.conversationIdfrom the webhook. It is an opaque string — pass it through unchanged. - Respond HTTP 200 before doing slower work. When
streamis omitted ortrue, return an empty SSE stream ending indata: [DONE]. Whenstreamisfalse, return{ "success": true }. - Call
send_custom_agent_messagewith the agent'sapi_token. Setconversation_idtopayload.conversationId.
The same conversation_id can be reused for as many messages as you need for up to 7 days. Changing the callback URL or reconnecting the agent invalidates it.
mutation ($input: SendCustomAgentMessageInput!) {
send_custom_agent_message(input: $input) {
delivered
message_id
}
}{
"input": {
"conversation_id": "v1.example-conversation-token",
"message": "The project is 62% complete — 3 tasks remain in the backlog."
}
}await mondayApi(agentApiToken, `
mutation ($input: SendCustomAgentMessageInput!) {
send_custom_agent_message(input: $input) {
delivered
message_id
}
}`, {
input: {
conversation_id: payload.conversationId,
message: replyText,
},
});delivered is true when the chat UI received the message. message_id is the ID of that chat message.
Acknowledge the webhook within 30 seconds or the run fails with a timeout. After that acknowledgement,
send_custom_agent_messagedelivers the chat message. The sameconversationIdstays valid for up to 7 days unless you change the callback URL or reconnect the agent.
You can instead put the full chat reply in the HTTP body. Return JSON { "success": true, "message": "Your reply text" }, or stream SSE data: {"type":"text","content":"..."} lines and finish with data: [DONE]. Use that only when the reply is ready inside the 30-second window. For mention and assigned triggers, the HTTP body is not shown — acknowledge, then write with the agent's token (see Step 5).
Step 4. Verify the webhook signature
Every incoming webhook must be verified before processing. Use constant-time comparison to prevent timing attacks.
- Read
x-monday-signatureandx-monday-timestampfrom the request headers. - Compute
HMAC-SHA256(signing_secret, "{x-monday-timestamp}.{raw_body}"). - Prefix your result with
sha256=and compare it tox-monday-signatureusing a constant-time comparison. - Reject requests where signatures don't match or the timestamp is stale.
const crypto = require('crypto');
function verifySignature(signingSecret, rawBody, headers) {
const timestamp = headers['x-monday-timestamp'];
const receivedSig = headers['x-monday-signature'];
if (!timestamp || !receivedSig) return false;
const expected = 'sha256=' + crypto
.createHmac('sha256', signingSecret)
.update(`${timestamp}.${rawBody}`)
.digest('hex');
// timingSafeEqual throws if the buffers differ in length, so guard first.
const expectedBuf = Buffer.from(expected);
const receivedBuf = Buffer.from(receivedSig);
return (
expectedBuf.length === receivedBuf.length &&
crypto.timingSafeEqual(expectedBuf, receivedBuf)
);
}The
callback_urlmust be a valid HTTPS URL reachable from monday.com's infrastructure. It is re-validated at execution time as a protection against SSRF and DNS-rebinding attacks.
Step 5. Act on monday.com
Connected agents act under their own monday.com identity — your own account access does not carry over to the agent. Grant the agent access to the boards or docs it needs (the agent's page → Knowledge and access, or the add_agent_resource_access mutation), then call the API with the agent's api_token:
curl -X POST https://api.monday.com/v2 \
-H "Authorization: <agent-api-token>" \
-H "Content-Type: application/json" \
-d '{"query": "{ me { id name } }"}'The api_token is long-lived — it does not expire on a timer and is only revoked when the agent is disconnected. Use it for work that outlasts the 30-second webhook window, including send_custom_agent_message for chat replies.
Manage the agent
- Update the name or callback URL —
update_custom_agent(owner token withagent_id, or the agent's ownapi_tokenwithagent_idomitted). Changingcallback_urlrotatessigning_secret— persist the new value. - Disconnect —
disconnect_external_agent. This revokes the agent's token and deletes the agent.
Troubleshooting
The agent says it has access but can't edit items.
The agent acts under its own identity. Grant READ_WRITE access to the relevant board (see Step 5) — your own board access has no effect on the agent.
Webhook signature verification is failing.
Compute HMAC-SHA256 over "{x-monday-timestamp}.{raw_body}" using the signing_secret (not the API token), and use the raw, unparsed request body.
The webhook times out.
You must acknowledge the webhook within 30 seconds. For a later chat reply, call send_custom_agent_message with payload.conversationId from that webhook.
The secrets were lost after setup.
signing_secret and api_token are shown only once. If lost, disconnect the agent and reconnect to generate new credentials.
Join our developer community!If you have questions or need help with custom agents, visit the monday.com developer community.
Updated 20 days ago
