The workflow's code 451

Hello, I keep encountering a token error (code 451: Your request is invalid or could not be processed by the service) when trying to connect the local version of n8n to Airtable in order to create a record. I have already tried multiple solutions and correctly entered the scopes and access settings in Airtable’s Personal Access Tokens configuration.
At this point, I’m not sure what else to do. Can anyone help me with my problem?

NodeJS version:20.19.6

n8n Version: 1.122.5

Hi,

Please share a bit more information with me. What does the Airtable node look like. Are you able to see the bases? Here’s mine:

If you change the base pull down to “From List”, do you see some of your bases? The same for “Table”. This is one way to know you have a good connection to Airtable.

Khem

1 Like

I am getting this error in the base and table sections because it is not connecting to airtable at all.sections.

And in the airtable Personal access token section, all settings have been applied correctly.

Is there anything else needed to connect to Airtable recently?

Hey @morabi_amin !

In the image everything looks ok…

Only one thing, be sure the workspace you selected actually contains the Airtable base you’re trying to reach from n8n…

Or maybe try recreate the token credential in n8n and select directly the base, and not the workspace…

Cheers!

P.S usually code 4xx are related to credentials issues. :slight_smile:

I’m sure base is correct. I’ve done this several times in the past 24 hours and even uninstalling and reinstalling node and n8n made no difference.

1 Like

Did you tried to create new Personal Token?

Worth giving a try as well… Since in Airtable api docs theres no 451 error (they claim 4xx errors related to users), and neither in n8n lol… so indeed strange.

1 Like

Yes, I have changed the tokens several times so far and it is strange to me that this error code 451 was not in the codes section.

As you can see, in my case it works…

Maybe can you try put the base id(and type your baseid) instead from list?

1 Like

I was unsuccessful. It is because of the Access Tokens that this error is shown.

Actually your problem is the credentials.

And obviously the workflow won’t work or give error since your credentials are with red and not green.

After you have green credentials, you can go to your workflow and add any nodes you want.

Try first to connect, and establish to set the credentials!

P.S first step go and create the credentials, once is success, go to your workflow.

P.P.S the base ID you entered anyway in your filed is wrong as well(and i suggested that just to confirm that connection is good as test).

2 Likes

Thank you for your response. I am still trying to solve my problem.:worried:

What do you see when you click on “Retry” button in credentials?

Same error after retrying.But regarding the base ID, I had already created a workflow in Airtable with the same name, so I entered it.

I suggest to delete the PAToken from Airtable, delete the credentials in n8n, stop/start n8n.

Then go in Airtable and be ssure you follow this rules.:

1. Token, you use the token string that was displayed immediately after you created it? (It is only shown once.)

2. Scopes, id you explicitly check the boxes for all three required scopes: data.records:read, data.records:write, and schema.bases:read?

3. Resource/Access Link (CRITICAL) Under the Access section of your PAT, did you explicitly select the Workspace(s) or Base(s) that n8n needs to connect to?

Then go back to n8n, the credentials tab , create new Airtable credentials, use that newly copied token, connect it, it should be green as successful connection.

Then go and open a workflow and add a new node and set up with the new credentials.

If even this is not working, be sure your PC can reach external services with a ping or curl command to any address like Google.

Cheers!

1 Like

Thanks for your advice. I’ve tried all these things many times. Now I’ve come to the conclusion that the problem is probably with the computer… like another program that’s taking up local space or antivirus, etc. I don’t know exactly. I’m looking into other things. I hope I’ll get a result.

Hi,

@morabi_amin , I think you’re quite right to say that something external to n8n is in play. Le’t’s see what happens outside of n8n. On the machine where your local n8n lives, try this for me. Are you seeing any error messages?

curl -v “https://api.airtable.com/v0/meta/bases” -H “Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN”

or (if curl is not available):

wget -qO- --header=“Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN” “https://api.airtable.com/v0/meta/bases”

Replace YOUR_PERSONAL_ACCESS_TOKEN with your pat token.

Make sure you do this from where the local n8n instance lives.

Khem

Hey @morabi_amin !

If your other services are working, then it means that definitly you are doing something wrong on the Airtable side when you are configuring the credentials.

We already did what we could on our side…