{
  "workflow_name": "Shorten links sent to your Telegram bot with Bitly",
  "workflow_steps": {
    "steps": [
      {
        "id": "1",
        "position": {
          "x": 0,
          "y": 0
        },
        "data": {
          "label": "New Message",
          "app": {
            "key": "telegram",
            "fm_app": "telegram"
          },
          "eventSlug": "watch_updates",
          "eventTitle": "Set Webhook / Watch Updates",
          "layoutDirection": "horizontal",
          "stepNumber": 1
        },
        "targetPosition": "bottom",
        "type": "trigger",
        "stepNumber": 1,
        "expanded": true,
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "application": "telegram",
        "stepID": "1",
        "action": "watch_updates",
        "nodeType": "step",
        "actionAppArgs": [],
        "captureResponse": {
          "update_id": "804512339",
          "message_message_id": "211",
          "message_chat_id": "583920114",
          "message_from_first_name": "Zoe",
          "message_text": "https://example.com/blog/2026/10/how-we-plan-content-for-the-whole-quarter?utm_source=telegram",
          "message_date": "1761212400"
        },
        "responses": [
          {
            "letter": "A",
            "time": "01/07/2026, 10:00:00",
            "response": {
              "update_id": "804512339",
              "message_message_id": "211",
              "message_chat_id": "583920114",
              "message_from_first_name": "Zoe",
              "message_text": "https://example.com/blog/2026/10/how-we-plan-content-for-the-whole-quarter?utm_source=telegram",
              "message_date": "1761212400"
            }
          }
        ],
        "activeResponseIndex": 0
      },
      {
        "id": "2",
        "position": {
          "x": 175,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Find the link in the message",
          "layoutDirection": "horizontal",
          "stepNumber": 2,
          "app": {
            "key": "text_formatter",
            "fm_app": "text_formatter"
          },
          "eventSlug": "extract_pattern",
          "eventTitle": "Extract Pattern"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "content": "{telegram1.message_text}",
          "regex_pattern": "https?://[^\\s]+"
        },
        "application": "text_formatter",
        "action": "extract_pattern",
        "nodeType": "step",
        "stepID": "2"
      },
      {
        "id": "3",
        "position": {
          "x": 350,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Filter Conditions",
          "layoutDirection": "horizontal",
          "stepNumber": 3,
          "app": {
            "key": "filter",
            "fm_app": "filter"
          },
          "eventSlug": "continue_if",
          "eventTitle": "Continue If Condition Meet",
          "customLabel": "Only messages with a link"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "filterConditions": {
            "1": [
              {
                "key": "{text_formatter2.result_0}",
                "condition": "is_not_empty",
                "value": ""
              }
            ]
          }
        },
        "application": "filter",
        "action": "continue_if",
        "nodeType": "step",
        "stepID": "3",
        "filterConditions": {
          "filterConditions": {
            "1": [
              {
                "key": "{text_formatter2.result_0}",
                "condition": "is_not_empty",
                "value": ""
              }
            ]
          }
        }
      },
      {
        "id": "4",
        "position": {
          "x": 525,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Shorten the link with Bitly",
          "layoutDirection": "horizontal",
          "stepNumber": 4,
          "app": {
            "key": "bitly",
            "fm_app": "bitly"
          },
          "eventSlug": "new_link",
          "eventTitle": "Create a Short Link"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "bitlyURL": "{text_formatter2.result_0}"
        },
        "application": "bitly",
        "action": "new_link",
        "nodeType": "step",
        "stepID": "4"
      },
      {
        "id": "5",
        "position": {
          "x": 700,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Reply with the short link",
          "layoutDirection": "horizontal",
          "stepNumber": 5,
          "app": {
            "key": "telegram",
            "fm_app": "telegram"
          },
          "eventSlug": "send_message",
          "eventTitle": "Send a Text Message"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "chat_id": "{telegram1.message_chat_id}",
          "text": "Short link: {bitly4.link}",
          "parse_mode": "HTML"
        },
        "application": "telegram",
        "action": "send_message",
        "nodeType": "step",
        "stepID": "5"
      },
      {
        "id": "main_end_placeholder",
        "position": {
          "x": 875,
          "y": 0
        },
        "type": "placeholder",
        "data": {
          "label": "+",
          "layoutDirection": "horizontal",
          "stepNumber": null,
          "app": []
        },
        "measured": {
          "width": 40,
          "height": 82
        },
        "stepID": "main_end_placeholder",
        "nodeType": "placeholder",
        "actionAppArgs": []
      }
    ],
    "edges": [
      {
        "id": "e-1-2",
        "source": "1",
        "target": "2",
        "type": "step",
        "data": []
      },
      {
        "id": "e-2-3",
        "source": "2",
        "target": "3",
        "type": "step",
        "data": []
      },
      {
        "id": "e-3-4",
        "source": "3",
        "target": "4",
        "type": "step",
        "data": []
      },
      {
        "id": "e-4-5",
        "source": "4",
        "target": "5",
        "type": "step",
        "data": []
      },
      {
        "id": "e-5-main_end_placeholder",
        "source": "5",
        "target": "main_end_placeholder",
        "type": "placeholder",
        "data": []
      }
    ]
  },
  "workflow_settings": {
    "name": "Shorten links sent to your Telegram bot with Bitly",
    "folder": "all",
    "description": "Send any long link to your Telegram bot and it replies with a Bitly short link a moment later. It is a quick way for social and marketing teams to shorten links from their phone. After import, connect your Telegram bot and Bitly account; messages without a link are ignored.",
    "status": "off",
    "user_email": "",
    "webhook_queue": "disabled",
    "workflow_auth_key": "",
    "builder_version": "v2",
    "time": "",
    "ai_generated": "yes"
  }
}