If you know how to do it with the API, then you can do it with an action button using a script.
See here for how to execute any API command from an action button:
Thanks for your help, but it seems file upload is not a “command” since it requires use of /api/file endpoint instead of api/command
Do you know if this can be done with the fibery service from script context without relying on external http call to the API ?
I also tried using the “http” service provided in the script context, but I’m don’t know if we can create a binary read stream from url and how to post it as a multipart form…
Is that even possible via the integromat integration ?
It would be helpful to have some doc on what is allowed in the script context regarding services available and their API, external dependencies, permanent or temporary storage, duration limits, …
Thanks for your help, as the pdf generation with pdfMonkey is really interesting
Thanks for sharing your problem. I am a developer from the fibery integrations team. I like the idea to create files from URLs and we will definitely implement it in the nearest future.
But I think there is a possibility to close your case right now using built-in possibilities of fibery action buttons and without using pdfMonkey.
Please find below step-by-step instructions on how to implement something you need using Fibery buttons only.
My app in Fibery contains Invoice type with a collection of Line type items.
Add Generate Invoice action button for Invoice type.
In action button popup add action Attach PDF using template
Now we need to provide a template for generating the document. Please find details on how to deal with templates here: Markdown Templates | Fibery Help Center
thanks for your reply. I know about the markdown template and I think it is a very good solution for simple cases but what I need is a more advanced document generation like this one
In the end, I think integrating with an external document generator like pdfMonkey should be easy to do. So could you please answer my question about uploading a file to fibery in an action script ?
We discussed your case and decided to extend API with possibility of creating files from script actions. Will let you know when it will be released to production server.
ok, thank you Oleg for taking time on this.
I think it will be useful for advanced users to be able to manage files from script actions.
But for less techy users, did you discussed about an easier way to create documents from template ? The markdown template is a good idea but I think quite limited regarding subcollections and formatting.
I don’t request anything urgently on this since I was able to proceed with pdfMonkey, but I had to spend something like 5 or 6 hours from end to end : learning and playing with fibery API, learning pdfMonkey API, writing script action (the most tricky part was to collect the data deeply : invoice, client, invoice lines, invoice line description rich text).
So I guess, lot of users would like to have an easier way, and I would like you thoughts on this.
You are totally right about complexity of using Fibery API and automations. Now we have dedicated integrations team in Fibery to make the integrations/automations more usable. But you know, it takes time. We will do our best to fix things and we are going to give a much more easy way in future.
There is just text area for editing templates now. But we are going to add more powerful editor for markdown in future for PDF or Document templates in future.
I just meant that, at the moment, the guide for how to create markdown templates seems to only demonstrate how to refer to simple text fields.
I was wondering how to use markdown to refer to rich text (or other field types for that matter).