Skip to main content

How to add places to your map from a Google Form with a webhook

Automatically add a new place to your map every time someone submits a Google Form — no manual syncing needed, with the Google Sheets Sync feature.

PamPam's Webhook URL lets your map update itself in real-time when a new Google Form response comes in. When someone fills out your form, a small script sends the response straight to PamPam — the new place gets added, geocoded, and your map adjusts to show it automatically.

Note:

  • Webhooks are only available on Business plans and above.

  • Your Google Sheet must already be connected to your map via the Google Sheets sync before you can use this feature.


This is helpful when:

  • You're collecting location submissions from your community (e.g. "nominate a spot") via a Form

  • You're running an event or tour where new stops get added over time, via a Form

  • You want collaborators to add places to your map without giving them editor access


How to connect your Google Form to your PamPam map

1. Connect your Google Sheet to your map

Your Google Form must be linked to a Google Sheet, and that sheet must already be connected to your PamPam map. If you haven't done that yet, set that up first — go to Imports and connect your Google Sheet, then set up your column mapping.

2. Generate your Webhook URL, then Copy it

In the Imports panel, scroll down and open Advanced settings. Click "Generate" next to the Webhook URL. Then click into the box with the URL to Copy it.

3. Open your Google Form and go to Apps Script

In your Google Form, click the three-dot menu in the top right and select "Script editor". This opens Apps Script attached to your form.

4. Paste in the script

Delete any placeholder code and paste in the following, replacing YOUR_WEBHOOK_URL with the URL you copied and updating the field names to match your form questions exactly (including capitalization):

Note: The script uses your Google Sheet column names (e.g. "Passenger Name", "Traveling from") — not the PamPam display field names like "Title" or "Address". PamPam uses your column mapping to figure out which column is which.

Pro tip: Not sure how to fill in the script? Paste this article into Claude or ChatGPT and ask it to write the script for you. Share a screenshot of your Google Sheet columns and your PamPam import settings alongside the article text, then ask it to "write an Apps Script for this." It will generate a ready-to-paste script with your exact column names already filled in.

function onFormSubmit(e) { var itemResponses = e.response.getItemResponses(); var values = {}; for (var i = 0; i < itemResponses.length; i++) { values[itemResponses[i].getItem().getTitle()] = itemResponses[i].getResponse(); } var payload = { data: { "Your Title column name": values["Your Title column name"] || "", "Your Address column name": values["Your Address column name"] || "", } }; UrlFetchApp.fetch("YOUR_WEBHOOK_URL", { method: "post", contentType: "application/json", payload: JSON.stringify(payload) }); }

5. Save the script

Click the Save icon (or press Cmd+S / Ctrl+S) and give the project a name — anything works, like "PamPam webhook".

6. Set up the trigger

  1. Click the Triggers icon (clock icon) on the left sidebar

  2. Click "+ Add Trigger"

  3. Set the function to onFormSubmit

  4. Set the event source to "From form"

  5. Set the event type to "On form submit"

  6. Click Save

  7. Google will open a popup asking you to authorize the script. If nothing appears, check that your browser isn't blocking popups and allow them for script.google.com, then try again.

7. Test it

Submit a test response through your Google Form. Within a few seconds the new place should appear on your map, geocoded and ready. Your map view will zoom to fit the new place in frame.


Best practices for using the Add place webhook:

  • Use your Google Sheet column names in the script — not the PamPam field labels. For example, if your sheet column is called "Traveling from" and PamPam maps that to Address, use "Traveling from" in the script

  • The column names in the script must match your sheet exactly — capitalization matters

  • Keep your webhook URL private — anyone with the URL can add places to your map

  • If it's not working, debug by going to "Executions" in the Appscript and seeing any errors and sharing those with ChatGPT or Claude. Most errors come from not using the exact titles in your spreadsheet columns.

Did this answer your question?