Skip to main content
Question

Passing url data in Webhook - Connecting Notion to Perplexity

  • 14 June 2024
  • 0 replies
  • 42 views

  1. I am building a Zap to connect Notion with Perplexity.
  2. I am extracting data from my Notion database - point of interest here is a URL from the db. 
  3. when I am passing the url from notion to webhook, i get the following error

The error e"At body -> 1: JSON decode error"] (HTTP Status Code: 400) indicates that the JSON payload being sent in the WebHookAPI step is not properly formatted. This often happens when there are issues with the structure or content of the JSON data. In your case, it seems like the placeholder {{166587131__properties__URL}} is not being correctly replaced with the actual URL from the previous step.

To resolve this, ensure that the placeholder {{166587131__properties__URL}} is correctly mapped to the output from the previous NotionCLIAPI step. You can do this by editing the WebHookAPI step and using the "Insert Data" button to select the correct field from the previous step's output. This will ensure that the URL is properly inserted into the JSON payload. Here is an example of how the corrected JSON data might look:

This is how my webhook looks like
 

 

When I am passing the url directly it works fine. Something like

 

I tried using the format block and use the find url formatting and tried passing that. Still it gives the same error.

 

Any help will be appreciated.

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.