Manual trigger not running when Gmail trigger present in the workflow

Hi, I’m new at n8n, I’m trying to build a workflow that has a manual trigger and a Gmail trigger in it, but when I run it it runs only the gmail branch but not the branch with the manual trigger
thanks for your help!!

here is an image of the workflow

here is the code

type or paste code here
  "name": "My workflow",
  "nodes": [
    {
      "parameters": {
        "url": "https://api.pdf.co/v1/file/upload/get-presigned-url",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -1620,
        0
      ],
      "id": "2ae2d329-e12a-4161-906b-a465cc6e7e6d",
      "name": "GetUrlToUploadFile",
      "credentials": {
        "httpHeaderAuth": {
          "id": "grnKBbDUHhlFgcxu",
          "name": "PDF.co API KEY"
        }
      }
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "custom"
            }
          ]
        },
        "simple": false,
        "filters": {
          "readStatus": "unread"
        },
        "options": {
          "downloadAttachments": true
        }
      },
      "type": "n8n-nodes-base.gmailTrigger",
      "typeVersion": 1.2,
      "position": [
        -1620,
        220
      ],
      "id": "9c3d0ae4-2849-4b6c-a372-df9bc64ff2a8",
      "name": "GetAttachmentsTrigger1",
      "credentials": {
        "gmailOAuth2": {
          "id": "U5YSejLWWllQBg1U",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "method": "PUT",
        "url": "=https://api.pdf.co/v1/file/upload/{{$('GetUrlToUploadFile').item.json.presignedUrl}}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "content/pdf"
            }
          ]
        },
        "sendBody": true,
        "contentType": "binaryData",
        "inputDataFieldName": "={{ $('GetAttachmentsTrigger1').item.binary.attachment_0 }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -1160,
        20
      ],
      "id": "1b76c368-362c-4497-9eac-4c637b343052",
      "name": "ParsePDF1",
      "credentials": {
        "httpHeaderAuth": {
          "id": "grnKBbDUHhlFgcxu",
          "name": "PDF.co API KEY"
        }
      }
    },
    {
      "parameters": {
        "mode": "chooseBranch",
        "useDataOfInput": 2
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.1,
      "position": [
        -1360,
        20
      ],
      "id": "a2bc34dc-284d-4e9f-9c4b-fd0e9f4f1b08",
      "name": "Merge",
      "alwaysOutputData": false
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -1860,
        0
      ],
      "id": "f05c0b6b-fb44-4515-8006-100acfdec958",
      "name": "When clicking ‘Test workflow’"
    }
  ],
  "pinData": {},
  "connections": {
    "GetUrlToUploadFile": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetAttachmentsTrigger1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "ParsePDF1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "GetUrlToUploadFile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "92f2dd5d-2305-473b-b17c-51a0e9aec863",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "f4dab403de0488c3a8bc3ae874e5007fe6b492d3c1c58ebfaabe05a0bbdb0fcb"
  },
  "id": "BFKhIF1CulLGlpE9",
  "tags": []
}

Thats how n8n works.
An executions start by 1 Trigger node and basicly ends on the last node.

But you can start the workflow yourself on each triggernode. Just hover over the node and the “Test workflow” button appears.

For testing I suggest to pin data to the Gmail Trigger. Unfortunately this doesn’t work for binary data.

The input data field of the http node is also just the name of the binary field to use. I changed it to attachment_0

1 Like

It worked, thanks a lot Franz!!

I have the exact same question. I understand the answer, but then I am very curious why it does work on this youtube video: https://youtu.be/uScURRX-Knc?si=V_A-gXfrKkz2nXa3 (3:15:00)

What is the difference between the topic starter and this YouTuber?