Hi! I am trying to create a simple web app that lets users type in text and add files and generate output using OpenAI’s API. I am trying to use Appsmith/Openblocks for this front end and use n8n to handle everything else. The sample layout is given below:
Here, I have tried creating a webhook node to accept the inputs provided by the users. Whatever they type in the text field, and the uploaded document is received without any problems, and the workflow starts running.
Now, I need to send the output of the last node back to the application. I’ve tried creating a ‘Respond to Webhook’ node, but not quite able to figure out how it functions and everything. How to send the response back to an application after a few seconds (for the workflow to run) and use the last node’s output in the response?
Or is there any other way to do this? Any help would be appreciated.
Hi @Jayavel - would you be able to share the workflow that you’re using? You can copy and paste from the editor and paste it here, with three backticks (```) above and below. That will let us see how your current workflow is set up, and we can try to troubleshoot from there!
Sure, @EmeraldHerald. Since it was having some imp data, I didn’t include it. I have masked the data now; you can see the workflow below.
Also, this is how I have configured the application’s POST request:
Authentication - None
Headers -
content-type - multipart/form-data
Body - Attaching image below
What you’d need to do here is add the respond to webhook node, and tell the webhook node to use that for the response. The application you are building should then wait before getting the response. You would need to add the respond to webhook node three times – one for each output.
This is not working, and the only response received in the app is " [] "
If I don’t use the respond to webhook node, the app shows the message ‘Workflow has started’.
That looks like it should work to me, there is data in the output so should be ok. How long is the workflow taking to run and is your app waiting for the response or just moving on quickly? Could be worth doing a test with CURL or Postman to see what happens.
The workflow completes in approximately 6 seconds. If there are no files attached to it, the time is even less. The app is configured to receive responses and display them in the Output section.
I will try checking with Postman as you suggested.