What the agent does
This is for a software company that builds listing websites and flyers for independent realtors and small brokerages. When a listing goes live, every realtor wants the same thing on Instagram, Facebook and LinkedIn: the photos, the price, the open house time and a line that sounds like them. Most write it late at night or not at all. The company adds Draft social posts: when a realtor publishes a listing in the app, posts appear as drafts in that realtor's own Buffer, ready to edit and schedule.
The company saves the agent once as a template with POST /o/{org}/agents, with "connections": ["buffer"] (it connects a Buffer account of its own first, because a template names connections its creator has) and instructions on tone and on saving drafts only. When a realtor turns the feature on, the backend calls POST /o/{org}/agents {"template": "<template id>", "name": "social-<realtor id>"}, then POST /o/{org}/agents/{agent}/connections {"type": "app", "name": "buffer"}, and opens the authorize_url in a popup for that realtor, who approves on Buffer's own consent screen. Rush signs in to Buffer with its own app client and PKCE, so the company registers no Buffer app.
A run calls Buffer's GraphQL API as that realtor: account { organizations { id name } } for the organization, then channels(input: {organizationId}) for each channel's id, service, displayName and isQueuePaused. For each Instagram, Facebook and LinkedIn channel it writes a post for that network and saves it with createPost, passing channelId, text, schedulingType: automatic, mode: addToQueue, saveToDraft: true, and the listing's photos as assets with an image url. Buffer's docs say a draft's status is draft and it is not published until it is explicitly scheduled, and that an image URL must be publicly reachable, so the app passes the listing's public photo URLs.
The posts differ by network: Instagram leads with the photos and the open house, Facebook adds the neighbourhood and the listing link, LinkedIn speaks to other agents and buyers' agents. Each uses only facts from input (address, price, beds, baths, square footage, open house) and the realtor's voice from sample lines the app keeps for them. It schedules nothing, deletes nothing and skips any channel whose queue is paused; it reads back each created post's id and returns them.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "<agent id>",
"input": "Draft social posts in my Buffer for my new listing. Listing: 418 Alder Street, Unit 3, a two-bed, two-bath condo, 1,140 sq ft, listed at $629,000. Open house Saturday 2026-11-21, 1:00 to 3:00 pm. Listing page https://listings.example.com/418-alder-3. Photos in order: https://img.listings.example.com/418-alder-3/1.jpg, https://img.listings.example.com/418-alder-3/2.jpg, https://img.listings.example.com/418-alder-3/3.jpg. My voice, from past posts: 'Just listed and already one of my favorites.' 'Come say hi Saturday, coffee is on me.' Query account { organizations { id name } }, then channels(input: {organizationId}) with id, service, displayName, isQueuePaused. For each instagram, facebook and linkedin channel whose queue is not paused, call createPost with channelId, text written for that network, schedulingType automatic, mode addToQueue, saveToDraft true, and the photos as assets [{image: {url}}] (the first photo only on linkedin). Use only the facts above. Always send saveToDraft true; never schedule, update or delete a post. Return JSON: [{channel, service, post_id, text}], and name any paused channel you skipped."
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
The session's answer is the JSON list of drafts, one per channel, which the app's webhook handler shows on the listing page with a link to open Buffer. In Buffer the realtor finds each post as a draft on its channel with the photos attached.
What the realtor checks before scheduling: the price, the open house time and the address in every post, since a typo in any of them costs a showing; the photo order, which follows the listing's; and whether the wording fits their brokerage's own rules for advertising. Nothing goes out until the realtor schedules it in Buffer.
Run it on every a realtor publishes a listing
When a listing is published, the app's backend sends POST /o/{org}/sessions with that realtor's agent id as agent, the listing's facts and public photo URLs in input, and a request_id that is a UUID v5 of the listing id, so a double press of Publish starts one run. Runs for realtors publishing at the same moment start together, and the key's webhook brings each run.completed back to the right listing.
A price change or a new open house date is another event: the app sends a request saying what changed, and the agent drafts one update post per channel, again as drafts.
The use case this job follows, with its automation and trigger: Run an agent per customer task.
Why run it on Rush?
Each realtor's Buffer sign-in is theirs, stored in Rush's connection under that realtor's agent. The company holds no Buffer tokens and runs no Buffer app client of its own, a run of one realtor's agent reaches only that realtor's channels, and the session's accounts names the Buffer account it used.
Each listing is a session with its own computer, a record of every GraphQL call it sent and what Buffer answered, and its model cost, which the company can total per realtor with GET /o/{org}/sessions?agent=<agent id> if it charges for the feature. When a realtor asks why a draft had the wrong time, support reads that listing's transcript and the input it was given.
Frequently asked questions
Will a post ever go out without the realtor?
Not from this agent. Every createPost call sets saveToDraft: true, and Buffer's docs say a draft is not published until someone schedules it. The template's instructions and each prompt forbid scheduling, and the transcript shows each call's input.
Can it read how earlier posts performed?
Buffer's docs say reading post metrics is for personal workflows and automations using a personal API key. Rush connects Buffer through an app sign-in, so this job writes drafts and reads no metrics.
Which networks does it draft for?
This prompt names Instagram, Facebook and LinkedIn. Buffer's docs list others the API can create posts for, among them Threads, Pinterest and Google Business Profiles, and the company can add them to the template's instructions.
What if a realtor has paused a queue?
Each channel comes back with isQueuePaused. The agent skips a paused channel and names it in its answer, since a paused queue usually means the realtor has stopped posting there for now.
More Buffer jobs
More jobs like this: Run an agent per customer task
- What Happened on My Renovation This Week? A Contractor App Drafts Each Homeowner's Update From the Contractor's monday.com Board (monday.com)
- How Does Time-Tracking Software Draft Each Consultant's Weekly Timesheet From Their Microsoft Calendar? (Microsoft Calendar)
- Explain Each User's Monthly Profit and Loss From Their Own QuickBooks (QuickBooks)