Question

Issue with OpenAI Webhook Trigger in a Zap

  • 3 October 2023
  • 3 replies
  • 88 views

Hello, I'm trying to set up a Zap that triggers based on a Slack message and sends a request to OpenAI's GPT model to get a response, which should then be sent back to Slack.

While the trigger from Slack works as expected, the OpenAI model isn't providing the desired conversational response. Instead of answering the question based on the role specified (e.g., CFO of a company), it is giving a generic answer or sometimes unrelated answers.

Steps Taken:

  • Modified the webhook body to specify the role and context better.
  • Tested different conversation setups with the OpenAI API.
  • Adjusted the sequence of user messages in the payload.

Has anyone faced a similar issue or have suggestions on how to get the desired conversational output from OpenAI when using it in a Zap? Any insights or guidance would be greatly appreciated.


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

3 replies

Userlevel 7
Badge +14

Hi @Jusho 

Good question.

To help us have more context, post screenshots with how your Zap steps are configured.

 

Hi @Troy Tessalone,

Thank you for getting back to me. I appreciate your willingness to assist.

To give you a clearer picture, I've attached screenshots of my current Zap configuration. The main challenge I'm facing is with the webhook setup to connect to OpenAI's ChatGPT. I've been trying to send structured conversations as input to the model and get a response back, which then would be processed in subsequent steps of the Zap.

The body of my POST request in the webhook configuration is as follows:

jsonCopy code

{ "model": "gpt-3.5-turbo", "messages": [ {"role": "system", "content": "You are the CFO of company A. Actively provide financial insights, analysis, and recommendations based on queries. Do not reiterate your role or ask for the nature of the question again."}, {"role": "user", "content": "{{PreviousInteraction1}}"}, {"role": "user", "content": "{{PreviousInteraction2}}"}, {"role": "user", "content": "{{PreviousInteraction3}}"}, {"role": "user", "content": "{{TextFromSlackTrigger}}"} ] }

I've ensured that the placeholders are replaced with actual content from previous steps in the Zap, but I'm still running into issues.

Attached are the screenshots of:

  • The overall Zap flow.
  • The Webhook configuration, especially the POST data.
  • Error messages, if any, that I've been encountering.
  • Other relevant configurations that might give insight into the issue.

I'd be grateful for any guidance or suggestions on what I might be missing or what could be improved.

Thanks in advance!

 

Userlevel 7
Badge +14

@Jusho 

Have you tried using the Zap apps for these: