# Sending messages between windows

When running multiple application windows, you may need to pass messages between them to sync data & actions.\
\
Send a message to another window using the [Window - Send Window Message](/deskifier/deskifier-bubble.io-docs/windows-element/actions.md#window-send-window-message) action.\
\
And listen for the [Window - Message Received](/deskifier/deskifier-bubble.io-docs/windows-element/events.md#window-message-received) event.

<figure><img src="/files/RM6UzT5aQuuQidFaVr3Y" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Pro Tip:\
\
If running external content, execute this JavaScript to send a message.\
\
`await window.deskifier.invoke('sendWindowMessage', { message, toWindowId })`
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://deskifier.gitbook.io/deskifier/deskifier-bubble.io-docs/guides-and-examples/sending-messages-between-windows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
