🐦 Twitter Post Details

Viewing enriched Twitter post

@llama_index

Here's a common scenario: Your finance team gets emails all day with invoices from partners and expense reports from employees. Each one needs different handling. Invoices need acknowledgment and payment scheduling. Expenses need budget validation before approval etc. In this example we build an agent that automatically triages incoming emails with attachments, extracts the right information, and takes appropriate action. Our approach uses three of our tools working together: 1️⃣ LlamaClassify handles the first decision point. It looks at each attachment and determines: is this an invoice that needs to be paid out to a partner, or an expense that needs reimbursement? It also provides reasoning for the decision. 2️⃣ LlamaExtract does the heavy lifting on data extraction. We create two specialized agents with different schemas for invoices vs expenses. 3️⃣ Agent Workflows orchestrates the entire process. It connects classification to extraction to business logic: in this case, checking expenses against a budget threshold and generating appropriate email responses via LLM. Classify incoming documents → extract relevant data → apply business rules → take action. Need to add a new document type? Add a classification rule and an extraction schema. Need different business logic? Modify the workflow steps. The components stay the same. Check out the full example: https://t.co/5qsO6gmBs2

Media 1
Media 2

📊 Media Metadata

{
  "media": [
    {
      "type": "photo",
      "url": "https://crmoxkoizveukayfjuyo.supabase.co/storage/v1/object/public/media/posts/1986476949687140503/media_0.jpg?",
      "filename": "media_0.jpg"
    },
    {
      "type": "photo",
      "url": "https://crmoxkoizveukayfjuyo.supabase.co/storage/v1/object/public/media/posts/1986476949687140503/media_1.jpg?",
      "filename": "media_1.jpg"
    }
  ],
  "processed_at": "2025-11-27T20:22:30.035898",
  "pipeline_version": "2.0"
}

🔧 Raw API Response

{
  "type": "tweet",
  "id": "1986476949687140503",
  "url": "https://x.com/llama_index/status/1986476949687140503",
  "twitterUrl": "https://twitter.com/llama_index/status/1986476949687140503",
  "text": "Here's a common scenario: Your finance team gets emails all day with invoices from partners and expense reports from employees. Each one needs different handling. Invoices need acknowledgment and payment scheduling. Expenses need budget validation before approval etc.\n\nIn this example we build an agent that automatically triages incoming emails with attachments, extracts the right information, and takes appropriate action.\n\nOur approach uses three of our tools working together:\n1️⃣ LlamaClassify handles the first decision point. It looks at each attachment and determines: is this an invoice that needs to be paid out to a partner, or an expense that needs reimbursement? It also provides reasoning for the decision.\n2️⃣ LlamaExtract does the heavy lifting on data extraction. We create two specialized agents with different schemas for invoices vs expenses.\n3️⃣ Agent Workflows orchestrates the entire process. It connects classification to extraction to business logic: in this case, checking expenses against a budget threshold and generating appropriate email responses via LLM.\n\nClassify incoming documents → extract relevant data → apply business rules → take action.\nNeed to add a new document type? Add a classification rule and an extraction schema. Need different business logic? Modify the workflow steps. The components stay the same.\nCheck out the full example: https://t.co/5qsO6gmBs2",
  "source": "Twitter for iPhone",
  "retweetCount": 5,
  "replyCount": 3,
  "likeCount": 28,
  "quoteCount": 1,
  "viewCount": 11712,
  "createdAt": "Thu Nov 06 16:53:06 +0000 2025",
  "lang": "en",
  "bookmarkCount": 21,
  "isReply": false,
  "inReplyToId": null,
  "conversationId": "1986476949687140503",
  "displayTextRange": [
    0,
    278
  ],
  "inReplyToUserId": null,
  "inReplyToUsername": null,
  "author": {
    "type": "user",
    "userName": "llama_index",
    "url": "https://x.com/llama_index",
    "twitterUrl": "https://twitter.com/llama_index",
    "id": "1604278358296055808",
    "name": "LlamaIndex 🦙",
    "isVerified": false,
    "isBlueVerified": true,
    "verifiedType": null,
    "profilePicture": "https://pbs.twimg.com/profile_images/1967920417760251904/0ytfduMQ_normal.png",
    "coverPicture": "https://pbs.twimg.com/profile_banners/1604278358296055808/1758023766",
    "description": "",
    "location": "",
    "followers": 104427,
    "following": 28,
    "status": "",
    "canDm": false,
    "canMediaTag": true,
    "createdAt": "Sun Dec 18 00:52:44 +0000 2022",
    "entities": {
      "description": {
        "urls": []
      },
      "url": {}
    },
    "fastFollowersCount": 0,
    "favouritesCount": 1453,
    "hasCustomTimelines": true,
    "isTranslator": false,
    "mediaCount": 1778,
    "statusesCount": 3636,
    "withheldInCountries": [],
    "affiliatesHighlightedLabel": {},
    "possiblySensitive": false,
    "pinnedTweetIds": [
      "1986810928713855235"
    ],
    "profile_bio": {
      "description": "AI Agents for document OCR + workflows\n\nGithub: https://t.co/HC19j7veGE\nDocs: https://t.co/QInqg2yMCJ\nLlamaCloud: https://t.co/yQGTiRSfFL",
      "entities": {
        "description": {
          "urls": [
            {
              "display_url": "github.com/run-llama/llam…",
              "expanded_url": "http://github.com/run-llama/llama_index",
              "indices": [
                48,
                71
              ],
              "url": "https://t.co/HC19j7veGE"
            },
            {
              "display_url": "docs.llamaindex.ai",
              "expanded_url": "http://docs.llamaindex.ai",
              "indices": [
                78,
                101
              ],
              "url": "https://t.co/QInqg2yMCJ"
            },
            {
              "display_url": "cloud.llamaindex.ai",
              "expanded_url": "https://cloud.llamaindex.ai/",
              "indices": [
                114,
                137
              ],
              "url": "https://t.co/yQGTiRSfFL"
            }
          ]
        },
        "url": {
          "urls": [
            {
              "display_url": "llamaindex.ai",
              "expanded_url": "https://www.llamaindex.ai/",
              "indices": [
                0,
                23
              ],
              "url": "https://t.co/epzefqPT9Z"
            }
          ]
        }
      }
    },
    "isAutomated": false,
    "automatedBy": null
  },
  "extendedEntities": {
    "media": [
      {
        "display_url": "pic.twitter.com/e9vcg8sXy1",
        "expanded_url": "https://twitter.com/llama_index/status/1986476949687140503/photo/1",
        "ext_media_availability": {
          "status": "Available"
        },
        "features": {
          "large": {},
          "orig": {}
        },
        "id_str": "1986476940426158080",
        "indices": [
          279,
          302
        ],
        "media_key": "3_1986476940426158080",
        "media_results": {
          "id": "QXBpTWVkaWFSZXN1bHRzOgwAAQoAARuRYkCkmyAACgACG5FiQsyagJcAAA==",
          "result": {
            "__typename": "ApiMedia",
            "id": "QXBpTWVkaWE6DAABCgABG5FiQKSbIAAKAAIbkWJCzJqAlwAA",
            "media_key": "3_1986476940426158080"
          }
        },
        "media_url_https": "https://pbs.twimg.com/media/G5FiQKSbIAA9Crd.jpg",
        "original_info": {
          "focus_rects": [
            {
              "h": 1344,
              "w": 2400,
              "x": 0,
              "y": 0
            },
            {
              "h": 1844,
              "w": 1844,
              "x": 278,
              "y": 0
            },
            {
              "h": 1844,
              "w": 1618,
              "x": 391,
              "y": 0
            },
            {
              "h": 1844,
              "w": 922,
              "x": 739,
              "y": 0
            },
            {
              "h": 1844,
              "w": 2400,
              "x": 0,
              "y": 0
            }
          ],
          "height": 1844,
          "width": 2400
        },
        "sizes": {
          "large": {
            "h": 1574,
            "w": 2048
          }
        },
        "type": "photo",
        "url": "https://t.co/e9vcg8sXy1"
      }
    ]
  },
  "card": null,
  "place": {},
  "entities": {
    "urls": [
      {
        "display_url": "github.com/run-llama/work…",
        "expanded_url": "https://github.com/run-llama/workflows-py/blob/main/examples/document_agents/finance_triage_agent.ipynb",
        "indices": [
          1381,
          1404
        ],
        "url": "https://t.co/5qsO6gmBs2"
      }
    ]
  },
  "quoted_tweet": null,
  "retweeted_tweet": null,
  "isLimitedReply": false,
  "article": null
}