🫧Bubble.io questions

Bubble FAQ

How do I properly handle docMaker errors in Bubble?

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"
}
How to handle multiline inputs in Bubble?

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

Last updated