CSS & Email questions

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