Connect Google Sheets With Bricks Forge Pro Form Webhook

Sdílet
Vložit
  • čas přidán 21. 07. 2024
  • In this video, you will learn how to connect Google Sheets with your Bricks Builder Forms. We user Bricks Forge Pro Forms and webhooks to send the form data to Google sheets using a Google Apps script.
    The JavaScript for simple forms like the one shown in the video (JS for advanced forms is at the bottom):
    function doPost(e) {
    //get the active spreadsheet that this app script is attached to.
    var sheet = SpreadsheetApp.getActiveSheet();
    // Parsing the data received from the webhook
    var data = JSON.parse(e.postData.contents);
    //create an array of data parsed from the JSON
    var row = [data.name, data.email, data.phone, data.message,data.response];
    //append the array of JSON data to the spreadsheet
    sheet.appendRow(row);
    return ContentService.createTextOutput(JSON.stringify({result: "success"}))
    .setMimeType(ContentService.MimeType.JSON);
    }
    Wondering what tools I use at my agency? check them out below!
    Bricks Forge: bricksforge.io/?aff=c5a44148
    Meta Box: metabox.sjv.io/qn39VL
    Automatic CSS: automaticcss.com/ref/41/
    Fathom GDPR Analytics: usefathom.com/ref/QPRTID
    Vultr Servers: www.vultr.com/?ref=9088377
    Fluent Forms: fluentforms.com/?ref=1552
    Slim SEO: slim-seo.sjv.io/QOaOqa
    Rank Math: rankmath.com/?ref=john-2176
    WP Code Box: wpcodebox.com/?ref=190
    GridPane Hosting: gridpane.com/?via=john70
    Chapters
    0:00 Intro
    1:55 Google Apps Script Setup
    9:34 Bricks Forge Pro Form Setup
    19:00 Experiments!
    Java Script for advanced forms that have check box, radio, and select fields:
    function doPost(e) {
    // Get the active spreadsheet that this app script is attached to.
    var sheet = SpreadsheetApp.getActiveSheet();
    // Parsing the data received from the webhook
    var data = JSON.parse(e.postData.contents);
    // Function to handle array inputs (e.g., from multi-select lists)
    function processArray(value) {
    if (Array.isArray(value)) {
    return value.join(', '); // Joining the array elements with a comma and space
    }
    return value;
    }
    // Create an array of data parsed from the JSON, processing array inputs
    var row = [
    processArray(data.name),
    processArray(data.email),
    processArray(data.phone),
    processArray(data.message)
    ];
    // Append the array of JSON data to the spreadsheet
    sheet.appendRow(row);
    return ContentService.createTextOutput(JSON.stringify({result: "success"}))
    .setMimeType(ContentService.MimeType.JSON);
    }

Komentáře • 17

  • @ruemorg7
    @ruemorg7 Před 3 dny +1

    Great work! This really helped, thank you!

  • @martinvimr6907
    @martinvimr6907 Před 14 dny +1

    Awesome. I was just looking exactly for how to connect bricks form with a Google sheet. Lifesaver!

  • @mattgracie348
    @mattgracie348 Před 3 měsíci +1

    This really helped with my sister-in-law's wedding RSVP form. Great tutorial! Thank you so much.

  • @bricksforge
    @bricksforge Před 7 měsíci +3

    👏👌

  • @dithmarscherwebdesign
    @dithmarscherwebdesign Před 7 měsíci +1

    Thanks

  • @ruemorg7
    @ruemorg7 Před 2 dny

    Many thanks! Is rhere any way of using the data from Google Sheets in wordpress? Ie having Bricksforge forms Get the data from the sheet? Many thanks!

    • @aperturedigitalmarketing
      @aperturedigitalmarketing  Před dnem

      Unfortunately I don't believe Bricks Forge can fetch data. But you can send data to your WordPress site using automations. Brendan O'connell has a vid on his channel showing how to do this.

  • @bigitalo81
    @bigitalo81 Před 7 měsíci

    Great tutorial and easy to understand. Does this also work with Docs? How do I change the JavaScript code for this?

    • @aperturedigitalmarketing
      @aperturedigitalmarketing  Před 7 měsíci

      It can be modified I bet, but I personally have never written data to a google doc. I imagine there's code for that. You would have to do a little research on it. If you need some custom work done, I'm available to do that type of work.

  • @martinbuno3990
    @martinbuno3990 Před 11 dny

    Thanks! I would like to ask you, is possible to do this for repeater fields? Thanks!

    • @aperturedigitalmarketing
      @aperturedigitalmarketing  Před 11 dny

      @@martinbuno3990 probably so. But you'd have to write more in-depth PHP probably to get all the different fields and integrate with Google apps script.

    • @martinbuno3990
      @martinbuno3990 Před 11 dny

      @@aperturedigitalmarketing thanks! unfortunately, this is not my forte, I'm afraid I'll have to find another option.

    • @aperturedigitalmarketing
      @aperturedigitalmarketing  Před 11 dny

      @@martinbuno3990I'll put it on my list of video ideas. Repeater fields make everything dynamic so you would have to do some sort of loop to check the fields and data. Best of luck!

  • @Manolito-rh8dt
    @Manolito-rh8dt Před 4 měsíci

    Is it also possible to develop something like calendly ?

    • @aperturedigitalmarketing
      @aperturedigitalmarketing  Před 4 měsíci

      I suppose you could add automations to make it like Calendly. The tricky party is syncing with a calendar to check availability. That's where Calendly shines.

    • @Manolito-rh8dt
      @Manolito-rh8dt Před 4 měsíci

      exactly@@aperturedigitalmarketing