Google Sheets One Row A Day

I can not figure out how to only have my flow run once a day. I would like to compose a list of topics in google sheets for my blogs without having them all run and post one right after another. On my home flow page, there is an icon that shows my flows running every 15 minutes, is there a way to change this? Is there a way to change something within the flow to run every 24 hours? It’s difficult for me to go in each day and add just one topic. I would appreciate any help.

My current flow:
GOOGLE SHEETS NEW ROW : ASK CHAT GPT (write title) : ASK CHAT GPT (write blog) : CREATE WORDPRESS POST : CREATE FACEBOOK POST : SEND GMAIL

Hello!

This is how I’d solve this issue:

  1. Daily Trigger: Set up your flow to trigger once a day.

  2. Google Sheets Check: Modify your Google Sheets structure to include a column that indicates whether a post has already been published or not. For each blog post, have a row with relevant information and a boolean value (TRUE/FALSE) in the ‘posted’ column. Initially, set this to FALSE (I like to use the tick boxes.
    image

  3. Finding the Unposted Row: At the beginning of your flow, add a step to find the first row where the ‘posted’ column is FALSE. This is the entry your flow will process.

  4. Generating Content with ChatGPT: Use OpenAI’s ChatGPT to generate the blog title and content as per your current setup.

  5. Posting to WordPress and Facebook: Once the content is ready, proceed with creating the WordPress post and the Facebook post.

  6. Updating the Status in Google Sheets: After the post has been successfully published, update the ‘posted’ column for that row to TRUE. This ensures that the next time your flow runs, it picks the next unposted blog topic.

This approach automates your process while ensuring that only one blog post goes live each day.

Let me know if you’ve any questions!

Entire flow:

3 Likes

Just want to say thanks for this workflow idea. I may try this out as I am having as similar conundrum as OP.

2 Likes

Thank you so much. I appreciate your help.

1 Like

Hi Dennis,

Thanks, this seems like an excellent flow to manage blog updates. I am new to ActivePieces so still in the try and error phase without real understanding. Hope you can help me with a persistent error: I can’t get 1 trigger to work properly and that is the update row trigger. Somehow during the various tests, I keep getting the error below.

Regards JJ

{
“row_id”: [
“Expected number, but found value: [object Object]”
]
}

1 Like

Hello @imeco,

The error you’re facing is might be due to a data type mismatch in the row_id. It should be a number, but it seems an object is being passed instead.

Check the step where row_id is defined and ensure it’s the correct numerical ID from Google Sheets. Also, verify that any custom code correctly formats row_id as a number. If you’re dynamically getting row_id from a previous step, make sure it’s extracted as a numerical value.

The flow seems to be working for me after the adjustments. Is there a way to tell the flow to stop if there are not any new topics on the spreadsheet. Right now it seems to be posting a generic blog if the line is empty. Thanks.

Hi @Dennis,

Thanks for your reply. I have to juggle a bit more to get it working. The ‘find rows’ step works fine but still troubleshooting the ‘update rows’ step! It’s certainly good for my learning curve.

Thanks again for your example and support!

1 Like

You could add a Branch step after Step 2, “Find Rows.” In my example, it searches for a “FALSE” value in the “Already posted?” column. The Branch step functions similarly to an IF statement.

Here’s an example of how you might use it:

Note: This method will still consume three tasks daily. Depending on your subscription, you might want to fully deactivate the flow and only activate it as needed to conserve tasks.

Hello @imeco,

I’m glad to hear that! The sheets function can be enjoyable and is definitely really useful. Let me know if there’s anything I can help you with.

If you’re struggling, sharing a screenshot of your sheet and flow might help clarify things.

Hi @Dennis,

Thanks for your offer. Below the flow what ends in error in step five “Expected number, but found value: [object Object]”

This is my flow:

(The gmail error step is when all rows in the input sheet column ‘Al_gepost’’ have value ‘JA’ what indicated that no rows are left for a new blogpost)

This is my input file:

This is step 1:

This is step 5:

This must be such a thing where something so obvious is wrong which results I do not seeing my mistake!

Hope you can help!

Hi @imeco,

Unfortunately, I cannot be certain based on your screenshot; however, based on your error description, I believe the issue might be as follows:

In your ‘Update Row’ step, you need to dynamically specify the exact row number to be edited.

Currently, you may have selected ‘first found row’ instead of the specific row number.

Therefore, use this:
image

And not this:
image

P.S. Mocht ik ooit een dronepiloot nodig hebben, dan weet ik je te vinden :wink:

Hi,

I have a similar use case. I would like to automatically post articles to WordPress once per week rather than once per day.

I would prefer to be able to bulk populate a Google Sheet that has the following columns:

Title, Guidelines, and Date

The date column would start with the current week and the following rows in the Date column would each increase by one week.

The objective would be to post, say, 52 rows of Title, Guidelines, and Date and have ActivePieces create and upload all the scheduled WordPress posts in one go.

Unfortunately, when I test the WordPress piece, I receive the following error:

{
“response”: {
“status”: 400,
“body”: {
“code”: “rest_invalid_param”,
“message”: “Invalid parameter(s): date”,
“data”: {
“status”: 400,
“params”: {
“date”: “Invalid date.”
},
“details”: {
“date”: {
“code”: “rest_invalid_date”,
“message”: “Invalid date.”,
“data”: null
}
}
}
}
},

I’m not certain what I’m doing wrong and could use some help to move me in the right direction.

Thanks in advance for your help and have a great day!

Hello DigiPlace,

The error you’re facing is likely due to the date format in your Google Sheet not matching what WordPress expects. WordPress typically requires dates in the format YYYY-MM-DD (e.g., 2023-12-07). To fix this:

  1. Adjust Date Format: Ensure dates in your “Date” column are in the YYYY-MM-DD format.
  2. Test with Single Entry: Before setting up the entire flow, test the WordPress piece with one properly formatted date entry.
  3. Check Other Parameters: If the error persists, review other parameters being sent to WordPress to ensure they are correct.
1 Like

Hi Dennis,

I appreciate your input. I’ve changed the time format and added time to it as follows:

12/9/2023 12:15:00

This is working beautifully.

Thank you so much for your input. Have a great day and a wonderful weekend ahead!

1 Like