I am trying to get some SMS notifications every time someone fills a google form that I created. This Google Form automatically saves the information into a new row.
So far, I have tried using the Google Watch Changes without any success:
It seems that when the row is filled by google form or other tool then the addon doesn’t call the webhook. It works great when you manually fill in the row.
Anyway at this moment I would recommend you using Watch rows module with 1 minute interval and set reasonable amount of bundles to be processed, then use Text aggregator and then send it via notification (also you don’t need text aggregator, but in case of more rows in a minute, you will get few notification instead of one).
@Cyrus3v I was searching for a way to trigger my flow after each google form submission and came across your post.
I was able to solve for this by doing the following:
Setup my Google Form (in Google) to notify me via email of each new submission.
Setup a filter on my Gmail (in Google) to forward emails from google forms to a mailhook (in the webhook module in make)
The mailhook has an instant trigger, so when it receives the forwarded email from my gmail it triggers the scenario, but since the trigger has none of the data from the Google Form, I actually use this trigger to send a make api call to make. See this post on the run scenarios via api. 🔥 Feature Spotlight: Scenario Inputs, On-Demand Scheduling, Run Scenarios via API
The scenario it triggers starts with a Google Forms module, which when triggered will find the most recent Google Form response and all the associated data which I can then use in the scenario.
This is quite a complicated workaround, especially for your use case, but maybe someone searching on how to do this in the future will find my response here helpful. If there is enough interest I can submit a showcase post on this with screenshots and blueprints.
EDIT: I found a much more efficient workaround thanks to ChatGPT code. Sharing here:
Go to the Google Sheet that is linked to the Google Form, and in extensions, navigate to ‘apps script’
Good luck and I think this is the method I will use in the future if I need instant triggers from a Google Form.
const WEBHOOK_URL = "https://your-webhook-url.com";
function onFormSubmit(e) {
// Get the form response data as a key-value map
var formData = e.namedValues;
// Convert the form data to a JSON object
var data = {};
for (var key in formData) {
data[key] = formData[key][0];
}
// Prepare and send the HTTP request to the webhook
var payload = JSON.stringify(data);
var options = {
method: "post",
contentType: "application/json",
payload: payload
};
UrlFetchApp.fetch(WEBHOOK_URL, options);
}
cool solution!! I’m curious though if there is a simpler solution. I haven’t tested this but each google form has a corresponding google sheet where the submitted answers are stored. could you not watch that sheet for changes and use that as a trigger?
I haven’t tested the watch google sheet, but earlier in this thread it sounded like when the google form (or other tool) adds data it wasn’t triggering the make scenario.
I’m still exploring options but the Apps Script version I kind of like, I even tested adding more questions to the Google Form and redetermine the data structure, and the new question/answer shows up.
Curious if anyone else can add to this discussion that has more experience with Google Forms.
Hi Joseph,
I’m trying to do what you kinldy suggest.
I have a form which records into a Google sheet the input data and then I transform text into audio. If I schedule th service every 15 minutes it’s ok, but I would like to do at the same time I submit the form.
So I have 2 problems: the first problem is that when i subit the form the function does not start automatically.
If I try to start it manually I have got an error: TypeError: Cannot read properties of undefined (reading ‘namedValues’)
at onFormSubmit(Codice:5:20)
If I understand what you did, I have to modify my scenario, the firt module will be a Webhook instead of watch sheet, right?
Thank you.
Andrea
Correct. I created a webhook as the start of my scenario. It uses the instant trigger, so it starts the scenario when it is called. If you haven’t used a webhook before, I recommend reading a bit about it on Makes help section. Just remember to ‘redetermine the data structure’ if you make changes to the google form in the future.
You are very kind Joseph.
By the way I used the telegram bot which was fine for me (i had to transform text into an mp3 speech) and leaved google forms. Thanks anyway