# Bubble.io questions

<details>

<summary>How do I properly handle docMaker errors in Bubble?</summary>

In order to handle errors in your workflows:

\- if you are using a button to trigger docMaker actions, you will have to set-up a specific workflow to catch errors on this button's workflow, using the custom event : "An element has an error running a workflow" for this button. Then display to your user the Currrent workflow error's message, and also add it to your logs table (if you have one in your app) for future reference.

\- in addition to that, if you use a webhook :  when initializing the webhook you will see that there are a status code and a message in the JSON received from docMaker. Example of successful message to webhook :

```
{
  "success": true,
  "statusCode": 200,
  "message": "file created successfully",
  "result_file": "//3611f468aafc8649dcc4ec273e00346a.cdn.bubble.io/f1693992574960x341126990077366140/result4.pdf",
  "filename": "result4.pdf",
  "object_id": "abc",
  "object_type": "type_abc"
}
```

With this you can implement an error management, by testing if "success" = false, then there is an error. In this case you can display the statusCode and message to your user, and also add them to your logs for future reference.Example of error response sent to webhook:

```
{
  "success": false,
  "status_code": 403,
  "message": "Client error message: missing template, please provide template URL or ID",
  "result_file": "error",
  "filename": "error",
  "object_id": "abc",
  "object_type": "type_abc"
}
```

</details>

<details>

<summary>How to handle multiline inputs in Bubble?</summary>

When passing data in a JSON format with the docMaker Bubble plugin, if the data comes from a multiline input, you will have to use some formulas in order to format data properly:

1. First you have to use the "format as JSON-safe formula to your multiline input's value
2. Then you have to use a trick, which consist in replacing \n by \n, as shown in the screenshot below. It may seem odd, but it is the only solution currently for Bubble to accept line breaks inside a JSON value.

View in editor [here](https://bubble.io/page?type=page\&name=demo_docx_loops\&id=docmaker-plugins\&tab=tabs-2)

![](/files/dSrxpLvN7k89075pTu08)

</details>


---

# 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.docmaker.co/faq/bubble.io-questions.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.
