N8N Tools - LinkedIn Enhanced icon

N8N Tools - LinkedIn Enhanced

Comprehensive LinkedIn Marketing API v2 integration for N8N workflows with B2B marketing and networking features

Advertising → Delete Campaign

AI-generated

Overview

The node provides integration with LinkedIn's Marketing API v2, enabling various advertising-related operations. Specifically, for the Advertising resource and Delete Campaign operation, it allows users to delete an existing advertising campaign associated with a LinkedIn company account.

This operation is useful in scenarios where marketers or advertisers want to programmatically remove outdated or unwanted campaigns from their LinkedIn ad accounts as part of automated workflows. For example, after a campaign has ended or failed to meet performance goals, this node can be used to clean up campaigns without manual intervention.

Properties

Name Meaning
Company ID The LinkedIn Company ID that owns the advertising campaign to be deleted.
Campaign ID The identifier of the specific campaign to delete (inferred from usage, see notes below).
Max Results Maximum number of results to return (not directly relevant for delete but available).
Start Index Index of the first result to return (not directly relevant for delete but available).

Note:

  • The provided properties JSON does not explicitly list campaignId as an input property, but the source code shows that the delete campaign operation requires both companyId and campaignId parameters.
  • Max Results and Start Index are general pagination parameters used in other operations but not applicable for deleting a campaign.

Output

The output of the delete campaign operation is a JSON object representing the response from the LinkedIn API after attempting to delete the specified campaign. Typically, this will include confirmation of deletion or details about the deleted campaign.

The node outputs an array of items, each containing a json field with the API response data. There is no binary data output for this operation.

Example output structure:

[
  {
    "json": {
      "status": "success",
      "message": "Campaign deleted successfully",
      "campaignId": "123456789"
    },
    "itemData": {
      "item": 0
    }
  }
]

Dependencies

  • Requires an active subscription and valid API key credential for the external N8N Tools API service that acts as a proxy or enhancer for LinkedIn API calls.
  • Requires OAuth2 credentials for LinkedIn API access.
  • The node uses internal helper classes to interact with LinkedIn's Marketing API v2.
  • No additional environment variables are explicitly required beyond standard n8n credential setup.

Troubleshooting

  • Invalid Subscription or API Key:
    Error message: "N8N Tools API: Invalid subscription or API key. Please check your credentials."
    Resolution: Verify that the API key credential is correct and the subscription is active.

  • Missing Required Parameters:
    If companyId or campaignId is missing or invalid, the LinkedIn API will reject the request. Ensure these IDs are correctly set.

  • API Rate Limits or Permissions:
    LinkedIn API may enforce rate limits or require specific permissions/scopes for deleting campaigns. Confirm that the OAuth2 token has sufficient rights.

  • General API Errors:
    Any other errors returned by the LinkedIn API will be surfaced. Review the error message for details and consult LinkedIn API documentation.

Links and References

Discussion