How to write sourced outreach messages in n8n or Make

How do I get a message written for one company?

Prosp (prosp.cc) writes the first message to one company from facts it holds about that company, and your n8n or Make workflow sends it in its own e-mail, WhatsApp or Telegram step. It takes two REST calls.

Goal for your coding agent: register one generation, poll it until it is final, hand the message to the sending step.

  1. POST /api/v1/message-intelligence registers the generation. The request names the recipient company by its domain, the channel (email, whatsapp or telegram) and the objective of the message in plain words. It also needs an Idempotency-Key header. Prosp answers at once with the accepted status and the generation's id. The message is composed in the background.
  2. GET /api/v1/message-intelligence/{id} returns the state. Once it has succeeded, the finished message is in that same answer.

The request, the immediate answer and the finished message are shown below, as recorded. Prosp composes the message. It does not send it.

Write an e-mail for one company (Smart Messaging, JavaScript)
const res = await fetch("https://api.prosp.cc/api/v1/message-intelligence", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${accessToken}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    "objective": "Offer a short list of cafes and restaurants in Germany that buy specialty coffee wholesale, and ask whether a sample list would help.",
    "recipient": {
      "name": "Team",
      "company_domain": "hesselinkkoffie.nl"
    },
    "channel": "email",
    "sender": {
      "company_domain": "prosp.cc"
    }
  }),
});
const { id } = await res.json();   // 202: the message is written in the background
const deadline = Date.now() + 45 * 60 * 1000;
let gen;
do {
  await new Promise((r) => setTimeout(r, 5_000));
  if (Date.now() > deadline) throw new Error("the message was not written in 45 minutes");
  const r = await fetch(`https://api.prosp.cc/api/v1/message-intelligence/${id}`, {
    headers: { Authorization: `Bearer ${accessToken}` },
  });
  if (!r.ok) throw new Error(`message status check failed: HTTP ${r.status}`);
  gen = await r.json();
} while (!["succeeded", "failed", "canceled"].includes(gen.status));
console.log(gen.result.subject, gen.result.message);
What Prosp answered (HTTP 202)
{
  "id": "81648e2731934d9a2677b517efaa60b0",
  "status": "queued"
}
The finished message (three of the facts it used shown)
{
  "status": "succeeded",
  "created_at": "2026-11-09T01:27:20.020245721Z",
  "expires_at": "2026-11-16T01:29:03.562634777Z",
  "id": "81648e2731934d9a2677b517efaa60b0",
  "last_updated_at": "2026-11-09T01:29:03.562634777Z",
  "result": {
    "subject": "Potentiële afnemers voor Hesselink Koffie in Duitsland",
    "angle": "Lead generation for German hospitality market",
    "message": "Geachte heer/mevrouw,\n\nHesselink Koffie levert duurzame koffieoplossingen aan de horeca en zakelijke sectoren in onder andere Duitsland. Zou het voor u waardevol zijn om een voorbeeldlijst van deze bedrijven te ontvangen?\n\nMet vriendelijke groet,\n\nProsp",
    "facts_used": [
      {
        "fact_id": "name",
        "text": "Hesselink Koffie",
        "tier": "reported",
        "field": "name",
        "as_of": "2026-11-04"
      },
      {
        "source_url": "https://hesselinkkoffie.nl/over-ons/duurzaamheid/",
        "fact_id": "kb_fact",
        "text": "Hesselink Koffiebranders maintains transparency throughout their supply chain and holds multiple certifications including Fairtrade Organic, SKAL for organic production, and the Rainforest Alliance seal.",
        "tier": "reported",
        "field": "kb_fact",
        "as_of": "2026-11-04"
      },
      {
        "source_url": "https://hesselinkkoffie.nl/over-ons/duurzaamheid/",
        "fact_id": "kb_fact",
        "text": "Hesselink Koffiebranders is an officially B Corp certified coffee supplier that provides sustainable coffee solutions to the hospitality industry and other business sectors.",
        "tier": "reported",
        "field": "kb_fact",
        "as_of": "2026-11-04"
      }
    ],
    "facts_missing": [
      "registry",
      "events_town",
      "trade_fair"
    ]
  }
}
Your workflowYour workflowProspProspToken endpointToken endpointClient id and secret, scopemcp/executeAccess tokenPOST /api/v1/message-intelligencewith Idempotency-KeyAccepted, with thegeneration idGET/api/v1/message-intelligence/{id}Running state and seconds towaitGET again after the waitSucceeded: message, factsused, facts not found
The workflow gets a token, registers one generation, polls it until it is final, then sends the message itself.

How does the workflow authenticate, and how do I build the nodes?

Every call carries a Bearer access token. Get it with one call before the two message calls:

In n8n: use an HTTP Request node for the token. Then use one HTTP Request node to register the generation: method POST, the Authorization header, an Idempotency-Key header, and a JSON body with domain, channel and objective as in the request example above. Add a Wait node and a second HTTP Request node for the read.

In Make: use an HTTP module with the same method, URL, headers and body for each call, and a Sleep module between reads. Store the generation id from the first answer and map it into the read URL.

What does the finished answer carry, and what may the message say?

When the state is succeeded, the answer carries:

The message states as fact only what Prosp holds a source for, about the recipient and about the sender. Personal data is never stated. Your workflow can store the used facts next to the message, so the person who reviews the sequence sees the source of each claim.

The message is written in the language of the recipient company's website. You cannot choose it.

How do I poll, and when do I stop?

A generation passes through these states:

On succeeded, take the message from the answer and pass it to your sending step. On failed, do not send. The credits are returned. On canceled, there is nothing to read.

A company Prosp does not know yet is researched first, so the state is enriching before it is composing. To find companies in the first place, see /guides/new-prospects-into-n8n-or-make/.

To stop a generation that has not finished, call DELETE /api/v1/message-intelligence/{id}. A generation is kept for seven days after it ends. After that its id answers as gone, so store the message in your own system before then. Set your own cap on polling time and cancel when you reach it.

What does it cost, and how is a retry safe?

One generation debits ten credits, once, when it is registered. The research on a company Prosp does not know yet is covered by that debit. Reading the state costs no credits. A generation that fails returns the credits. A cancel returns them only if composition had not started.

The Idempotency-Key header is required on the registering call. If a node times out or n8n or Make retries it, send the same key with the same request. Prosp returns the existing generation and debits nothing more. A key is remembered for twenty-four hours.

Create one key per recipient and message in your workflow, for example when the item enters the loop, and reuse it on every retry of that item.

How do I get access for the workflow?

Get your API credentials, a client id and a client secret, with /credentials in the Prosp Telegram bot (they are created when the first credit pack is bought), then follow the API quick-start with the button below. The workflow can then register its first generation and read the finished message.

API quick-start