Articles on: Zapier Templates

ChatGPT: enable/disable automatically

In TimelinesAI configured ChatGPT integration is enabled automatically for all new incoming chats. New incoming messages in existing chats or chats with the new outgoing messages will have ChatGPT disabled by default ( unless enabled manually).

Examples in this workflow explain how you can enable ( or disable) ChatGPT automatically for existing chats with new incoming messages or any chat with a new automatic outgoing message.

Keep in mind that messages generated by ChatGPT count toward your TimelinesAI monthly quota limit

Table of contacts:

To enable/disable chatGPT when you send a new automatic outgoing message
To enable/disable ChatGPT when new messages are received in existing chats
Tip: using filters to determine when ChatGPT should be disabled OR enabled

To enable/disable chatGPT when you send a new automatic outgoing message



Open the existing flow at Zapier where you are sending your automatic message. Check the output of your message sending module. It must contact the chatID. For example: .
Add a new step after the message sending module: search and select Webhooks by Zapier > then select Custom Request
Action configurations:
Method: PATCH
URL: https://app.timelines.ai/integrations/api/chats/XXX, where XXX is to be replaced by the chatID from the payload. Delete XXX and select your chatID instead

Data Pass-Through: select False
Data: add
{
"chatgpt_autoresponse_enabled": true
}

If set to "true" ChatGPT will be enabled, if set to "false" ChatGPT will be disabled

Unflatten: select Yes
Basic Auth: leave empty
Headers: add Authorization Bearer XXX, where XXX is to be replaced by your own token from https://app.timelines.ai/integrations/api/

Save your changes and test the step. After execution the chat where new outgoing message is being sent will have ChatGPT enabled ( or disabled) automatically.

To enable/disable ChatGPT when new messages are received in existing chats


Create a new zap .
Trigger: search and select TimelinesAI > then select "New Received Message".
Connection: establish connection with your TimelinesAI connection using the token from https://app.timelines.ai/integrations/zapier/
Test: test the trigger by sending yourself a test WhatsApp message or wait for an actual message to arrive
Add a new step after the New Received Message module : search and select Webhooks by Zapier > then select Custom Request
Action configurations:
Method: PATCH
URL: https://app.timelines.ai/integrations/api/chats/XXX, where XXX is to be replaced by the chatID from the payload. Delete XXX and select your chatID instead
Data Pass-Through: select False
Data: add
{
"chatgpt_autoresponse_enabled": true
}

If set to "true" ChatGPT will be enabled, if set to "false" ChatGPT will be disabled

Unflatten: select Yes
Basic Auth: leave empty
Headers: add Authorization Bearer XXX, where XXX is to be replaced by your own token from https://app.timelines.ai/integrations/api/

Save your changes and test the step. After execution the chat where new incoming message was received will have ChatGPT enabled ( or disabled) automatically.

Tip: using filters to determine when ChatGPT should be disabled OR enabled



Regardless of your flow, it is recommended to use filters before the Custom Request module that enables ChatGPT. This allows to finetune and enable/disable ChatGPT only for some messages.

In case you are enabling ChatGPT: this will minimize the amount of chats with ChatGPT ON, which in turn can minimize spending of your OpenAI credits
In case you are disabling ChatGPT: this will make sure that the contact will not get irrelevant data from chatGPT. For example if earlier in the flow the contact has converted from a lead to a deal and you've sent them the welcome message > then you might want an agent to take care of the contact personally instead of chatGPT. Or if the deal value reaches certain point - you can filter only those and have chatGPT disabled only for them.

Another common filter type is by message keywords. If incoming/outgoing message sent/received earlier in the flow meets certain criteria ( ex: contains a certain phrase or a word) > only then continue with the flow and enable/disable ChatGPT:

Updated on: 19/02/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!