# Share via External Links

You can let users send a pre-filled message directly from your Adalo app to WhatsApp, Telegram, Google Messages (SMS), or Email using a Text Input, a Button, and a Website External Link action.

Each platform supports a URL scheme that opens the app and pre-fills a message. You can use [**MagicText** ](/component-basics/inserting-dynamic-text.md)to dynamically populate that message with content from your app.

***

### Video Walkthrough

{% embed url="<https://www.youtube.com/watch?t=5s&v=9M0BrZ3bvlY>" %}

***

### Share to WhatsApp

#### How It Works

**Base URL format:**

```
https://wa.me/?text=YOUR_MESSAGE_HERE
```

To send to a specific phone number, include it after `wa.me/`:

```
https://wa.me/15551234567?text=YOUR_MESSAGE_HERE
```

Phone numbers must be in full international format with no spaces, dashes, or parentheses (e.g., `15551234567` for a US number).

For more details on the URL scheme, see the [WhatsApp FAQ](https://faq.whatsapp.com/5913398998672934).

#### Setup Steps

1. **Add a Text Input** -- This is where the user will type the message they want to send.
2. **Add a Button** to the same screen.
3. **Add an External Link Action** to the button:
   * Open **Add Action** and choose **External Link**.
   * **Enable "Use System Browser"** so the link opens directly in WhatsApp rather than Adalo's in-app browser.
   * In the URL field, use Magic Text to pull in the Text Input value:

     ```
     https://wa.me/?text=[Text Input Value]
     ```
   * To pre-set a recipient:

     ```
     https://wa.me/PHONENUMBER?text=[Text Input Value]
     ```
4. **Preview and Test** -- Tapping the button should open WhatsApp with your message pre-filled.

#### Notes

* WhatsApp must be installed on the user's device.
* **Important:** Enable "Use System Browser" in the External Link action. Without it, Adalo opens `https://` links in an in-app browser, which may not hand off to WhatsApp correctly.
* Adalo only encodes spaces in your URL. Avoid special characters like `&`, `#`, and `+` in your message text, as they can break the URL.
* Sending to a specific number is not covered in the video above, but follows the same steps with the number added to the URL as shown.

***

### Share to Telegram

#### How It Works

**To share a message with a URL:**

```
https://t.me/share/url?url=YOUR_URL_HERE&text=YOUR_MESSAGE_HERE
```

**To send directly to a specific Telegram user (by username):**

```
https://t.me/USERNAME?text=YOUR_MESSAGE_HERE
```

**To share a text message without a URL:**

```
https://t.me/share/url?url=&text=YOUR_MESSAGE_HERE
```

For more details, see the [Telegram Sharing Documentation](https://core.telegram.org/widgets/share).

#### Setup Steps

1. **Add a Text Input** -- This is where the user will type the message they want to share.
2. **Add a Button** to the same screen. Label it something like "Share on Telegram."
3. **Add an External Link Action** to the button:

   * Open **Add Action** and choose **External Link**.
   * **Enable "Use System Browser"** so the link opens directly in Telegram rather than Adalo's in-app browser.
   * In the URL field, use Magic Text based on what you want to share:

   **Text message only:**

   ```
   https://t.me/share/url?url=&text=[Text Input Value]
   ```

   **Link from your database with a message:**

   ```
   https://t.me/share/url?url=[Your Link Property]&text=[Text Input Value]
   ```

   **Directly to a known Telegram username:**

   ```
   https://t.me/USERNAME?text=[Text Input Value]
   ```
4. **Preview and Test** -- Tapping the button should open Telegram with the message or link pre-filled.

#### Notes

* **Important:** Enable **"Use System Browser"** in the External Link action. Without it, Adalo opens `https://` links in an in-app browser, which may not redirect to the Telegram app properly.
* If Telegram is not installed, the link opens Telegram Web in the browser instead.
* Telegram uses usernames (e.g., `@johndoe`) rather than phone numbers for direct messaging via URL.

***

### Share to Google Messages (SMS)

#### How It Works

**Base URL format (no recipient):**

```
sms:?body=YOUR_MESSAGE_HERE
```

**To send to a specific phone number:**

```
sms:15551234567?body=YOUR_MESSAGE_HERE
```

This works across both Android and iOS. On Android it typically opens Google Messages; on iOS it opens Apple Messages.

#### Setup Steps

1. **Add a Text Input** -- This is where the user will type the message they want to send.
2. **Add a Button** to the same screen. Label it something like "Send as Text" or "Share via SMS."
3. **Add an External Link Action** to the button:
   * Open **Add Action** and choose **External Link**.
   * In the URL field, use Magic Text to pull in the Text Input value:

     ```
     sms:?body=[Text Input Value]
     ```
   * To pre-set a recipient phone number:

     ```
     sms:15551234567?body=[Text Input Value]
     ```
   * To pull the phone number dynamically from your database:

     ```
     sms:[Recipient Phone Number]?body=[Text Input Value]
     ```
4. **Preview and Test** -- Tapping the button should open the device's default messaging app with the message pre-filled.

#### Notes

* The `sms:` scheme opens whichever messaging app is set as default on the user's device.
* Phone numbers should be in full format with no spaces, dashes, or parentheses.
* Adalo does not apply any URL encoding to `sms:` links. Avoid special characters like `&` and `#` in your message text, as they can break the URL.
* This works reliably in Adalo's mobile previewer and in published apps. It may not work in desktop web preview since desktop browsers don't have a default SMS app.

***

### Share via Email

#### How It Works

**Base URL format:**

```
mailto:?subject=YOUR_SUBJECT&body=YOUR_MESSAGE_HERE
```

**To send to a specific email address:**

```
mailto:someone@example.com?subject=YOUR_SUBJECT&body=YOUR_MESSAGE_HERE
```

#### Setup Steps

1. **Add Text Inputs** -- One for the subject line and one for the message body. You can also hardcode the subject using static text.
2. **Add a Button** to the same screen. Label it something like "Share via Email."
3. **Add an External Link Action** to the button:
   * Open **Add Action** and choose **External Link**.
   * In the URL field, use Magic Text:

     ```
     mailto:?subject=[Subject Input Value]&body=[Message Input Value]
     ```
   * To pre-set a recipient:

     ```
     mailto:someone@example.com?subject=[Subject Input Value]&body=[Message Input Value]
     ```
4. **Preview and Test** -- Tapping the button should open the user's default email app with the fields pre-filled.

#### Notes

* On Android, this typically opens Gmail. On iOS, it opens Apple Mail (or whichever email app the user has set as default).
* You can add multiple recipients: `mailto:one@example.com,two@example.com`
* CC and BCC are supported: `mailto:?cc=someone@example.com&bcc=another@example.com&subject=Hi&body=Hello`
* Adalo does not apply any URL encoding to `mailto:` links. Avoid special characters like `&` and `#` in your subject or body text, as they can break the URL.

***

### Quick Reference

| Platform           | URL Format                                    | App Required?          |
| ------------------ | --------------------------------------------- | ---------------------- |
| WhatsApp           | `https://wa.me/?text=MESSAGE`                 | Yes                    |
| WhatsApp (to #)    | `https://wa.me/PHONE?text=MESSAGE`            | Yes                    |
| Telegram           | `https://t.me/share/url?url=URL&text=MESSAGE` | No (falls back to web) |
| Telegram (to @)    | `https://t.me/USERNAME?text=MESSAGE`          | No (falls back to web) |
| SMS                | `sms:?body=MESSAGE`                           | No (built-in)          |
| SMS (to #)         | `sms:PHONE?body=MESSAGE`                      | No (built-in)          |
| Email              | `mailto:?subject=SUBJECT&body=MESSAGE`        | No (built-in)          |
| Email (to address) | `mailto:EMAIL?subject=SUBJECT&body=MESSAGE`   | No (built-in)          |

***

### Tips for All Platforms

* **Enable "Use System Browser" for WhatsApp and Telegram.** Adalo opens `https://` links in an in-app browser by default, which can prevent the link from handing off to the native app. This setting is not needed for `sms:` or `mailto:` links -- those always go straight to the OS.
* **URL encoding:** Adalo's encoding is minimal -- it only converts spaces to `%20` for `https://` links, and applies no encoding at all for `sms:` and `mailto:` links. Avoid special characters like `&`, `#`, and `+` in your message text. Keep messages to plain text for the most reliable results.
* **Web preview limitations:** `sms:` and `mailto:` links may not work as expected in desktop web preview. WhatsApp and Telegram links will navigate away from the page rather than opening in a new tab. Use Adalo's mobile previewer or a published app for accurate testing.
* **Magic Text:** You can pull in any data from your app's database using Magic Text -- user names, listing titles, prices, links, etc. This lets you create dynamic share messages like "Check out \[Product Name] for \[Price]!"
* **Multiple share options:** Consider adding a row of buttons (one per platform) so users can choose how they want to share. Each button uses the same Text Input but with a different External Link URL.
* **Dynamic phone numbers:** If your app stores user phone numbers in a collection, you can use Magic Text to pull them into the WhatsApp or SMS URL instead of hardcoding a number.


---

# 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://help.adalo.com/actions/links/share-via-external-links.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.
