Google Apps Script publishing automation

Send Notes From Google Apps Script To Narrareach

Narrareach team

At a glance

Google Apps Script to Narrareach

Turn a Google Sheet, Doc workflow, or custom Apps Script into a publishing channel that can schedule Notes and trigger webhook-driven follow-up.

  • This workflow keeps planning in Sheets while moving publishing execution into Narrareach.
  • Returned URLs and statuses make spreadsheet reconciliation possible after scheduling.
  • It gives non-engineering teams a controlled automation path without building a full custom dashboard.

What this page covers

Why Google Apps Script works for publishing automationBuilding a Sheets-to-Narrareach pipelineWebhook integration for post-publish actions

Connect platforms in Narrareach, then call the API from Apps Script.

The problem

The manual version gets old fast.

Google Apps Script is useful when your content calendar already lives in Sheets or Docs, but it usually stops before the actual publishing step.

That leaves someone copying note text, images, links, and dates into another tool after the script has done the planning work.

Narrareach lets the script hand off the publishing job through an authenticated API call, then use webhooks for anything that should happen after publication.

Quick answer

What this workflow should solve

Google Apps Script is a practical scheduling bridge when your editorial plan already lives in Sheets and you want rows to become queued posts.

Workflow

  1. 1Create a Sheet with columns for title, body, platform, publish time, and optional tags or image URLs.
  2. 2Use Apps Script to validate rows before sending them to Narrareach.
  3. 3Call Narrareach scheduling endpoints and write the returned item URL back into the Sheet.
  4. 4Add a status column so editors can see which rows are drafts, queued, published, or failed.

What Narrareach adds

  • This workflow keeps planning in Sheets while moving publishing execution into Narrareach.
  • Returned URLs and statuses make spreadsheet reconciliation possible after scheduling.
  • It gives non-engineering teams a controlled automation path without building a full custom dashboard.

Limits to know

  • Apps Script is best for lightweight editorial automation, not heavy real-time publishing systems.
  • Spreadsheet permissions and API credentials need to be managed carefully so only trusted editors can schedule content.

Why Google Apps Script works for publishing automation

Google Apps Script is a cloud-based JavaScript platform that runs inside Google Drive. If your content calendar lives in Sheets, your editorial workflow runs through Docs, or your team coordinates in Google Workspace, Apps Script is the natural automation layer because it already has access to your data without any external connections.

The typical publishing workflow in Apps Script reads rows from a content planning spreadsheet — note text, target platforms, schedule date, and image URLs — then calls the Narrareach API for each row. The script can run on a timed trigger (every hour, every morning), on spreadsheet edit, or manually when you finish a batch session.

In 2026, developers are combining Apps Script with Google Gemini to add AI-powered content generation directly into the spreadsheet workflow. A script can generate Note variations, schedule them through Narrareach, and log results back to the sheet — all without leaving Google Workspace.

  • Use a timed trigger to run your publishing script every morning so new rows in the content sheet get scheduled automatically
  • Store your Narrareach API token in Script Properties (not in the code) for security
  • Add a status column to your spreadsheet that the script updates after each successful API call

Building a Sheets-to-Narrareach pipeline

The simplest pipeline reads a Google Sheet with columns for note text, platform targets, schedule time, and image URL. The script iterates through rows marked as "ready," calls the Narrareach REST API for each one, and updates a status column to "scheduled" on success or "error" on failure.

The API call is a standard UrlFetchApp.fetch with your bearer token in the Authorization header and a JSON payload containing the note text, platforms array, and ISO 8601 schedule time. Apps Script handles HTTPS natively, so no external libraries are needed.

For more complex workflows, add conditional logic: schedule to LinkedIn only on weekdays, adjust the note text for different platforms, or chain multiple Notes from the same article. Apps Script supports all the standard JavaScript you need for these transformations.

  • Start with a three-column sheet: Note Text, Platforms, Schedule Time — that is enough for a working pipeline
  • Add error handling with try-catch blocks and log errors to a separate sheet for debugging
  • Use UrlFetchApp.fetch with muteHttpExceptions: true so HTTP errors do not crash your entire script
  • Test with one row before running a batch — verify the Note appears in your Narrareach queue before scaling up

Webhook integration for post-publish actions

Publishing is often just the first step. After a Note goes live, you may want to notify your team on Telegram, log the published content to a database, update a reporting dashboard, or trigger a follow-up action in another system.

Narrareach webhooks send event payloads when Notes publish, fail, or get rescheduled. Your Google Apps Script can receive these payloads through a deployed web app endpoint, then route the data wherever it needs to go — a Telegram bot, a Google Sheet log, or another API.

A common pattern is the publish-and-notify workflow: the script schedules Notes from a spreadsheet, then a webhook listener logs each publish event back to a "Published" tab in the same sheet with timestamps and platform-specific URLs. Your content calendar becomes a complete record of what was planned, scheduled, and delivered.

  • Deploy a doPost web app in Apps Script to receive Narrareach webhook payloads
  • Forward webhook events to a Telegram bot for real-time team notifications
  • Log publish events back to your content spreadsheet for a complete audit trail
  • Use webhook data to track which scheduled Notes actually published versus which hit delivery errors

How Narrareach solves it

Keep the publishing system close to the writing.

HTTP-friendly REST endpoints - so Apps Script can send note text, schedule times, platform choices, and metadata to Narrareach

API tokens - so the script can authenticate without building a separate OAuth app

Webhook payloads - so your Telegram channel, database, or reporting sheet can receive publish events and image URLs

One account for platform connections - so the script does not need to manage Substack, LinkedIn, X, Bluesky, or Threads sessions itself

Start here

Use your script as the publishing trigger

Connect platforms in Narrareach, then call the API from Apps Script.

Get API setup steps

Questions writers ask

Can Google Apps Script publish directly through Narrareach?

Yes. Apps Script can make HTTPS requests to the Narrareach REST API using your API token, so it can create or schedule Notes from a sheet, doc workflow, or custom script.

Can I forward published Notes to Telegram?

Yes. Use Narrareach webhooks for publish events, then have your Google Apps Script or backend forward the note text and any image URLs to Telegram.

Do I need to know JavaScript to use Google Apps Script with Narrareach?

Basic JavaScript is enough. Apps Script uses JavaScript syntax, and the Narrareach API calls are straightforward HTTP requests. The API documentation includes Apps Script code examples you can copy and adapt.

Can I trigger a Narrareach post from a Google Sheets cell change?

Yes. Apps Script supports onChange and onEdit triggers that can fire an API call to Narrareach when a cell value changes — useful for content calendars where marking a row "ready" triggers scheduling.

Can I use Apps Script to schedule posts for future dates and times?

Yes. The Narrareach scheduling API accepts a specific ISO 8601 datetime for each post. Your Apps Script can read a date column from a spreadsheet and pass it directly as the publish time.

Is there a Google Apps Script quota that limits how many posts I can schedule?

Apps Script has a daily URL fetch quota (20,000 calls/day on consumer accounts, higher on Workspace accounts). Scheduling 50 Notes per day uses far less than 1% of that quota, so it is not a practical limitation for most writers.

Can Google Apps Script read my Narrareach publishing analytics?

Yes. The Narrareach API exposes analytics endpoints that Apps Script can query via UrlFetchApp — useful for pulling performance data into a Google Sheet for custom reporting.

Narrareach LLM connector

Connect Claude, ChatGPT, or any MCP-compatible agent to read drafts, schedule posts, and automate Substack, Medium, LinkedIn, X, Bluesky, and Threads workflows.

Read the docs