• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

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: 38
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