CSS & Email questions

CSS & Email?
Allow me to preface by saying that I acknowledge and apologize for breaking the first rule of any forum. I did look for these answers and have been playing with the platform a lot over the last two days during down time.
A. How would I Email the invoice [programmatically] instead of printing?
B. How do I change the colors and fonts in the Invoice Template? Or any widget?
My goal is to build a single source of truth leveraging a lot of Python etc. to keep tabs on all the datapoints in real time. Ill save you the full description of the manual Scraping > Importing > cleaning fever dream that is my current workflow
Grist is installed on latest Ubuntu in WSL on win 10 so I’m self-hosted [free edition] but not desktop if that makes a difference. I have very little Fu in this area, I’m a network guy (sales really) coming from Excel to Air table a couple years ago so N00b would be an understatement. But Grist+Py seems like what I’m looking for and I cant wait to build what ive always wanted. I have plenty more questions but these two are stumping me. questions Ive tried so many different proprietary apps + GOOG + MSFT just to realize this config won’t work with XYZ…

Hi there!

There’s no good way to programmatically email the invoice instead of printing. The widget uses the browser’s built-in print function. You may be able to modify the code to handle emails but I’m not sure how one would do that. I have some directions below on how to modify the code to change the colors and fonts. For email, you could do a bit more manual process. You would need to download the invoice (click ‘Print’ then ‘Save as PDF’), then upload the PDF to an attachment column in the same record. Use an integrator service like Zapier to trigger an email that includes the invoice in the attachment column.

Here is a list of integrator services that work with Grist. You’ll need to find one that works with your email provider. Zapier is the easiest to use but most expensive. There’s also an example walkthrough of setting up an email integration with Gmail: Integrator services - Grist Help Center

All of the code for the Invoice custom widget is located here: grist-widget/invoices at master · gristlabs/grist-widget · GitHub

You can copy the code to your own host site and customize to fit your needs. Then, you’ll want to call your custom widget in place of ours. Instructions for calling a custom widget can be found here: How to call Custom Widget - #2 by natalie-grist

You can find the code for all of our pre-made custom widgets here: GitHub - gristlabs/grist-widget: A repository of custom widgets to embed in Grist documents

We also have our Custom Widget Builder which allows you to write the code for a custom widget directly in Grist. Learn more here: New community widget - Custom widget builder

I hope this helps! Please let me know if you have any follow up questions.

Thanks,
Natalie