---
title: "Auto-Post New Listings Prompt for Claude Code"
description: "A prompt for Claude Code, Codex or Cursor that writes a @postqueen/node function to schedule every new listing on X and Facebook. With steps, a sample and tips."
canonical_url: "https://postqueen.ai/prompts/post-from-my-app"
markdown_url: "https://postqueen.ai/prompts/post-from-my-app.md"
last_updated: "2026-09-25"
llms_txt: "https://postqueen.ai/llms.txt"
---

# Schedule a post for every new listing in my app

For developers who want their app to post new listings to social media on its own.

[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 ![X](https://postqueen.ai/assets/channels/x.svg) ![Facebook](https://postqueen.ai/assets/channels/facebook.svg)

Write a function with @postqueen/node that schedules a post on [X and Facebook] whenever a user publishes a new [rental listing] in my app, with its title, photo and link.

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()` `x, facebook` Looks up the ids of your X and Facebook channels.
3. `postqueen.upload()` `photo buffer, 'jpg'` Uploads the listing photo and returns its hosted path.
4. `postqueen.post()` `type: 'schedule', ×2` Schedules one post per channel with the title, the photo and the link.

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

## Posts on your calendar, at the time you set.

Your code schedules each post, and every one shows on your calendar before it goes out. Open any post to change the words, the picture or the time.

- A version for each network, within its limits
- Every post shows on your calendar first
- Change the text, time or media before it goes out

Variations

## Make it your own.

- Use type 'draft' instead, so every post waits on the calendar until someone on my team schedules it.
- Pick each post's time with GET /find-slot/:id, which returns the next free slot on that channel.
- Also add a PostQueen webhook that tells my app when each post publishes.

Tips

## Before you send it.

- Your API key is under Connections, API Keys, where only workspace admins see it. Keep it in POSTQUEEN_API_KEY, not in the code.
- Creating posts through the API is rate limited per hour for each workspace, so a burst of listings may need a short queue.
- An X post needs who_can_reply_post in its settings, such as everyone. GET /integration-settings/:id lists them per channel.

## More prompts like this

- [Launch ![Google Business Profile](https://postqueen.ai/assets/channels/google-business.svg) ![Facebook](https://postqueen.ai/assets/channels/facebook.svg) ![Instagram](https://postqueen.ai/assets/channels/instagram.svg) Announce an event Small business Open the prompt](https://postqueen.ai/prompts/announce-an-event)
- [Launch ![X](https://postqueen.ai/assets/channels/x.svg) Launch day thread Creators Open the prompt](https://postqueen.ai/prompts/launch-day-thread)
- [Launch ![Google Business Profile](https://postqueen.ai/assets/channels/google-business.svg) ![Instagram](https://postqueen.ai/assets/channels/instagram.svg) ![Facebook](https://postqueen.ai/assets/channels/facebook.svg) A promotion for a client Agencies Open the prompt](https://postqueen.ai/prompts/a-promotion-for-a-client)
- [Launch ![X](https://postqueen.ai/assets/channels/x.svg) ![Threads](https://postqueen.ai/assets/channels/threads.svg) ![Bluesky](https://postqueen.ai/assets/channels/bluesky.svg) ![LinkedIn](https://postqueen.ai/assets/channels/linkedin.svg) Launch day on every network App developers Open the prompt](https://postqueen.ai/prompts/launch-day-on-every-network)

### 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.
