---
title: "Posts From a JSON File Prompt for Cursor"
description: "A prompt that has your coding agent write a Node script turning a JSON file into Bluesky and X drafts on your calendar. With the SDK calls, a sample and tips."
canonical_url: "https://postqueen.ai/prompts/schedule-from-a-file"
markdown_url: "https://postqueen.ai/prompts/schedule-from-a-file.md"
last_updated: "2026-09-25"
llms_txt: "https://postqueen.ai/llms.txt"
---

# Create drafts from a JSON file with Node

For developers who keep their posts in a file and want them on the calendar.

[Start 7-day trial for $0](https://app.postqueen.ai/auth?utm_source=postqueen.ai&utm_medium=landing&utm_campaign=trial&utm_content=prompt-page-hero) [All prompts](https://postqueen.ai/prompts) $0 due today. Cancel in one click.

Prompt ![Bluesky](https://postqueen.ai/assets/channels/bluesky.svg) ![X](https://postqueen.ai/assets/channels/x.svg)

Write a Node script with @postqueen/node that reads [launch-posts.json] and creates each entry as a draft on [Bluesky and X] at its date.

Works best with ![Claude Code](https://postqueen.ai/assets/agents/claude-code.svg) ![Codex](https://postqueen.ai/assets/agents/codex.svg) ![Cursor](https://postqueen.ai/assets/agents/cursor.png) and any agent connected to PostQueen

What your agent does

## The SDK calls, in order.

1. `new PostQueen()` `POSTQUEEN_API_KEY` Creates the client with the API key from your environment.
2. `postqueen.integrations()` `bluesky, x` Looks up the ids of your Bluesky and X channels.
3. `postqueen.post()` `type: 'draft', date` Creates each entry as a draft at its own date, one post per channel.
4. `postqueen.postList()` `startDate, endDate` Lists the posts in that date range, so the script can print what it made.

These are the real @postqueen/node calls in the code your agent writes. It writes them on its own; you only send the prompt.

The result

## Drafts on your calendar, not surprises.

Everything waits as a draft. Open any post to change the words, the picture or the time, then schedule it when it is right.

- A version for each network, within its limits
- Nothing goes out until you schedule it
- Change the text, time or media on the calendar

Variations

## Make it your own.

- Skip entries whose date has passed and print them at the end.
- Upload each entry's image with postqueen.upload() and attach it to the post.
- Add a --schedule flag that creates the posts with type 'schedule' instead of 'draft'.

Tips

## Before you send it.

- Write dates in ISO 8601 with a time zone, like 2026-10-06T09:00:00Z, so posts land at the right hour.
- Bluesky posts stop at 300 characters and X posts at 280, so have the script check lengths before it sends.
- Creating posts through the API is rate limited per hour for each workspace, so a very long file may need a pause.

## More prompts like this

- [Plan a week ![Bluesky](https://postqueen.ai/assets/channels/bluesky.svg) ![X](https://postqueen.ai/assets/channels/x.svg) ![LinkedIn](https://postqueen.ai/assets/channels/linkedin.svg) Find the empty days Developers Open the prompt](https://postqueen.ai/prompts/find-the-empty-days)
- [Plan a week ![X](https://postqueen.ai/assets/channels/x.svg) ![Threads](https://postqueen.ai/assets/channels/threads.svg) ![Bluesky](https://postqueen.ai/assets/channels/bluesky.svg) Fill next week's queue Creators Open the prompt](https://postqueen.ai/prompts/fill-next-weeks-queue)
- [Plan a week ![X](https://postqueen.ai/assets/channels/x.svg) ![Bluesky](https://postqueen.ai/assets/channels/bluesky.svg) ![Threads](https://postqueen.ai/assets/channels/threads.svg) A week about your product Founders Open the prompt](https://postqueen.ai/prompts/a-week-about-your-product)
- [Plan a week ![X](https://postqueen.ai/assets/channels/x.svg) ![Bluesky](https://postqueen.ai/assets/channels/bluesky.svg) A week of promotion Bloggers Open the prompt](https://postqueen.ai/prompts/a-week-of-promotion)

### Copy it. Your agent does the rest.

Connect your agent to PostQueen and send the prompt. The drafts wait on your calendar.

[Start 7-day trial for $0](https://app.postqueen.ai/auth?utm_source=postqueen.ai&utm_medium=landing&utm_campaign=trial&utm_content=band-prompt-page) $0 due today. Cancel in one click.
