Turn an API response into a post
Read an API, format its response, and create a draft for review.
Open More → Workflows → Start from a template. Use Turn an API response into a post for updates from a service without a dedicated node.
- If the API needs authentication, save its credential in Connections, restricted to the API's exact HTTPS host.
- Open HTTP request, enter the URL, and select that connection. Start with a read-only
GET. You can also import a cURL command, then review the parsed method, URL, headers, and body. - Select Test node to inspect the real response. Choose JSON or Table to find the fields you need.
- Open JavaScript to format the selected response data. The supplied script only formats the JSON; it does not write finished social copy for you. Keep its output connected to Create draft → Post text.
- Choose destination accounts in Create draft, and keep Review post afterward.
- Run a preview. This template starts manually; Run live creates the draft. Change the trigger to an interval if you want recurring checks.
JavaScript receives input and returns a JSON value. For an API response such as {"title":"New reporting view","url":"https://example.com/updates/reporting"}, this creates a short announcement:
return `${input.title}\n\n${input.url}`;HTTP node tests send real requests. Do not test a write method unless you intend its effect. Keep secrets in Connections, and inspect an interrupted request's remote outcome before trying again.
See review and scheduling to send the approved draft.