Php – How to use Google Docs for Mailer templates

google docsmailerPHPtemplates

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.

Best Answer

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.

Related Topic