Turn your Google Sheets content calendar into Hootsuite posts

By General Input

Every morning it finds calendar rows marked Ready for the next seven days, schedules them in Hootsuite, and writes the results back so nothing is ever posted twice.

Integrations

  • Hootsuite
  • Google Sheets

Type

Deterministic Code

Categories

  • Marketing
  • Operations

Every day at 6am, push my approved content calendar rows from Google Sheets into Hootsuite as scheduled posts. Use a cron trigger set to 6am in my working timezone.

Start by reading the calendar tab with the Google Sheets Get Values operation. Read the full used range including the header row, and locate columns by their header name rather than a fixed letter, so the workflow keeps working if someone reorders columns. The tab has a column for the post text, a publish date and time, one or more target social profile IDs (comma separated in a single cell), a status column, and a column where the Hootsuite message IDs get written back.

Select the rows to act on. A row qualifies only when its status column reads Ready (compare case insensitively and trim whitespace) and its publish date falls between now and seven days from now. Ignore every other row. Rows already reading Scheduled, Skipped, or anything else must never be picked up again: that status check is the idempotency guard that makes this safe to run daily, so do not weaken it.

Before calling Hootsuite, validate each qualifying row. If the post text is empty or there is no social profile ID, do not schedule anything for that row. Instead write a status of Skipped back to it so a human can fix it and set it back to Ready. Treat a publish date and time that has already passed the same way, since Hootsuite will reject a scheduled time in the past, and note the reason on the row where there is a column for it.

For each valid row, call the Hootsuite Schedule Message operation with the row's post text, the publish date and time converted to an ISO 8601 UTC timestamp, and the row's target social profile IDs. Bake in this Hootsuite behaviour: scheduling one row to several social profiles creates a separate Hootsuite message per profile, each with its own message ID, so collect every returned ID rather than just the first. Handle Pinterest separately, because a Pinterest message cannot be bundled with any other social profile in a single schedule call; if a row lists a Pinterest profile alongside others, split it into its own call and merge the resulting IDs back into the same row.

After a row's scheduling succeeds, write back to that row with the Google Sheets Update Values operation: all returned Hootsuite message IDs, comma separated, into the message ID column, and a status of Scheduled. Do this per row immediately after its own schedule call rather than batching all the write backs until the end, so that a failure partway through the run cannot leave posts scheduled in Hootsuite with no record on the sheet, which would cause them to be scheduled a second time on the next run.

Handle partial failures explicitly. Hootsuite can return both scheduled messages and errors in the same response, for example when one profile in the row succeeds and another is rejected. In that case store the message IDs that did come back, set the row status to Partial rather than Scheduled, and record the error message so a human can see which profile still needs attention. Retry on rate limiting with exponential backoff, and if Hootsuite reports that the scheduled message limit has been reached, stop scheduling further rows and leave the remaining ones as Ready so they are picked up on the next run.

At the end of the run, log a short summary of how many rows were scheduled, skipped, and partially scheduled.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seatsBuild audience segments from product usage and push to LoopsTurn the people who engage with your posts into Pipedrive leads