I have a template column which holds markdown text summary of an order placed by a user on my app.
looks something like this:
Order # 28936
Item
Quantity
Greenfield Cane Moalsses 500G
x 1
Romi Cheese (Apx 300-350g)
x 1
Beef Shawarma Halal 500g
x 1
Any advice how I can get this markdown text printed? The trigger to print doesn’t have to be automated. I will press a button to print a copy of the order which is then attached to the order for shipping.
That’s a bit rough, because you’ll get the markdown formatting with it, so you’d then need to paste it into something that can render the markdown, before printing it.
An alternative would be to email it to yourself and then print the email?
If you wanted to get fancy, you could send the raw data through a webhook to something like Integromat, and then create a scenario that inserts the data into a template and emails it as an attachment, which could then be printed.
Thank you Darren.
I have 2 columns, a template text summary and a template markdown summary.
I hope to print an order summary using a thermal printer so I want to keep the Markdown format
I am still not sure how to break this down, correct me if the below is wrong:
A click on the print button in the Glide App will trigger a custom action that adds a row in Google Sheets to the Print Tab (or delete the row there and add a new one to save rows).
(or do I replace this step with another that passes the value of the field outside Glide?)
Zapier or Integromat recognizes a new row added to the google sheet and reads the value of the summary cell (markdown)
somewhere in between I have to convert the markdown to pdf or to html then pdf?
how do I automate a print command without having to press another button outside Glide?
We do something a bit similar in one of our apps. When somebody creates an invoice (adds a row to an invoices table) within the app, that same action also sends the details (a few of the column values) to Integromat via a Webhook. We use Integromat to insert them into a template (in this case a formatted Google doc) and then convert to a PDF. In our case we then send that PDF via Telegram or email. The commonality is the requirement to get some formatted data out of Glide and into a PDF that you can then do something with.
Yes. If you’re using a Google Doc as your “template” and populating it from a webhook then you can add the “Download As PDF” module. This creates the PDF and makes it available within Integromat for you to subsequently email / Telegram / whatever.
Would you advice to use the Integromat scenario below or should I give the App Script a try?
the data in the Google Sheet will be in Markdown. Would I need to convert in App Script to a different format then to the printer? I’l have a look at the community I think i saw you post sample scripts for a very similar scenario?
I don’t think you answered my question about whether or not the printer has an API or some other listening interface that you can post data to.
Again, if it does, the Apps Script solution should be quite straight forward. If there is an API and you can point me at the associated docs, I don’t mind helping you with that.
But if there is no way to communicate directly with the printer, then the integromat option is probably the next best choice.
apologies for that, the printer is in the UK while i am working on the app from Qatar. I’ve yet to receive the info regarding the printer. thank you for the advice.