A webhook is a web address that other tools can send data to. This recipe uses the When a webhook is received trigger to catch a form submission and Create record to save it. It's meant to get leads from your website form into Tape without copying them over.
What you'll need
A
Leadsdatabase app with the text fieldsNameandMessageand an email fieldEmail.A form tool that can send a webhook when someone submits a form.
Build the automation
Open the
Leadsapp and click the automations icon at the top right (Create and view automations).Select
New automation, then selectWhen a webhook is received.Under
Send webhook to:, selectCopyto copy the webhook URL.In your form tool, add the URL as the destination of the webhook. Then submit a test response.
Back in the automation, select
Refresh. The trigger showsNo webhook received yetuntil Tape has received a call. Afterward, selectVariablesto see one variable for each key in the data your form tool sent.Select
Add action→Create record. The step appears asCreate a record in, followed by the app. ChooseLeadsif it isn't selected.Select
Add fieldand addName, then insert the matching variable from the webhook next toSet value. Repeat forMessage. ForEmail, insert the variable next toAdd values. Required fields are already listed with*.Select
Create automation.
Note:
Keep the URL private. Anyone who has the webhook URL can send data to your automation. At this time, the editor has no option to reset the URL.
Field names matter. The variables are named after the keys in the data your form tool sends. If you rename a question, select
Refreshagain after a new test submission.
Connect Google Forms
Google Forms sends each response through a short script that you add to your form once.
In your form, click
⋮and selectApps Script. Older versions of Google Forms call this optionScript editor.Paste the code below into the editor. Replace
PASTE_YOUR_WEBHOOK_URL_HEREwith the webhook URL you copied in Tape, and keep the quotes. The webhook URL starts withhttps://tapeapp.com/api/catch/.Select the save icon.
Select
Triggersin the menu on the left and add a trigger with these options:onSubmit,Head,From form, andOn form submit. Save the trigger.If Google asks for permissions, allow them for your own account. You may need to select
Advancedfirst.Submit a test response, then go back to the automation in Tape and select
Refresh.
var POST_URL = 'PASTE_YOUR_WEBHOOK_URL_HERE';
function onSubmit(e) {
var form = FormApp.getActiveForm();
var allResponses = form.getResponses();
var latestResponse = allResponses[allResponses.length - 1];
var response = latestResponse.getItemResponses();
var payload = {};
for (var i = 0; i < response.length; i++) {
var question = response[i]
.getItem()
.getTitle()
.replace(/[^a-zA-Z0-9]/g, '_');
var answer = response[i].getResponse();
payload[question] = answer;
}
var options = {
method: 'post',
contentType: 'application/json',
payload: JSON.stringify(payload),
};
UrlFetchApp.fetch(POST_URL, options);
}
The script sends each question as a key. Characters other than letters and numbers in a question title become _, so the question Phone number arrives with the key Phone_number.
Connect Jotform
Jotform sends each submission to the webhook URL through its Webhooks integration.
In your form, open the
Settingstab.Select
Integrationsin the menu on the left and search forWebhooks.Paste the webhook URL you copied in Tape and complete the integration.
Submit a test response, then go back to the automation in Tape and select
Refresh.
The result
Each form submission creates a new record in Leads, for example "Dana Whitfield" with her email and message.
Variations
Add
Send emailto notify your sales team about each new lead.Add a
Conditional actionsstep to route leads from certain countries to a different database app.Save to a different database app per form by building one automation for each form.
Work with the answers in
Execute script. Read them fromwebhook_payload_parsed, for examplewebhook_payload_parsed.Phone_numberfor the questionPhone number. Learn more about the Execute script action →
Learn more
FAQs
Can I save files from a form?
Can I save files from a form?
Yes, if your form tool sends the files with the webhook. They appear as Webhook files, which you can add to a file field with Add files.
Why did no record appear?
Why did no record appear?
If no record appeared, it could be because:
The form tool didn't send the webhook. Submit a test response and select
Refresh.The automation is
Paused.A required field in
Leadshas no value. Set a value for every required field inCreate record.
Can I use a different form tool?
Can I use a different form tool?
Yes! Any tool that can send a webhook works the same way. Add the webhook URL as the destination in that tool, then follow the steps above.
Are you a developer using the Tape API for automations?
Are you a developer using the Tape API for automations?
The automation API has its own documentation for developers. Full reference: Triggers in the developer docs →
Still have questions? Find answers and get help from community experts in the Tape community →
