How to use fastapi to call the built workflow through api calls

I want to make n8n workflow an AI service, but I don’t know how to call it using code. The public API can only do some additions, deletions, modifications and queries, which cannot meet my needs.

hello @wang_xueyi

You can’t directly call it. There is no such an API method. But, you can call a webhook, which may trigger other workflows.

Hey @wang_xueyi,

Not Sure, but hope this video by @oskar will help you in this case:

Once you’ve created the proper API for your n8n workflow, you can simply call it in your code…just like we do make call to the other APIs.

1 Like