Linkedin Audience Match is Throwing an Error - 400: Action batch_create is forbidden if field /type is not set to COMPANY


Linkedin Matched Audience app is throwing an error while syncing with google sheet.
https://www.make.com/en/integrations/linkedin-matched-audiences

When I debug, I found out make.com is using 2022 version API which was depricated by LinkedIn.

How can we resolve this or what could be the workaround?

Welcome to the Make community!

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module and select “Download output bundles”.
Screenshot_2023-10-06_141025

A.

Save the bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading it here will look like this:

bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted output bundle in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here.

If you think the API version deprecation is an error, please contact Make support. You can reach them at the link below:

For quicker assistance with bugs and technical problems, you may want to contact support directly. They respond very quickly and update you frequently on the status of their investigation.

Hope you can share the resolution with us if you manage to solve this problem!

2 Likes

Hey @Pankit_Gami
Welcome to the Make Community

Yo can do it by Make an API Call or Make a HTTP Request with updated API request.

Thanks,
Sachin Shrivastava
growwstacks.com

2 Likes

Can you provide an example to demonstrate that this method will work?

2 Likes

Hi Sachin,

There is no option for make an API Call.

Can I know more about your problem?
What do you want to achieve and which module you are using?

2 Likes

Hello,

I have an identical problem. It is easily reproducible with official scenario templates “X => LinkedIn Matched Audiences” (X being Google Sheets, Microsoft 365 etc.) as well as with any custom scenario.

Blueprint:
blueprint (4).json (19.6 KB)

Screenshots:

Bundles:
Google Sheet output bundle

[
    {
        "0": "make1@example.com",
        "1": "Aube",
        "__ROW_NUMBER__": 1,
        "__SPREADSHEET_ID__": "1uGIy08Z0dBDg-GcazCeZrIN6p74tO6jboD1iMGrlMIE",
        "__SHEET__": "Sheet1"
    }
]

LinkedIn input bundle

[
    {
        "users": [
            {
                "userIds": [
                    {
                        "idType": "SHA256_EMAIL",
                        "idValue": "make1@example.com"
                    }
                ]
            }
        ],
        "dmpSegmentId": 17650674
    }
]

Application: LinkedIn Matched Audiences
Modules:

  • Add Companies, Remove Companies (identical error)
  • Add Users, Remove Users (similar error but saying /type is not USER)

Chrome Debug extension does not help much, it indicates that the following request fails:

{
    "response": {
        "status": 400,
        "headers": {
            "content-type": "application/json",
            "x-restli-error-response": "true",
            "x-restli-protocol-version": "2.0.0",
            "date": "Wed, 21 Feb 2024 12:23:43 GMT",
            "x-li-fabric": "prod-ltx1",
            "transfer-encoding": "chunked",
            "x-li-source-fabric": "prod-lva1",
            "x-li-pop": "prod-lva1-x",
            "x-li-proto": "http/1.1",
            "x-li-uuid": "AAYR42XO32FCcQ2c07QIug==",
            "set-cookie": [
                "bcookie=\"v=2&460557e7-e4c1-4209-8e90-e37c6bc6e104\"; Domain=.linkedin.com; Expires=Thu, 20-Feb-2025 12:23:43 GMT; Path=/; Secure; SameSite=None",
                "li_gc=MTswOzE3MDg1MTgyMjM7MjswMjETmfL2FFYPJQTffS6L8QnD3mrgShgdZeW36l0MdrMQFg==; Domain=.linkedin.com; Expires=Mon, 19 Aug 2024 12:23:43 GMT; Path=/; Secure; SameSite=None",
                "lidc=\"b=TB73:s=T:r=T:a=T:p=T:g=3703:u=1497:x=1:i=1708518223:t=1708604478:v=2:sig=AQE6X1ySh1uRBzSsGV5Voh61v6JRqZf7\""
            ],
            "x-li-route-key": "\"b=TB73:s=T:r=T:a=T:p=T:g=3703:u=1497:x=1:i=1708518223:t=1708604478:v=2:sig=AQE6X1ySh1uRBzSsGV5Voh61v6JRqZf7\""
        },
        "body": {
            "serviceErrorCode": 10007,
            "message": "Validation failed because [{reason=ACTION_CONDITIONALLY_NOT_ALLOWED, field=/type, batchIndex=0, type=ACTION_NOT_ALLOWED, message=Action batch_create is forbidden if field /type is not set to USER, parameters={field=/type, action=batch_create, value=USER}}]",
            "status": 400
        }
    },
    "request": {
        "url": "https://api.linkedin.com/rest/dmpSegments/17650674/users",
        "headers": {
            "user-agent": "Make/production",
            "authorization": "***",
            "x-restli-method": "BATCH_CREATE",
            "linkedin-version": "202302",
            "x-restli-protocol-version": "2.0.0",
            "content-type": "application/json"
        },
        "method": "POST",
        "body": {
            "elements": [
                {
                    "userIds": [
                        {
                            "idType": "SHA256_EMAIL",
                            "idValue": "ddd5e46a29e45039d3c73df55996dcdf219add19f76d56535f2a5d65b4936ae6"
                        }
                    ],
                    "action": "ADD"
                }
            ]
        }
    }
}

Indeed, Request Body has no “type” parameter in the root level

I found no way to force the /type parameter in request, I don’t think it is possible, especially as there seems to be a formatting Remote Procedure in the module that formats the bundle, converts emails to SHA256 etc.

Is something broken? LinkedIn is changing a lot their APIs especially Matching Audiences, though the error does not seem to be related to this? Anyone found a workaround?

Have a nice day

Edit: it seems that the problem comes from the LinkedIn audience type. Audiences created from Make are of type “USER” in Make’s search result (“Marked automation” in LinkedIn), and audiences created by uploading a CSV list are of type “USER_LIST_UPLOAD” (“Contact list” in LinkedIn). This is probably where the error abount type “USER” comes from… Is it not possible to add contacts to CSV-originating audiences?

Hi @Dmyt

I had a week long discussion with their technical team. They confirmed that this is an issue in Make and they won’t resolve it anytime soon.

This is not on their priority, they won’t be able to resolve it.

Attaching the screenshot for your reference.

1 Like

Hi, thank you very much for your efforts in the matter.

Meanwhile I worked it around by extending the scenario to create audience from Make and then fill it with “bulks” by mapping directly the Users parameter. This allows to spend much less actions and to not need initial CSV importing. At least for our case it works.

Yours sincerely
D

2 Likes