← All N8N workflows
Automation & utilitiesCodeFunctionHTTP RequestMergeNo Op

Get Threads API Access Token

Configured with Function, HTTP Request, Notion, Schedule Trigger, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
Web / APIRefresh TokenHTTP RequestWeb / APIGet PostHTTP RequestCodeGet Post IDFunctionRoutingLoop Over ItemsLoop Over ItemsRoutingReplace MeNo OpWeb / APIThreads / CommentsHTTP RequestWeb / APIThreads / RootHTTP RequestCodeComment's FilterCodeCodeRoot's FilterCodeIntegrationThreads IDNotionCodeExtract IDsFunctionCodeCompare IDsFunctionIntegrationCreate PageNotionWeb / APIUpload MediasHTTP RequestRoutingIf Post ExistSwitchCodeThreads PostCodeTransformMergeMergeWeb / APIRun This First to GetLong Live Access TokenHTTP RequestTriggerGet Posts ScheduleSchedule Trigger

Node categories in this workflow

  • Web / API
  • Code
  • Routing
  • Integration
  • Transform
  • Trigger

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Refresh TokenWeb / APIHTTP RequestSee node parameters
Get PostWeb / APIHTTP RequestSee node parameters
Get Post IDCodeFunctionSee node parameters
Loop Over ItemsRoutingLoop Over ItemsSee node parameters
Replace MeRoutingNo OpSee node parameters
Threads / CommentsWeb / APIHTTP RequestSee node parameters
Threads / RootWeb / APIHTTP RequestSee node parameters
Comment's FilterCodeCodeSee node parameters
Root's FilterCodeCodeSee node parameters
Threads IDIntegrationNotiondatabasePage / getAll
Extract IDsCodeFunctionSee node parameters
Compare IDsCodeFunctionSee node parameters
Create PageIntegrationNotiondatabasePage
Upload MediasWeb / APIHTTP RequestSee node parameters
If Post ExistRoutingSwitchSee node parameters
Threads PostCodeCodeSee node parameters
MergeTransformMergeSee node parameters
Run This First to Get Long Live Access TokenWeb / APIHTTP RequestSee node parameters
Get Posts ScheduleTriggerSchedule TriggerSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • notionApi

Workflow notes

Get Threads API Access Token

Get Threads API Access Token

Get Threads Access Token Tutorial and ID/教學 Link

Please get your access token and Threads ID first before you start (It only need to run once)

Refresh Token

Refresh Token

Update your long live token here / 在此放上剛剛拿到的長期 Token

Check Facebook Docs Refresh Token

Set your Theads ID & Post Time

Set your Theads ID & Post Time

Chage the your with your Threads ID to get your posts / 請先透過上方教學獲取 Threads ID

Set the time of the Post you wanna get / 設置抓取的貼文時間

Check Facebook Docs Post API

since is scrape the post after the date / since 為抓取日期之後的貼文

until is scrape the post before the date / until 為抓取日期之前的貼文

since can set

{{ new Date(new Date().setDate(new Date().getDate() - 1)).toISOString().split('T')[0] }}

it will scrape the post since one day ago

Set Notion Acc

Set Notion Acc

Set your notion account and database you wanna save the post

Create Page

Create Page

Before create page, please the properties of your post by your demands

Support Medias

Support Medias

It also can scrape the Threads Media like Images and Videos

Update your Notion token here:

bearer

Get your Threads Post automatically

Get your Threads Post automatically

Creator: Geekaz

If your have any problems or question, please send message to my instagram! 有任何問題都歡迎透過 Instagram 私訊詢問!

Comment's Filter

Comment's Filter

Set your Threads Username

Get Threads API Access Token

Get Threads API Access Token

Purpose and structure

This folder contains the Get Threads API Access Token workflow. Its executable nodes use code, function, httpRequest, merge, noOp, notion, scheduleTrigger, splitInBatches, switch. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Get Posts Schedule

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Code/0706_Code_Schedule_Create_Scheduled.json MIT; preserve source notices.

More in Automation & utilities