Authentication header change if there is a Date with Todoist Webhook

Hello n8n community,

I’m facing an issue with the Webhook authentication in Todoist. I have been using Authenticating Todoist Webhook Requests post from San. The below node works perfect with Todoist task where there is no date in the Task.

If due date is mentionned into the task then I get in the Node “Request is authentic” different values resulting in a routing to a false branch:

image

I guess that the due date is changing the header of the authentication? and then it fails to authenticate the webhook request.

Thanks in advance for your help on this!

Philippe

  • n8n version: 1.22.19
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

Hi @Philippe, I am not familiar with the cryptography used here or with Todoist in general. But if the due date is causing the problem, perhaps you can simply remove the field from the webhook for the purposes of calculating your hash? You can delete a property from a JSON object using the delete operator.

So if you JSON looks like this

{
  "body": {
    "foo": "abc",
    "bar": "def"
  }
}

You could delete the foo property from it like so:

Hello @MutedJam,
Many thanks for your help. I think it maybe a good track.
I have made some tests deleting everything inside body.event_data.due.date. It is not working as I think it gives a empty object instead of Null
Instead of delete I should then try modifying the item?

Thanks again!

Philippe

So you’re looking to set a value to the JavaScript null? This could be done by using $input.item.json.body.foo = null instead of the delete operator.

For example:

Thanks a lot!
That made the job!

This is not solving the issue with the authentication anyway.
I just thought I should try without the nodes “Webhook Authenticator” and “Request is authetic” and I seem to receive the information.
Maybe I have tried to solve an issue where there was… No issue!!! :sweat_smile:

Many thanks again for your help

1 Like

Well, I am very glad to hear you got it working in the end, thanks for confirming! :smiley:

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