Anyone who has attempted to produce a document that is more than a single page invoice or screen snapshot will have experienced the struggles / limitations that currently exist in Bubble.is
I’m seeking some co-sponsors to privately outsource (via a freelance project) the buidling of a new plugin that can be provided to members (free / paid?) to connect with Webmerge - a cloud based solution for generating MS Word and PDF documents for complex business scenarios (e.g. contracts and the like)
Seeking a simple clean solution that sends data already captured / stored in Bubble > off to Webmerge via the Plugin / API to compile the document in the cloud > and completed document returned directly to bubble.is database in as near-as real-time is possible (actual time may depend on the Webmerge plan the user selects)
All document template creation and maintenance is performed in Webmerge.
I’ve never built or paid for a plugin to be built before. But I’m keen to hear from the community if you would be interested in either a) contributing to the plugin development; b) utilising the plugin for a low/reasonable monthly or one off fee c) taking a stab at developing the plugin. If c) you can take a look at the freelance request I posted earlier Webmerge API for Doc Gen - Seeking fixed price quote
I just completed a project that involved doing a Webmerge integration from Bubble.is, and it worked very well. The only trouble I had was with repeated/nested data structures and getting a document back into Bubble (which I was able to solve, it just seemed non intuitive). I could see the value of merge actions and returning lists of fields and documents. A plug-in could make things easier for folks that don’t want to tangle with the API.
Brett, there are two steps, after installing the API connector:
Create an API name it something like Webmerge as the API Name, choose Authentication of HTTP Basic Auth. Then in Webmerge, on the upper right, go to API Access and create a new API Key for Bubble. Name it something like ‘Bubble’ and then you need to copy and paste the Key and the Secret into the API Connector back Bubble as your username and password.
Now that this has been done you are going to add ‘calls’. Name them something useful, like the document name over in Webmerge. Use as: Action, Data type: Text, then pick POST and put in the merge URL for that document. Where do you get the merge URL you ask? Go back to Webmerge and for a document, go to the Merge tab and copy the Merge URL under custom integration.
The test or production one? Well, there’s a way to send that over from Bubble based on which environment you are in so pick production. Add an URL parameter with a Key named ‘test’ and set the default value to 1, private unchecked. Then when you call the API you will set this based on the ‘Is Development’ flag - true = 1, false = 0.
Make sure the body type is JSON and start adding parameters that match your merge fields in webmerge. Make the Key name the same as your {$merge_field} for ease, set a test default value that looks like the data type you will actually be sending, and then uncheck everything else but optional, unless you want the call to fail if a value isn’t present.
Then go over to Bubble, and call the API in an action step of a workflow and begin assigning parameters.
Other tips:
a. I find it helpful to do formatting in Webmerge, not bubble. So if you have a currency or date, format it in the document using the Webmerge format (which is, I think, Smarty).
b. If you have tables or other one-to-many type relationships to send over to Webmerge, please let me know how to do it. I end up with a flattened monstrosity with {#customer1}, {$customer2}, etc. and 100 parameters. I think all of this could be put into a single JSON filed and then parsed in Webmerge, but I don’t have time for that.
c. Data routes are the super set of all fields in the documents.
d. You can also create fields in Webmerge like {$email_address} that don’t live in the actual document, just in the Delivery mechanism like email, and make these into parameters from Bubble. This is super useful, at least for me. Anywhere in Webmerge a {$value} exists you can send it via the merge URL API, not just in the documents.
That’s it for now. I can answer questions as best I can, but I’m only on the forums every few days. I recommend trying it, doing some experimentation, maybe with a test document.
Also, all of this is notwithstanding the need for a Webmerge plugin. Doing what I have outlined above creates a lot of incremental work for each document, and a well-designed plugin could do a lot of the heavy listing, especially if there’s a way to read in the parameters. Much of the pain in doing each merge as a call is making sure the names match, and going back and forth.
Likewise if anyone can solve the nested value problem for one-to-many table-type data over the API Connector, I’ll buy you a drink.
Would tools like FormAPI.io be similar to what you’re looking to do? The PDF Filler plugin was commissioned to allow templated-documents to be filled with dynamic data from applications, which seems similar to what you’re looking to do with Webmerge.
Thanks for the link. But from what I can see the FormAPI.io is a bit more about using a fairly static pdf file and injecting text into the fields, where as I’m looking for something that will enable for more dynamic type documents where entire clauses are subject to multiple pre-conditions… also the ability to retrieve a MS Word doc is important for some clients…
Appreciate the thoughts and keep them coming if you think I’ve missed something.
I ended up leveraging a service called Reporting Cloud and the API set up that was provided by Vlad. Reporting Cloud is much cheaper than Webmerge and I found it a lot easier to work with.
I’ll try and dig up the brief tutorial he put together which was very useful.
Here it is mate. I just copied exactly what he did with workflows etc and all seemed to work. I haven’t touched it for a bit but will need to revisit soon. Let me know how you go, keen to hear others experience with it.
Awesome. Thank you! I see I’d actually “liked” Vlad’s notification about this. Unfortunately that was a crazy time and I’d since forgotten all about it. Thanks for bringing this back to me.
Hi Cole, Yes we got this working using an API to connect to Reporting Cloud (which was one of the more affordable tools). It produces MS Word and/or PDF. Takes between 2-10 seconds depending on the template complexity. See above comments with the link to Vlads instructions. I set it up by following those.
A solution I have worked with for a year and produced thousands of documents with, is Integromat. They have an integrated word-module that takes a word file and fills out all areas with brackets like {{name}} {{surname}}. My main culprit with webmerge is the price, and integromat is way way cheaper. I combine that with cloud convert to get the output as pdf (also inside integromat).
From Bubble you need to make a post to integromat with a url to the word-template and all values that need to be merged in the document.
But I agree with OP that a solution where we could produce documents inside bubble would be neat. Something like a mailchimp WYSIWYG editor for wordfiles that could be used by users, if that makes sense…