Automatic Threads Post and Media Archiving to Notion Database - n8n Workflow

Use this robust n8n workflow to automatically synchronize your Meta Threads posts, including text and media, into a structured Notion database, ensuring persistent archiving.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

-
Content creators looking to archive their social media output automatically.
Knowledge managers who use Notion as a centralized hub for all published content.
Users needing a scheduled, automated solution for migrating data from Threads using the n8n platform.
Anyone needing an advanced n8n workflow example involving external APIs (Threads) and database management (Notion).

Overview

Managing content across multiple social platforms can be tedious. This powerful n8n workflow solves the problem of manual data entry by automatically importing your latest Threads activity into a dedicated Notion database. By leveraging the Threads API and custom JavaScript code within n8n node steps, this solution ensures that not only the text, but also associated media (images, videos) are correctly formatted and saved as Notion embeds and paragraphs. This specific n8n workflow is ideal for maintaining a backup or creating a content calendar directly within your Notion workspace, minimizing effort and maximizing content traceability. The automation runs on a schedule, acting as a reliable n8n trigger for daily synchronization.

How it Works

The process begins with an n8n trigger, specifically a Scheduled Trigger, set to run daily.


  1. Authorization: The n8n workflow first executes an HTTP Request to refresh the necessary long-lived Threads access token, ensuring continuous API access.

  2. Post Fetching: A subsequent HTTP Request n8n node retrieves posts from your Threads profile that were published within the last 24 hours.

  3. Data Preparation: A Function n8n node filters the results to include only media-rich posts (text, image, video, etc.) and extracts essential IDs and permalinks.

  4. Looping & Detail Fetch: The Loop Over Items n8n node processes each post individually. It fetches the full content and conversational data using separate HTTP Request n8n node calls (Threads / Root and Threads / Comments).

  5. Content Structuring: Two Code n8n node steps (Root's Filter and Comment's Filter) parse the complex API responses, consolidating text and all associated media URLs into unified data structure.

  6. Notion Block Generation: The Threads Post Code n8n node formats this consolidated data into Notion-compatible blocks (paragraphs and embeds).

  7. Deduplication Check: The workflow uses a Notion n8n node to fetch existing IDs from the target database. It then uses a Function n8n node to compare the current Threads ID against the existing IDs to prevent duplicates.

  8. Conditional Action: The If Post Exist Switch n8n node directs the flow. If the post is new, the Notion n8n node creates a new database page with metadata.

  9. Media Upload: Finally, an HTTP Request n8n node calls the Notion API's block children endpoint to append the generated media and text blocks to the newly created page, completing this powerful n8n workflow.

Installation Guide

To deploy this comprehensive n8n workflow and start archiving your Threads content to Notion, follow these steps:


  1. Import the n8n template: Copy the provided JSON and paste it into your n8n canvas (File > Import from JSON).

  2. Threads Credentials (Run Once): Locate the 'Run This First to Get Long Live Access Token' n8n node. You must run this flow segment initially to exchange your short-lived token for a long-lived one, following the instructions in the associated Sticky Note.

  3. Update Threads ID: In the 'Get Post' n8n node, replace in the URL with your actual ID.

  4. Configure Tokens: In the 'Refresh Token' n8n node, update the access_token query parameter with your long-lived Threads token.

  5. Notion Setup: Set up your Notion database and ensure it contains necessary properties (e.g., 'Name' (title), 'Threads ID' (rich text), 'Post Date' (date), 'Source' (multi-select), 'Import Check' (checkbox)).

  6. Notion Credentials: Set up your Notion API credential in the 'Threads ID' and 'Create Page' Notion n8n node steps.

  7. Notion Token for Uploads: In the 'Upload Medias' HTTP Request n8n node, update the Authorization header with your internal Notion bearer token (e.g., bearer ).

  8. Username Check: In the 'Comment's Filter' Code n8n node, replace the hardcoded username ('geekaz') with your actual Threads username to correctly identify comment threads made by you.

Node Details

This n8n workflow utilizes several key n8n node types to achieve complex synchronization:

Get Posts Schedule (n8n Trigger): Initiates the entire n8n workflow on a defined schedule (e.g., daily).
Refresh Token (HTTP Request n8n node): Essential for maintaining authorized access to the Threads API by refreshing the long-lived token.
Get Post (HTTP Request n8n node): Queries the Threads API for recent posts using dynamic date filtering for efficiency. This n8n node retrieves the initial batch of posts.
Get Post ID (Function n8n node): Filters out unwanted post types and prepares basic item data for looping.
Loop Over Items (Split In Batches n8n node): Ensures that subsequent API calls and processing are handled for each individual post item sequentially.
Threads / Root & Threads / Comments (HTTP Request n8n node): Fetches comprehensive data for the main post and any associated conversational elements.
Root's Filter & Comment's Filter (Code n8n node): Custom JavaScript logic used to extract post text and all possible media URLs (including carousels/children) from the complex JSON responses, preparing it for the next n8n node.
Threads Post (Code n8n node): Transforms the cleaned data into the precise blocks array required by the Notion API, using paragraph and embed object structures.
Threads ID (Notion n8n node): Performs a databasePage: getAll operation to retrieve existing IDs from Notion for robust deduplication before proceeding to the Create Page n8n node.
If Post Exist (Switch n8n node): Controls the flow based on whether the post ID is new or existing, optimizing resource use.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by

Product Designer and Blogger!

Featured*