Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
64bbddd
chore: add the dify workflow
AmishaBisht May 5, 2026
c4132cc
test: test the work flow
AmishaBisht May 5, 2026
972b71e
test: trigger dify sync
AmishaBisht May 5, 2026
828850e
chore: remove test-only changes before merge
AmishaBisht May 5, 2026
e57e5cb
chore: scope workflow permissions to contents: read
AmishaBisht May 5, 2026
4e5c219
docs: document the wait_time option on AI webhook nodes
AmishaBisht Sep 10, 2026
02cbb4a
docs: add flow-editor screenshots for the wait_time field
AmishaBisht Sep 10, 2026
cf6b97d
docs: drop an unverified claim about other flows while a node is parked
AmishaBisht Sep 10, 2026
bb747e8
Merge remote-tracking branch 'refs/remotes/upstream-main' into docs/a…
AmishaBisht Sep 10, 2026
1310325
docs: fold the wait_time guidance into the existing pages
AmishaBisht Sep 10, 2026
4dd1142
docs: reference the screenshots relatively so they render on GitHub too
AmishaBisht Sep 11, 2026
4f856c7
docs: keep the filesearch-gpt step list intact and repoint the remain…
AmishaBisht Sep 30, 2026
9abf6b3
docs: drop the wait-time timeout section and show the publish warning
AmishaBisht Sep 30, 2026
8226958
docs: retake the wait_time warning screenshot at 1x so it matches the…
AmishaBisht Sep 30, 2026
99924f9
Merge branch 'main' into docs/ai-webhook-wait-time
shijithkjayan Sep 30, 2026
3fbc6c8
docs: retake the filesearch-gpt wait_time screenshot on the FUNCTION …
AmishaBisht Sep 30, 2026
9c9dd47
Merge branch 'docs/ai-webhook-wait-time' of https://github.com/glific…
AmishaBisht Sep 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<tr>
<td><b>3 minutes read</b></td>
<td style={{ paddingLeft: '40px' }}><b>Level: Advanced </b></td>
<td style={{ paddingLeft: '40px' }}><b>Last Updated: March 2026</b></td>
<td style={{ paddingLeft: '40px' }}><b>Last Updated: September 2026</b></td>
</tr>
</table>
</h3>
Expand Down Expand Up @@ -73,6 +73,39 @@ Then you can use that response as **@results.mywebhook.success_message** Or if y

Here my webhook is a custom name you defined on your webhook node and **success_message** is the key of the response object you send back in a webhook call.

___
## Wait time for AI function webhooks

Some of the pre-defined webhook `functions` do not answer immediately. `filesearch-gpt`, `voice-filesearch-gpt`, `speech_to_text` and `text_to_speech` send the request to the AI service and pause the flow at that node until the answer comes back.

Glific waits **60 seconds** for that answer by default. If the AI takes longer, which is common for long voice notes or large knowledge bases, the flow moves ahead without a response and the end user gets an empty message.

On these four nodes you can set your own wait time, up to **5 minutes (300 seconds)**. Open the node, select **FUNCTION Body**, and add a `wait_time` parameter with the number of seconds you want Glific to wait.

![The wait_time field in the Function Body of a webhook node](../../../../static/img/flows/flows_webhook_wait_time.png)

For example, to wait 3 minutes for an assistant to answer:

```
{
"question": "@results.question",
"assistant_id": "asst_xxxxxxxxxxxxxxxxx",
"wait_time": 180
}
```

### Rules to keep in mind

- The value is in **seconds**, not minutes. `180` means 3 minutes.
- Use a whole number (`180`) or a number in quotes (`"180"`). Both work.
- A flow variable will not work here. `"wait_time": "@results.some_value"` is ignored, because Glific reads this value when it validates the flow, before variables are filled in. Always enter a fixed number.
- Leave the field blank, remove it, or enter something that is not a number, and Glific waits the default 60 seconds. Existing flows are unaffected.
- The maximum is **300 seconds**. Enter more and Glific shows this warning when you publish, then waits 300 seconds:

> You've configured a wait_time of 600 seconds which exceeds the allowed wait time of 300 seconds. We will use the allowed wait time only.

- The value stays inside Glific. It is never sent to the AI service, so it does not change the response.

___
## Checking Webhook Logs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<tr>
<td><b>5 minutes read</b></td>
<td style={{ paddingLeft: '40px' }}><b>Level: Intermediate </b></td>
<td style={{ paddingLeft: '40px' }}><b>Last Updated: February 2026</b></td>
<td style={{ paddingLeft: '40px' }}><b>Last Updated: September 2026</b></td>
</tr>
</table>
</h3>
Expand Down Expand Up @@ -90,6 +90,10 @@ Also, make sure, that the default optin message from the Gupshup portal is disab
> - **Condition:** A node is triggered multiple times with the same message body.
> - **Threshold:** 3 times
> - **Action:** After the 3rd repetition of the same message at the same node, the system flags it as an **infinite loop**.
14. `Wait time warning` - This warning appears when a `wait_time` above 300 seconds is set in the `Function Body` of an AI webhook node (`filesearch-gpt`, `voice-filesearch-gpt`, `speech_to_text`, `text_to_speech`). The flow still publishes, but Glific waits only the allowed maximum of 300 seconds (5 minutes). Set a value of 300 or less to remove the warning. Read more in [Call a webhook](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Call%20a%20webhook/#wait-time-for-ai-function-webhooks).

![The wait time warning shown when publishing a flow with a wait_time of 600 seconds](../../../../static/img/flows/flows_webhook_wait_time_warning.png)

---

## Logs to know if any errors are thrown while executing the flow
Expand Down
12 changes: 11 additions & 1 deletion docs/5. Integrations/Speech to text capabilities in Glific.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<tr>
<td><b>6 minutes read</b></td>
<td style={{ paddingLeft: 40 }}><b>Level: Advanced</b></td>
<td style={{ paddingLeft: 40 }}><b>Last Updated: April 2026</b></td>
<td style={{ paddingLeft: 40 }}><b>Last Updated: September 2026</b></td>
</tr>
</table>
</h3>
Expand Down Expand Up @@ -48,6 +48,16 @@ Add a Send Message node and paste this variable to show the converted text to th
<img width="683" height="621" alt="Screenshot 2026-05-08 at 4 25 19 PM" src="https://github.com/user-attachments/assets/adb845df-0339-4ce3-a47b-e15aef8ce8be" />


## Setting the wait time for the transcription

Glific pauses the flow at the `speech_to_text` node while the voice note is transcribed, and waits **60 seconds** by default. A voice note longer than a minute can take more time than that, and once the wait is over the flow moves ahead without the text.

To wait longer, add a `wait_time` parameter, in **seconds**, to the `Function Body`.

![The speech_to_text Function Body with a wait_time of 120 seconds](../../static/img/integrations/speech/speech_to_text_wait_time.png)

The maximum is 300 seconds (5 minutes). Leave it blank and the default of 60 seconds applies. Read more in [Call a webhook](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Call%20a%20webhook/#wait-time-for-ai-function-webhooks).

# Default behaviour for speech-to-text webhook calls
- By default, the speech-to-text function performs transcription of the incoming voice note only using the `gemini-2.5-pro` model and gives a text output in the same language as the language of the incoming voice note.

Expand Down
12 changes: 11 additions & 1 deletion docs/5. Integrations/Text to speech capabilities in Glific.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<tr>
<td><b>6 minutes read</b></td>
<td style={{ paddingLeft: 40 }}><b>Level: Advanced</b></td>
<td style={{ paddingLeft: 40 }}><b>Last Updated: April 2026</b></td>
<td style={{ paddingLeft: 40 }}><b>Last Updated: September 2026</b></td>
</tr>
</table>
</h3>
Expand Down Expand Up @@ -50,6 +50,16 @@ Add the parameters as shown in the screenshot.

- Set up instructions: [Google Cloud Storage integration](https://glific.github.io/docs/docs/Pre%20Onboarding/Google%20Cloud%20Storage%20Setup%20-%20GCS).

## Setting the wait time for the response

Glific pauses the flow at the `text_to_speech` node while the voice note is generated, and waits **60 seconds** by default. Audio for a long message can take longer than that, and once the wait is over the flow moves ahead without the voice note.

To wait longer, add a `wait_time` parameter, in **seconds**, to the `Function Body`.

![The text_to_speech Function Body with a wait_time of 120 seconds](../../static/img/integrations/speech/text_to_speech_wait_time.png)

The maximum is 300 seconds (5 minutes). Leave it blank and the default of 60 seconds applies. Read more in [Call a webhook](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Call%20a%20webhook/#wait-time-for-ai-function-webhooks).

#### Default parameters for speech_to_text node
When only `text` parameter is passed the following default values of model and voice are used

Expand Down
12 changes: 9 additions & 3 deletions docs/5. Integrations/Using AI Assistants in Glific Flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Glific’s File Search using OpenAI Assistant enables users to upload documents
- Using the Assistant in your Flows (including handling follow-up questions)
- Handling Voice Inputs and Responses

To create or modify an assistant, see [Creating and modifying AI assistants in Glific](https://glific.github.io/docs/docs/Integrations/Creating%20and%20modifying%20assistants%20in%20Glific/).
To create or modify an assistant, see [Creating and modifying AI assistants in Glific](https://glific.github.io/docs/docs/Integrations/AI%20Assistants/).

---

Expand Down Expand Up @@ -74,10 +74,13 @@ _Screenshot of example flow set up is given below_
<img width="" height="" alt="Screenshot 2025-12-02 at 6 10 59 PM" src="https://github.com/user-attachments/assets/aff3ba8d-e5d0-4958-b10c-2bfa481d2128" />

- In `question` parameter enter the flow variable containing the question asked by the user. In the given example `question` is the `result name`, hence provided `@result.question` in the question parameter.
- In `assistant_id` enter the assistant ID, copied as described in [Creating and modifying AI assistants in Glific](https://glific.github.io/docs/docs/Integrations/Creating%20and%20modifying%20assistants%20in%20Glific/)
- In `assistant_id` enter the assistant ID, copied as described in [Creating and modifying AI assistants in Glific](https://glific.github.io/docs/docs/Integrations/AI%20Assistants/)
- `wait_time` is optional. It is the number of **seconds** Glific waits for the assistant to answer before it moves ahead in the flow. Leave it blank and Glific waits 60 seconds. Large knowledge bases or long answers can take longer, so set a higher value such as `120`. The maximum is 300 seconds (5 minutes). Read more in [Call a webhook](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Call%20a%20webhook/#wait-time-for-ai-function-webhooks).

<img width="" height="" alt="Screenshot 2025-12-02 at 9 18 23 AM" src="https://github.com/user-attachments/assets/880a4181-bd79-4d04-92aa-c0d502456bd5" />

![The filesearch-gpt Function Body with a wait_time of 180 seconds](../../static/img/integrations/openai/openai_filesearch_wait_time.png)

#### Step 4: Display the Assistant's response
- Once the Webhook is updated, add a `Send Message` node and enter `@results.gptresponse.message` variable to receive the AI response.
- In the given example `gptresponse` is the `result name` (refer to Step 2). If `ai_response` was the result name, the variable would be `@results.ai_response.message`.
Expand Down Expand Up @@ -140,9 +143,12 @@ Pass the following paramters in the function body.

- For `contact ` keep this value as `@contact` as mentioned in the screenshot.
- `speech` is the result name which is storing the voice note sent by the user.
- `assistant_id` is the assistant ID, copied as described in [Creating and modifying AI assistants in Glific](https://glific.github.io/docs/docs/Integrations/Creating%20and%20modifying%20assistants%20in%20Glific/).
- `assistant_id` is the assistant ID, copied as described in [Creating and modifying AI assistants in Glific](https://glific.github.io/docs/docs/Integrations/AI%20Assistants/).
- `source_langauge` is the expected language of the user.
- `target_language` is the language that the response voice note needs to be in.
- `wait_time` is optional. It is the number of **seconds** Glific waits for the response before it moves ahead in the flow. The default is 60 seconds. Voice takes longer than text, so `120` to `180` is a good starting point here. The maximum is 300 seconds (5 minutes). Read more in [Call a webhook](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Call%20a%20webhook/#wait-time-for-ai-function-webhooks).

![The voice-filesearch-gpt Function Body with a wait_time of 180 seconds](../../static/img/integrations/openai/openai_voice_filesearch_wait_time.png)

#### Step 4: Display the text response
- Create a `Send Message node`.
Expand Down
Binary file added static/img/flows/flows_webhook_wait_time.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Comment thread
shijithkjayan marked this conversation as resolved.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading