• 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

Import from Google sheet to WordPress - 1 row per day

Hello, I have a google sheet with simple posts, and I would need to import it to WordPress but just 1 post/row per day.

So far I have a automatization consisting of:

1. Daily cron
1681658611643.png

2. Getting data (from range A7:V7)
1681658631457.png

3. Create post
1681658643018.png


Basically I would need to use a iterator so the range changes from A7:V7 to A8:V8 after the update and starts like this the next day.

Any help would be much, much appreciated.

Thanks.
 

ArshilAhmad

Moderator
Staff member
Please share your workflow with us at the provided email address so that we can gain a better understanding of your issue.
Email: [email protected]
Also, remember to revoke access once your query has been resolved.

Attaching a video for your reference:

 
Hello, thanks I already solved this.

But have on other short question: The workflow gets started every day at 8:00 -- but I would like to add little randomness in my posting schedule (the workflow posts WordPress post).

Do you think there is some option how to get started the workflow everyday BETWEEN lets say 8 and 10?

Any tips much appreciated. Thanks.
 

ArshilAhmad

Moderator
Staff member
Hey @FreedomDSGNR,

You can use Code by Pabbly: Run JavaScript (Beta) to generate random time between 8am and 10am, and use that time to make WordPress posts.

JavaScript:
// get a random number between 0 and 1
const randomHour = Math.floor(Math.random() * 2);
// get a random number between 0 and 59
const randomMinute = Math.floor(Math.random() * 60);

// add the random number of hours to 8am
const startHour = 8 + randomHour;
// format the start hour as a 2-digit string (e.g. "08")
const formattedStartHour = startHour.toString().padStart(2, '0');

// format the random minute as a 2-digit string (e.g. "03")
const formattedRandomMinute = randomMinute.toString().padStart(2, '0');

// concatenate the start hour and random minute into a time string
const randomTime = `${formattedStartHour}:${formattedRandomMinute}`;

console.log(randomTime);

Pabbly-Connect (20).png
 
Wow, nice thanks a ton.

The only thing is that I dont see "Date option" in Create a WordPress post, so I should just publish it and then add "Update a post" step into the workflow and update the date there?

Thanks a ton.
 

ArshilAhmad

Moderator
Staff member
Allow us some time, we will be adding a Date field in WordPress post events, and we will notify you as soon as it is added.
 

Nivesh

Moderator
Staff member
Hey @FreedomDSGNR,

We have incorporated modifications to the "Create a post" feature by including a Date field. We trust that this meets your requirements, and If you continue to encounter any difficulties, please do not hesitate to inform us.
image (26).png


Thanks!
Pabbly.com
 
Hello, yes, its perfect you are awesome <3.

Just the date @ArshilAhmad is in slightly different format so it cant be used without modification. So sorry for bothering you, but do you think there is some simple way how to format that to the same format in code?

Thanks a ton guys, you are awwwwwweeeesome <3
 
Top