Has anyone figured out a way to retrieve the File in the backend workflows in the same step using the PDF Conjurer plugin?
I see that there is a step called ‘Upload PDF’ in which it triggers a different backend workflow to save the file. I have done this successfully.
However, what I am trying to do is convert the Conjured content to an actual PDF file in the same workflow step.
What type of content is the Conjure PDF content actually creating? I thought maybe it was something that I needed to decode from base64.
Anyone have experience with this? @vini_brito Maybe you can answer since you created it.
I would post the content but it is huge. Here is a screenshot of a part of the content. Anyone know what it is or how to convert it without sending it to another backend workflow?
@J805
Hi Jason! The doc is confusing when it comes to that part, but in short you need to create a file upload API workflow and send that big text to that workflow.
First create the upload API workflow, make it look like this:
After you do that, use the “Upload PDF” workflow action, like this:
Upload PDF
Use this action to upload the resulting PDF via a back-end workflow. Keep in mind that you need an API workflow that receives a file type field. This action returns the uploaded file URL.
Upload file URL: The URL of your API Workflow that uploads the file to the Bubble server (see below for more details).
File input name: The input name that receive the file (file type) in you API Workflow.
File name: The result of the action “Conjure PDF” File name.
Content: The result of the action “Conjure PDF” Content.
Authentication: In the case the upload API Workflow needs an authorization token (the API key or a token provided by a authentication API Workflow)
And this is what I have for docs currently. If you end up having some spare time, consider adding some input to this to help future readers
I didn’t realize that the ‘Upload PDF’ workflow would actually return the PDF for me. Really nice plugin. Super helpful once I was able to figure out how to use it.
I may be having a complete brain fart at the moment, but I cannot create the file for some reason on the backend. I am using a backend workflow for my PDF creations.
I have an upload-pdf workflow as you had mentioned previously
So, I did figure this out in case anybody has the same issue. The upload workflow has to have “Expose as public API workflow enabled”. Otherwise it won’t work
I’m with this mistake could help me?
Workflow error - Plugin action Conjure PDF error: ReferenceError: counterStyle is not defined at docDefinition.footer (eval at build_function (/var/task/run_plugin_util.js:72:12), :162:28) at LayoutBuilder.addDynamicRepeatable (/var/task/node_modules/pdfmake/src/layoutBuilder.js:201:14) at LayoutBuilder.addHeadersAndFooters (/var/task/node_modules/pdfmake/src/layoutBuilder.js:239:8) at LayoutBuilder.tryLayoutDocument (/var/task/node_modules/pdfmake/src/layoutBuilder.js:161:7) at LayoutBuilder.layoutDocument (/var/task/node_modules/pdfmake/src/layoutBuilder.js:136:20) at PdfPrinter.createPdfKitDocument (/var/task/node_modules/pdfmake/src/printer.js:146:22) at eval (eval at build_function (/var/task/run_plugin_util.js:72:12), :221:33) at new Promise () at getResultingPDF (eval at build_function (/var/task/run_plugin_util.js:72:12), :204:16) at eval (eval at build_function (/var/task/run_plugin_util.js:72:12), :233:34) Error: Outer Error (see above for inner error) at Block.wait (/var/task/u.js:399:33) at Object.async_fn [as async] (/var/task/plugin_api_v3.js:198:27) at eval (eval at build_function (/var/task/run_plugin_util.js:72:12), :231:34) at eval (eval at build_function (/var/task/run_plugin_util.js:72:12), :247:8) at /var/task/plugin_api_v3.js:224:27 at run_fn (/var/task/u.js:550:18)
It looks like maybe a style issue. Specifically, counterStyle possibly. Try removing the style to get it to work. Once you have it working, add the style back in all the places it needs to be. You have to be careful when typing it in so it is exact.
I have spent the last 24 hours trying a lot of different things but I am stuck as well on uploading the file AND updating an existing data type. I checked the documentation, the demo website and this thread but could not figure this out.
I have this long workflow generating an invoice (it’s working, I have an “content” output in the logs):
and here is the “uploader” workflow. My understanding is that I don’t need to “trigger” it, only to add its name in the “Upload file URL” in the “Upload PDF action”.