• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer
    • 🔥 Pabbly Chatflow — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

Writing into Google sheet

ranganna

Member
Hi Team,

I am getting the below data from the webhook I want to write to Google Sheets as new rows. I want Triggered at Value should be repeated against Stocks please refer to wanted desired output screenshot

1708955931819.png


Wanted desired output

1708956131053.png
 

Attachments

  • 1708955841518.png
    1708955841518.png
    17.1 KB · Views: 68
P

Pabbly13

Guest
Hey @ranganna !

Sure, kindly use the below-mentioned Google Sheet step to map your comma separated data-

1709017685153.png


This will add a new row for all the comma-separated data inside a new row.

Here is a video tutorial for your reference-


Hope, this works for you.
 

ranganna

Member
Hey @ranganna !

Sure, kindly use the below-mentioned Google Sheet step to map your comma separated data-

View attachment 38813

This will add a new row for all the comma-separated data inside a new row.

Here is a video tutorial for your reference-


Hope, this works for you.
I Have tried but triggered at is single value that should repeat automatically it's not happening
 
P

Pabbly13

Guest
Hey @ranganna !

Can you confirm if the stock names will be of the same number always or will fluctuate up and down?

So accordingly we can guide you on how to map for the Value at data further.

Hope, to hear from you soon,
 
P

Pabbly13

Guest
Hey @ranganna !

We mean to say, will the stock names will always be the same or will they be lesser or more everytime -

1709101741645.png

Meaning will VERANDA be there always or will it be sometimes only?

So on this basis we can guide you further with your concern.
 
P

Pabbly13

Guest
Hey @ranganna !

Kindly use "Code by Pabbly : JavaScript" code as shown below to duplicate the single date value to multiple times on the basis of number of stocks as shown below-

1709113635660.png


Here is the JS code which you need to use-

function printString(inputString, otherString) { var values = inputString.split(','); var count = values.length; var result = ""; for (var i = 0; i < count; i++) { result += otherString; if (i < count - 1) { result += ","; } } return result; } // Example usage var input = "[B]VERANDA,HPL,INOXWIND,NATHBIOGEN,TV18BRDCST,GTLINFRA,VISASTEEL,BYKE,REGENCERAM[/B]"; // Comma-separated input values var otherString = "[B]12:53 pm[/B]"; // The other string to print return(printString(input, otherString));

Just map the value from the trigger response and click on "Save & Test Request".

It will provide you with comma separated time which you need to map directly inside the date field of Google Sheet.

This will add time to every stock as per your requirement.
 
P

Pabbly13

Guest
Hey @ranganna !

Sure, below you can check for the Python code-

def print_string(input_string, other_string):
values = input_string.split(',')
count = len(values)
result = ""
for i in range(count):
result += other_string
if i < count - 1:
result += ","
return result


# Example usage
input_str = "VERANDA,HPL,INOXWIND,NATHBIOGEN,TV18BRDCST,GTLINFRA,VISASTEEL,BYKE,REGENCERAM" # Comma-separated input values
other_string = "12:53 pm" # The other string to print


print(print_string(input_str, other_string))

Map data inplace of the bold letters above and it should work as per your requirement now.
 
Top