Embed a google form in email with script the way google does it when option include form in email is used

前端 未结 2 1136
慢半拍i
慢半拍i 2021-02-14 06:43

I have to send a form to some people and I do it with a google script. I try to embed the form in the email with this code : https://stackoverflow.com/a/23671529/4305236:

2条回答
  •  旧巷少年郎
    2021-02-14 07:11

    When Google sends the form to folks directly and embeds the form in the email they are using their new offering called AMP. You can read more about it here:

    • https://developers.google.com/amp/
    • https://www.blog.google/products/g-suite/bringing-power-amp-gmail/
    • https://developers.google.com/gmail/ampemail/

    The code you're using gets the raw HTML of the form as it would be rendered for a user in a browser. This code is not in AMP format. Ergo it will not do what you want.

    If you want that AMP experience you will need to create the AMP email yourself.

    I don't think FormApp has a programatic way to send the form to folks, like you can from https://docs.google.com/forms/.

    I hope that helps.

提交回复
热议问题