KODE

/**

  • Google app-script to utilise Elementor Pro From webhook.
    *
  • In order to enable this script, follow these steps:
    • From your Google Sheet, from the “Exstensions” menu select “App Script”…
  • Paste the script from this gist into the script code editor and hit Save.
  • From the “Deploy” menu, select Deploy as web app…
  • Choose to execute the app as yourself, and allow Anyone, even anonymous to execute the script. (Note: depending on your Google Apps instance, this option may not be available. You will need to contact your Google Apps administrator, or else use a Gmail account.)
  • Now click Deploy. You may be asked to review permissions now.
  • The URL that you get will be the webhook that you can use in your elementor form, You can test this webhook in your browser first by pasting it.
  • It will say “Yepp this is the webhook URL, request received”.
  • Last all you have to do is set up and Elementor Pro Form with a form name and Webhook action pointing to the URL from above.
    *
  • Update: 09/06/2022
  • – Name the sheet: you can now add a field (could be hidden) to your form labeled “e_gs_SheetName” and set the defualt value to the name of the sheet you want to use.
  • – Set the Order: you can now add a form field (hidden) labeled “e_gs_order” and set its defualt value to the names of the columns you want to seperated by comma in the order you want, any other colum not in that list will be added after.
  • – Exclude Columns: you can now add a field (could be hidden) labeled “e_gs_exclude” and set its value to the names of the columns you want to exclude seperated by comma.
    */

// Change to true to enable email notifications
let emailNotification = false;
let emailAddress = “Change_to_your_Email”;

// DO NOT EDIT THESE NEXT PARAMS
let isNewSheet = false;
let postedData = [];
const EXCLUDE_PROPERTY = ‘e_gs_exclude’;
const ORDER_PROPERTY = ‘e_gs_order’;
const SHEET_NAME_PROPERTY = ‘e_gs_SheetName’;

/**

  • this is a function that fires when the webapp receives a GET request
  • Not used but required.
    */
    function doGet( e ) {
    return HtmlService.createHtmlOutput( “Yepp this is the webhook URL, request received” );
    }

// Webhook Receiver – triggered with form webhook to published App URL.
function doPost( e ) {
let params = JSON.stringify( e.parameter );
params = JSON.parse( params );
postedData = params;
insertToSheet( params );

// HTTP Response
return HtmlService.createHtmlOutput( "post request received" );

}

/**

  • flattenObject
  • Flattens a nested object for easier use with a spreadsheet
  • @param ob
  • @returns {{}}
    */
    const flattenObject = ( ob ) => {
    let toReturn = {};
    for ( let i in ob ) {
    if ( ! ob.hasOwnProperty( i ) ) {
    continue;
    } if ( ( typeof ob[ i ] ) !== 'object' ) { toReturn[ i ] = ob[ i ]; continue; } let flatObject = flattenObject( ob[ i ] ); for ( let x in flatObject ) { if ( ! flatObject.hasOwnProperty( x ) ) { continue; } toReturn[ i + '.' + x ] = flatObject[ x ]; } }
    return toReturn;
    }

/**

  • getHeaders
  • normalize headers
  • @param formSheet
  • @param keys
  • @returns {*[]}
    */
    const getHeaders = ( formSheet, keys ) => {
    let headers = []; // retrieve existing headers
    if ( ! isNewSheet ) {
    headers = formSheet.getRange( 1, 1, 1, formSheet.getLastColumn() ).getValues()[0];
    }
    const newHeaders = keys.filter( h => ! headers.includes( h ) );
    headers = [ …headers, …newHeaders ];
    // maybe set order
    headers = getColumnsOrder( headers );
    // maybe exclude headers
    headers = excludeColumns( headers );
    // filter out control columns
    headers = headers.filter( header => ! [ EXCLUDE_PROPERTY, ORDER_PROPERTY, SHEET_NAME_PROPERTY ].includes( header ) );
    return headers;
    };

/**

  • getValues
  • normalize values
  • @param headers
  • @param flat
  • @returns {*[]}
    */
    const getValues = ( headers, flat ) => {
    const values = [];
    // push values based on headers
    headers.forEach( ( h ) => values.push( flat[ h ] ) );
    return values;
    }

/**

  • insertRowData
  • inserts values to a given sheet at a given row
  • @param sheet
  • @param row
  • @param values
  • @param bold
    */
    const insertRowData = ( sheet, row, values, bold = false ) => {
    const currentRow = sheet.getRange( row, 1, 1, values.length );
    currentRow.setValues( [ values ] )
    .setFontWeight( bold ? “bold” : “normal” )
    .setHorizontalAlignment( “center” );
    }

/**

  • setHeaders
  • Insert headers
  • @param sheet
  • @param values
    */
    const setHeaders = ( sheet, values ) => insertRowData( sheet, 1, values, true );

/**

  • setValues
  • Insert Data into Sheet
  • @param sheet
  • @param values
    */
    const setValues = ( sheet, values ) => {
    const lastRow = Math.max( sheet.getLastRow(), 1 );
    sheet.insertRowAfter( lastRow );
    insertRowData( sheet, lastRow + 1, values );
    }

/**

  • getFormSheet
  • Find or create sheet for form
  • @param sheetName
  • @returns Sheet
    */
    const getFormSheet = ( sheetName ) => {
    const activeSheet = SpreadsheetApp.getActiveSpreadsheet(); // create sheet if needed
    if ( activeSheet.getSheetByName( sheetName ) == null ) {
    const formSheet = activeSheet.insertSheet();
    formSheet.setName( sheetName );
    isNewSheet = true;
    }
    return activeSheet.getSheetByName( sheetName );
    }

/**

  • insertToSheet
  • magic function where it all happens
  • @param data
    */
    const insertToSheet = ( data ) => {
    const flat = flattenObject( data ),
    keys = Object.keys( flat ),
    formSheet = getFormSheet( getSheetName( data ) ),
    headers = getHeaders( formSheet, keys ),
    values = getValues( headers, flat ); setHeaders( formSheet, headers );
    setValues( formSheet, values ); if ( emailNotification ) {
    sendNotification( data, getSheetURL() );
    }
    }

/**

  • getSheetName
  • get sheet name based on form field named “e_gs_SheetName” if exists or used form name
  • @param data
  • @returns string
    */
    const getSheetName = ( data ) => data[SHEET_NAME_PROPERTY] || data[“form_name”];

/**

  • getSheetURL
  • get sheet url as string
  • @returns string
    */
    const getSheetURL = () => SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getUrl();

/**

  • stringToArray
  • split and trim comma seperated string to array
  • @param str
  • @returns {*}
    */
    const stringToArray = ( str ) => str.split( “,” ).map( el => el.trim() );

/**

  • getColumnsOrder
  • used to set the columns order, set this by adding a form field (hidden) named “e_gs_order”
  • and set its value to the names of the columns you want to seperated by comma in the order you want,
  • any other colum not in that field will be added after
  • @param data
  • @param headers
  • @returns {*}
    */
    const getColumnsOrder = ( headers ) => {
    if ( ! postedData[ORDER_PROPERTY] ) {
    return headers;
    }
    let sortingArr = stringToArray( postedData[ORDER_PROPERTY] );
    // filter out non existing headers
    sortingArr = sortingArr.filter( h => headers.includes( h ) );
    // filterout sorted headers
    headers = headers.filter( h => ! sortingArr.includes( h ) ); return [ …sortingArr, …headers ];
    }
    /**
  • excludeColumns
  • used to exclude columns, set this by adding a form field (hidden) named “e_gs_exclude”
  • and set its value to the names of the columns you want to exclude seperated by comma
  • @param data
  • @param headers
  • @returns {*}
    */
    const excludeColumns = ( headers ) => {
    if ( ! postedData[EXCLUDE_PROPERTY] ) {
    return headers;
    }
    const columnsToExclude = stringToArray( postedData[EXCLUDE_PROPERTY] );
    return headers.filter( header => ! columnsToExclude.includes( header ) );
    }

/**

  • sendNotification
  • send email notification if enabled
  • @param data
  • @param url
    */
    const sendNotification = ( data, url ) => {
    MailApp.sendEmail(
    emailAddress,
    “A new Elementor Pro Forms submission has been inserted to your sheet”, // mail subject
    A new submission has been received via ${data['form_name']} form and inserted into your Google sheet at: ${url}, //mail body
    {
    name: ‘Automatic Emailer Script’
    }
    );
    };
demo-attachment-632-adult-blur-close-up-267394

How Well Are You Funnelling

When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel the presence of the Almighty, who formed us in his own image, and the breath of that universal love which bears and sustains us, as it floats around us in an eternity of bliss; and then, my friend, when darkness overspreads my eyes, and heaven and earth seem to dwell in my soul and absorb its power, like the form of a beloved mistress, then I often think with longing, Oh, would I could describe these conceptions, could impress upon paper all that is living so full and warm within me, that it might be the mirror of my soul, as my soul is the mirror of the infinite God!

O my friend — but it is too much for my strength — I sink under the weight of the splendour of these visions! A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine.

I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.

When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel the presence of the Almighty, who formed us in his own image, and the breath of that universal love which bears and sustains us, as it floats around us in an eternity of bliss; and then, my friend, when darkness overspreads my eyes, and heaven and earth seem to dwell in my soul and absorb its power, like the form of a beloved mistress, then I often think with longing, Oh, would I could describe these conceptions, could impress upon paper all that is living so full and warm within me.

demo-attachment-629-daniel-korpai-1074289-unsplash

How to Automate Visual

When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel the presence of the Almighty, who formed us in his own image, and the breath of that universal love which bears and sustains us, as it floats around us in an eternity of bliss; and then, my friend, when darkness overspreads my eyes, and heaven and earth seem to dwell in my soul and absorb its power, like the form of a beloved mistress, then I often think with longing, Oh, would I could describe these conceptions, could impress upon paper all that is living so full and warm within me, that it might be the mirror of my soul, as my soul is the mirror of the infinite God!

O my friend — but it is too much for my strength — I sink under the weight of the splendour of these visions! A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine.

I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.

When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel the presence of the Almighty, who formed us in his own image, and the breath of that universal love which bears and sustains us, as it floats around us in an eternity of bliss; and then, my friend, when darkness overspreads my eyes, and heaven and earth seem to dwell in my soul and absorb its power, like the form of a beloved mistress, then I often think with longing, Oh, would I could describe these conceptions, could impress upon paper all that is living so full and warm within me.

demo-attachment-626-billetto-editorial-334686-unsplash

Regression Testing in WordPress

There are many variations passages of Lorem Ipsum available, but the majority have suffered alteration words some form by injected or randomized which don’t even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn’t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

O my friend — but it is too much for my strength — I sink under the weight of the splendour of these visions! A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine.

I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.

When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel the presence of the Almighty, who formed us in his own image, and the breath of that universal love which bears and sustains us, as it floats around us in an eternity of bliss; and then, my friend, when darkness overspreads my eyes, and heaven and earth seem to dwell in my soul and absorb its power, like the form of a beloved mistress, then I often think with longing, Oh, would I could describe these conceptions, could impress upon paper all that is living so full and warm within me.

demo-attachment-615-case-electronics-equipment-2080611

Indicators Offline To Maximise

There are many variations passages of Lorem Ipsum available, but the majority have suffered alteration words some form by injected or randomized which don’t even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn’t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

O my friend — but it is too much for my strength — I sink under the weight of the splendour of these visions! A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine.

I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.

When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel the presence of the Almighty, who formed us in his own image, and the breath of that universal love which bears and sustains us, as it floats around us in an eternity of bliss; and then, my friend, when darkness overspreads my eyes, and heaven and earth seem to dwell in my soul and absorb its power, like the form of a beloved mistress, then I often think with longing, Oh, would I could describe these conceptions, could impress upon paper all that is living so full and warm within me.

demo-attachment-621-dark-electronic-electronics-424436

Shoppers on Social Media

There are many variations passages of Lorem Ipsum available, but the majority have suffered alteration words some form by injected or randomized which don’t even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn’t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

O my friend — but it is too much for my strength — I sink under the weight of the splendour of these visions! A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine.

I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.

When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel the presence of the Almighty, who formed us in his own image, and the breath of that universal love which bears and sustains us, as it floats around us in an eternity of bliss; and then, my friend, when darkness overspreads my eyes, and heaven and earth seem to dwell in my soul and absorb its power, like the form of a beloved mistress, then I often think with longing, Oh, would I could describe these conceptions, could impress upon paper all that is living so full and warm within me.

demo-attachment-618-daniel-korpai-1350955-unsplash

Is Your Analytics Ready

There are many variations passages of Lorem Ipsum available, but the majority have suffered alteration words some form by injected or randomized which don’t even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn’t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

O my friend — but it is too much for my strength — I sink under the weight of the splendour of these visions! A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine.

I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.

demo-attachment-615-case-electronics-equipment-2080611

for Upcoming Browser Changes

There are many variations passages of Lorem Ipsum available, but the majority have suffered alteration words some form by injected or randomized which don’t even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn’t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.

O my friend — but it is too much for my strength — I sink under the weight of the splendour of these visions! A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine.

demo-attachment-612-amplifier-contemporary-electronics-2426083

Women are going but are also being

There are many variations passages of Lorem Ipsum available, but the majority have suffered alteration words some form by injected or randomized which don’t even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn’t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

O my friend — but it is too much for my strength — I sink under the weight of the splendour of these visions! A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine.

I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.

demo-attachment-609-niclas-illg-z13hWoxio-unsplash

Three AI experts on how access to ChatGPT-style

There are many variations passages of Lorem Ipsum available, but the majority have suffered alteration words some form by injected or randomized which don’t even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn’t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.