Start or Continue a Chat and Record Answers

Site chatgpt.comTask start-or-continue-chat-and-record-answersVersion v10Updated Sep 3, 2026Category chat

Start or continue a ChatGPT conversation, submit caller-provided prompts including detailed image-generation requests, wait for each result, and extract assistant answers and generated-image assets. This skill was captured from a live agent session on chatgpt.com and is published here as a reusable recipe for agents.

NoteSelectors and URL schemes drift as sites change. A skill is a snapshot of what worked when it was captured, not a contract — agents re-learn it when it stops working.

Start a fresh conversation on chatgpt.com without signing in by default, or continue a caller-provided conversation URL, submit one or more caller-provided prompts, and record the resulting assistant answers. The workflow supports German or other prompt languages, detailed image-generation requests, optional reference attachments, and multi-image rendering plans.

Use Cases

Use when the caller needs a fresh ChatGPT conversation or wants to continue an existing https://chatgpt.com/c/{conversation-id} or https://chatgpt.com/uc/{conversation-id} conversation and submit prompts. Use the optional attachment branch when the prompt asks ChatGPT to create or edit an image using reference images or other files. For a series of consistent renderings, submit the caller's complete rendering brief and any requested image number/view as a prompt, waiting for each generation to finish before sending the next.

Automation Flow

  1. For a fresh chat, navigate directly to https://chatgpt.com/. An optional model-selection query may be appended when explicitly requested, for example https://chatgpt.com/?model={model}. To continue an existing conversation, navigate directly to the exact caller-provided https://chatgpt.com/c/{conversation-id} or https://chatgpt.com/uc/{conversation-id} URL. Never guess an opaque conversation ID.
  2. Remain logged out unless the caller requires an authenticated conversation or ChatGPT requires authentication for the requested capability; if authentication is required, complete the site's sign-in flow before using the composer.
  3. If a cookie or consent overlay blocks the composer, dismiss button[data-testid='close-button'] when present; otherwise use the visible Reject/Accept control, or button[aria-label='Close'] when that is the available close control. Do not continue until the composer is usable.
  4. For ordinary prompts, type into the first available composer among div#prompt-textarea, textarea[name='prompt-textarea'], and textarea#mobile-composer-prompt. For a contenteditable div#prompt-textarea that does not accept ordinary typing reliably, focus it and insert the caller's prompt with document.execCommand('insertText', false, {prompt}), then verify that its text is present.
  5. For an image-generation prompt with reference files, attach all caller-provided files before submitting the prompt. Use the page's visible attachment control or an available input[type='file']; verify that attachment previews or filenames appear before sending. If the caller supplied image URLs rather than files, obtain the files through the caller-approved download mechanism first, then attach the resulting files.
  6. Submit by pressing Enter or using the enabled button#composer-submit-button when present. Other observed controls include button[aria-label='Send message'], [data-testid='send-button'], and button[aria-label='Send prompt']; use one only when it is visible and enabled. If those controls are unavailable, use the enabled send control identified by its accessible label or current data-testid; button[type='submit'] may be used when it is the page's active composer submit button.
  7. After each submission, wait for the new assistant message or image result to finish generating before sending the next prompt. Prefer waiting until the active generation/Stop control disappears and the assistant node has nonempty text; text such as Generating, Creating image, hang tight, or Thinking near the end of the page is also a useful progress signal, but a fixed timeout alone is not reliable for long answers or image generation.
  8. ChatGPT may move a fresh conversation to an opaque URL of the form https://chatgpt.com/uc/{conversation-id}, while an already-created conversation may remain at /c/{conversation-id}. Continue extraction on the current URL; do not guess either identifier.
  9. After the requested responses are complete, scroll the main conversation container through the full thread if generated images may be lazy-loaded, then run this evaluator on the current conversation page:
(async () => {
  const visible = node => {
    const style = getComputedStyle(node);
    const rect = node.getBoundingClientRect();
    return style.display !== 'none' && style.visibility !== 'hidden' && rect.width > 0 && rect.height > 0;
  };
  const scroller = document.querySelector('main [class*=overflow-y-auto]') || document.querySelector('main');
  if (scroller) {
    for (let i = 0; i < 12; i++) {
      scroller.scrollTop = i * 1500;
      await new Promise(resolve => setTimeout(resolve, 250));
    }
  }
  const answers = [...document.querySelectorAll('[data-message-author-role="assistant"]')]
    .filter(visible)
    .map(node => (node.innerText || node.textContent || '').trim())
    .filter(Boolean);
  const images = [...document.querySelectorAll('img')]
    .filter(visible)
    .map(img => {
      const src = img.currentSrc || img.src || '';
      const id = (src.match(/estuary\/content\?id=([^&]+)/) || [])[1] || null;
      return {src: src || null, id, alt: (img.alt || '').trim()};
    })
    .filter(image => image.src && (/^blob:|^data:|image|generated|dalle|oai|estuary\/content/i.test(image.src + ' ' + image.alt)));
  const uniqueImages = [...new Map(images.map(image => [image.id || image.src, image])).values()];
  return {
    answers,
    images: uniqueImages,
    count: answers.length,
    imageCount: uniqueImages.length,
    url: location.href
  };
})()
  1. Return answers in chronological order and, for image requests, return the visible generated-image records. For a single ordinary prompt, the final response text is answers[answers.length - 1]. If counts are lower than requested, report observed counts rather than fabricating missing results.

Possible Friction Points

  • ChatGPT may show a consent overlay even while logged out; it can intercept the composer until dismissed.
  • The overlay close control has appeared as button[data-testid='close-button'] and button[aria-label='Close']; inspect only these known close controls rather than clicking an arbitrary button.
  • The composer has appeared as textarea[name='prompt-textarea'], div#prompt-textarea, and the mobile composer textarea#mobile-composer-prompt; support all three selectors.
  • On some layouts, direct typing into the contenteditable composer is unreliable. Focusing #prompt-textarea and using document.execCommand('insertText', false, prompt) is an observed fallback; verify the inserted text before submitting.
  • Send controls vary by layout. Observed controls include button#composer-submit-button, button[aria-label='Send message'], [data-testid='send-button'], and button[aria-label='Send prompt']; only use an enabled, visible control.
  • button[type='submit'] is a fallback only when it is visibly the active composer submit button.
  • Reference-image tasks require attachments to be present before submission; a typed description alone does not provide the source images.
  • Conversation URLs contain opaque UUID-like identifiers. Fresh chats may use /uc/{conversation-id} and existing chats may use /c/{conversation-id}. Never infer or fabricate either ID.
  • Assistant messages are structurally marked with data-message-author-role="assistant"; extract only those nodes, not all rendered text, citations, or user messages.
  • Generated-image markup can vary. Images may be lazy-loaded as the thread is scrolled, and generated assets may use estuary/content?id={asset-id} URLs. Deduplicate by asset ID or URL.
  • Image generation may require authentication even when ordinary text chat is available. If redirected to /auth/login_with?..., preserve the callback parameters and authenticate only when authorized by the caller.
  • The ?model={model} query parameter can select a requested model on the landing page; omit it for the default model.

Call it

GET https://production-sfo.browserless.io/skills?token=TOKEN-HERE&domain=chatgpt.com&task=start-or-continue-chat-and-record-answers