Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Google Docs for Mailer templates?

Is it possible to use Google Docs for Mailer templates? How can I change template variables via API? Basically, I want to keep a template on Google and export it as a PDF file after changing few variables like name, address etc. Is it possible to do it completely via API in PHP?

LiveDocX is providing these features but I think docs are not share-able.

like image 920
understack Avatar asked Jan 25 '10 06:01

understack


People also ask

Is there an email template in Google Docs?

(You can also go to File > Email > Email draft.) Hit enter, or click the option, and an email template will show up in your document. You can now draft the email in Google Docs, complete with a subject line and whatever vitally important message you need to share.

How do you insert a template in Google Docs?

Use a Google templateOn your computer, go to Google Docs, Sheets, Slides, or Forms. At the top right , click Template Gallery. Click the template you want to use. A copy of the template opens.

How do I insert a Google Doc into the body of an email?

On your computer, open a Google Doc. At the top left, click Insert > Building blocks > Email draft. You can also type "@email" in the doc and press Enter.


1 Answers

Not quite sure that I understand the use case here, but I think what you are wanting to do it to generate a series of PDFs that have been personalized with info like name and address to then mail out as shared web accessible documents on Google Docs.

If that is right, then yes I think you should be able to do that.

Step 1) Create the template in Google Docs.

Step 2) Copy the document using the API here: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#copying_documents

Step 3) Edit the new document with the personalized info using the API here: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#updatingchanging_documents_and_files

Step 4) Share the new document with the appropriate person using the API here: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#managing_sharing_permissions_of_resources_via_access_control_lists_acls

If you are specifically wanting the customized PDF the API for exporting is here (but I don't think you can share it as a PDF, though you can share it as a read-only document): http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#downloading_documents_and_files

Hope that helps.

like image 138
Jackson Miller Avatar answered Oct 11 '22 19:10

Jackson Miller