Nodes/ComfyUI-Thread/Threads History
ComfyUI Node

Threads History

Let Your Workflow Read Back What It Already Posted

By dseditor·Created about a year ago·Updated about a year ago· 7
Threads History
    • history_content
    backfill_days7

    ThreadsHistory is the one node in the ComfyUI-Thread pack that doesn't post anything - it pulls. Feed it a number of days and it fetches your own recent Threads posts as one formatted text blob. That sounds niche until you're auto-posting from a workflow and want to confirm "did last night's run actually go out, and what did it say?" This node is the answer to that, without opening a browser.

    It's also the cheapest node in the pack to set up: no media upload, no public URL required. It just reads your posts and hands them back as text.

    How it works

    Like every node in this pack, it starts by reading thread_config.json - so you still have to run StartWithLongLiveToken first. Then it fires a GET at https://graph.threads.net/v1.0/{user_id}/threads with fields=id,permalink,username,timestamp,text, a since timestamp set to now minus your window, and a limit of 100. Each post gets formatted into a block with its time, text, permalink, and ID, separated by dashes, and the whole thing is returned as one string.

    One nice touch: failures don't throw. Missing config, an API error, or an empty date range all come back as regular strings in the output. Wire history_content into a ShowText node and read it like a report - no red exceptions, just a message telling you what happened.

    The inputs and output

    There's exactly one input, which is refreshing:

    • backfill_days - INT, default 7, range 1–365. How far back to look.

    And one output:

    • history_content - STRING, the formatted post history.

    The node isn't itself a display node, so don't forget the ShowText on the other end or you'll be wondering where the results went.

    What it won't do

    Honest limits, because "history" is doing a lot of work here. You get text, permalink, timestamp, and post ID - no images, no videos, no like or reply counts, no pagination past 100 posts. It's a text-only dump. If you want to do anything structured with the result - filter posts, feed them into an LLM node for analysis, build a content calendar - you'll be parsing a string, which is exactly why wiring it into a text-processing node is the natural next step.

    Install

    Same as the rest of the pack: ComfyUI Manager → search ComfyUI-Thread → install → restart. Or:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/dseditor/ComfyUI-Thread
    

    No model downloads, no extra heavyweight dependencies - requirements.txt is a single entry (threads_sdk) that the code doesn't even import, so this installs fast and quietly.

    Gotchas

    • If you see "請先執行 StartWithLongLiveToken 節點" (please execute the token node first), that's the missing-config error - run the setup node once and come back.
    • The backfill_days max of 365 means a year is as far back as you can go, and Meta's API only surfaces your own account anyway (this pack was never going to give you other people's posts).
    • Don't expect media in the output. If you need "what images did I post," this node will tell you the text but not the pictures.
    CategoryComfyUI-Thread

    Inputs (1)

    NameTypeDefaultDescription
    backfill_daysINT71–365

    Outputs (1)

    NameTypeDescription
    history_contentSTRING