Google-forms – How to automatically post a Google Form response to a Google Group

automationgoogle-formsgoogle-groups

I created a Google form where I collect some information from users concerning a project and the last question I ask is: "Write your questions about this project?"

What I would like is that the answer the users gives to this point, will be automatically posted as a question in a Google Group I created (type Q&A forum), so that the members of the group can answer this question.

Do you think this is possible and can you give me an idea of how to do this? (I have some programming capacities (for example JavaScript) but I've never worked with Google Apps script, and I have no idea how to start.

Best Answer

Step 1: enable posting to the group by email.

Step 2: install an add-on that emails form submissions to that email address.

Alternative If you prefer not to use Amit Agarwal's script in step 2, you can write your own: open the Script Editor of the form (hidden behind three-dots button) and put something like

function sendResponse(e) {
  var message = JSON.stringify(e.response);
  MailApp.sendEmail("...@googlegroups.com", "New Question", message);  
}

Then go to Edit > Current project's triggers and create a trigger that will run sendResponse on form submit.

The function is obviously just a starter; in practice you will want to create message body (and message title) from the object e.response with more care than just JSON stringifying it.