Help with Apollo.io API Integration in n8n Workflow

Hello, community!

I’m currently working on an n8n workflow that integrates with the Apollo.io API to add contacts to an email sequence. However, I’ve been running into some issues with my API requests, specifically regarding a 406 error and an undefined method 'team_id' for nil message.

when i’m doing everything right

{
  "meta": {
    "instanceId": "15c8a3ba652c1e7f75f8a7cfe11f041c4eb96aae66f5492f945501ab9114eba0"
  },
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "id": "52454453-8a5e-4ec5-9c44-70d4827fe280",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -1840,
        1500
      ]
    },
    {
      "parameters": {
        "operation": "search",
        "base": {
          "value": "appCt5bCjnfTfwsTG",
          "mode": "list"
        },
        "table": {
          "value": "tblrcwXHiwzYFgLmY",
          "mode": "list"
        },
        "filterByFormula": "AND({email} = \"\")",
        "options": {}
      },
      "id": "8d5f2a69-8093-477b-89bd-3c68bb08e842",
      "name": "Airtable Fetch",
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        -1600,
        1500
      ],
      "credentials": {
        "airtableTokenApi": {
          "id": "YOUR_AIRTABLE_API_KEY",
          "name": "Lead Acq_1"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.apollo.io/v1/people/match",
        "sendHeaders": true,
        "headerParameters": [
          {
            "name": "Cache-Control",
            "value": "no-cache"
          },
          {
            "name": "X-Api-Key",
            "value": "YOUR_API_KEY"
          }
        ],
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "id",
              "value": "={{ $json.id }}"
            },
            {
              "name": "first_name",
              "value": "={{ $json.first_name }}"
            },
            {
              "name": "last_name",
              "value": "={{ $json.last_name }}"
            },
            {
              "name": "organization_name",
              "value": "={{ $json.organization_name }}"
            },
            {
              "name": "linkedin_url",
              "value": "={{ $json.linkedin_url }}"
            },
            {
              "name": "reveal_personal_emails",
              "value": true
            }
          ]
        },
        "options": {
          "response": {
            "response": {
              "fullResponse": true,
              "responseFormat": "json"
            }
          }
        }
      },
      "id": "16227c45-76dc-4548-a3dd-cb0a19388b3d",
      "name": "Enrich Emails",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -1380,
        1500
      ]
    },
    {
      "parameters": {
        "async": false,
        "contact_ids": {{ JSON.stringify($('Code2').item.json.contactIds) }},
        "emailer_campaign_id": "66f511342886c902d29fada4",
        "send_email_from_email_account_id": "66f511342886c902d29fada4",
        "sequence_active_in_other_campaigns": false,
        "sequence_no_email": false,
        "sequence_finished_in_other_campaigns": false,
        "sequence_unverified_email": false,
        "sequence_job_change": false,
        "sequence_same_company_in_same_campaign": false,
        "user_id": "61a48e0bdb8bcc00f66c6f7d"
      },
      "id": "753c1358-56a8-4f1c-af1a-c25bb916d352",
      "name": "Add Contacts to Sequence",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        720,
        1460
      ]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Airtable Fetch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Airtable Fetch": {
      "main": [
        [
          {
            "node": "Enrich Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich Emails": {
      "main": [
        [
          {
            "node": "Add Contacts to Sequence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

1 Like

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Rohit_Gurav,

I don’t have an Apollo account to test this out but the error suggests that you’re missing a team_id in the request. Could you try including team_id in your request body, and make sure you have all the required parameters? I’d also double-check their API reference or reach out to Apollo for more support.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.