Django API Post Request Send to n8n and execute nodes based on data

Hi. I have made a simple Django API for post request. I want a functionality in which when I send a post request from rapidapi or postman or swagger through the Django, n8n should fetch the data and then check various conditions based on that data. What should I do?

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):Doccker
  • **Operating system:Windows

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

hello @Nishan_Khatiwada

You can use the n8n Webhook trigger for that

I used webhook, but I am not getting any data when I send a post request from Django api…suppose I need age values for executing other nodes (based on some conditions), I am not getting it through webhook, if I send POST from api. I am not receiving any data in body when I hit api from rapidapi.

The webhook works well with POST requests

I suppose the issue is somewhere with the overall setup (wrong dns/url, blocked port, or something else)

It worked once I changed the url to send the post request to the url of the n8n webhook…I was thinking is there any way if we send post request in the url endpoint we made in our django app and that eventually be transferred to the n8n…

Ehm… how that should work?

There is no magic between services. If you are calling one service from within another, n8n won’t know about that.
If you want the n8n to know that there is something it should work with, your design must include the n8n.

E.g. you calls the n8n webhook from Postman/curl/whatever, then n8n process the payload according to the body and your workflow design and then it fetches something from the Django API, and finally send the response from the Django back to the client.

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