# Get updated on urgent requests w/ Telegram

{% hint style="success" %}
**Why you need this**

* Get alerted of urgent and high priority requests on your personal device
* Address these requests quickly
  {% endhint %}

In this use case, we want to get alerted to users who are facing technical difficulties that occur everyday. Here is a sample form below!&#x20;

{% embed url="<https://form.gov.sg/64a53db4921cd4001266b8e4>" %}

{% tabs %}
{% tab title="1. Trigger: FormSG" %}

## Connect formSG to Plumber

1. Upon clicking "Create pipe" on the homepage
2. Click on "Choose how you want your workflow to start"
3. Click on "FormSG"
4. Under "Choose connection", click the drop down
5. Click "Add new form"
6. Under "Form URL", paste the form link that you wish to connect to
7. Under "Form Secret Key", paste the form's secret key
8. Click "Connect"
9. A message "Your form is connected successfully." will be shown
10. Click "Save and continue"
11. Under "1. New form response", a green dot will appear as an indication that the form has been connected successfully.

<figure><img src="https://guide.plumber.gov.sg/~gitbook/image?url=https%3A%2F%2F2212031742-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FXyVsBiX9OwOL1o9g5hLM%252Fuploads%252FC9XfJoUQzMgUVDvYkZ5W%252Fimage.png%3Falt%3Dmedia%26token%3D795822d6-2674-493a-b543-83aee4cc0170&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=a4be96cd&#x26;sv=2" alt=""><figcaption></figcaption></figure>

11. Click "Check step"
12. You're done with setting up the FormSG integration!
    {% endtab %}

{% tab title="2. Action: Logic" %}

## Add logic to only get notified of urgent requests

**Choose app and event**

1. Select **Logic** as the app.
2. Select **Only continue if** as the action event.

**Set up action**

1. Select the variable that you want Logic to apply to. In this example, we will select question 4's answer variable.
2. Select the rule that you want to use. In this example, we will select **Is** and **equals**
3. Define the value that you want to compare the variable against. We only accept text input. In this example, the value will be **Every day**.

**Test action**

1. Click **Test step**.
2. If the test data pulled in from your FormSg submission **has met** the conditions, you’ll see a confirmation that the Pipe would **have continued**. \
   ![](/files/hIVaHS5yycmxHFnjuOTp)\
   \
   If the test data pulled in from your FormSg submission **has not met** the conditions, you’ll see a confirmation that the Pipe would **not have continued**. \
   ![](/files/rE1JvM1XdsBUrTkqPXHm)<br>

You're done with setting up the conditions to be alerted! [Next step: Telegram](#3.-action-telegram)
{% endtab %}

{% tab title="3. Action: Telegram" %}

## Set up a Telegram bot to alert you on urgent requests

Before you can set up your Telegram step, you would need to [create a Telegram bot](broken://pages/NG7AsUKgWtQ5tfyDnYab)!&#x20;

**Setting up your pipe**

1. Choose **Telegram** as the app.
2. Choose **Send message** as the action event.

**Choose connection**&#x20;

1. Select the connection for your bot.&#x20;

**Set up action**

1. Under the **Chat ID** field, select the chat you want to send a message to whenever an urgent submission comes in. If you are sending to a group or channel, ensure that you have [added your bot to the chat](/user-guides/actions/telegram.md#adding-or-re-adding-bots-to-groups-or-channels).

<figure><img src="/files/hkgONqIiq2c6ceHlgbPM" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="warning" %}
**Help! My chat does not appear in the dropdown list.**\
This dropdown list shows chats with recent activity in the past 24 hours. If your chat is missing try the following:

**For private messages,** send your bot a message directly.

**For group chats,** ensure your bot has been added to the group. Next, either send a message in the group chat (only works if your bot has [read permissions](#allowing-bots-to-read-group-messages)) or [re-invite your bot](#adding-or-re-adding-bots-to-groups-or-channels) to the group.\
**For channels,** ensure your bot has been added as an admin to the channel and send a message to the channel with your own telegram account.

Then, click on the refresh ↺ button on the right.
{% endhint %}

3. Type in the message you want to send in the **Message text** field.
4. Select if you would like to disable notifications.
5. Click **Continue.**
6. Then, click **Test Step** to verify that the message has been sent as you intended.

You're done with setting up alerts for urgent requests!
{% endtab %}
{% endtabs %}


---

# 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://guide.plumber.gov.sg/all-workflows/get-updated-on-urgent-requests-w-telegram.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.
