Question

How to set up Zapier to find events on my Google Calendar via OpenAI Assistant ?

  • 6 December 2023
  • 8 replies
  • 232 views

Userlevel 1

Hi everybody ! Is there a way to set up OpenAI Assistant to be able to talk to my Google Calendar to get my today’s events ? I see it can be done in ChatGPT GPTs, but is there a way to do the same with Assistants ?

My desired flow: create an Assistant via OpenAI API, connect my Google Calendar to it, then start asking questions about current events.

If it is possible, could you plz share how to do that ?


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

8 replies

Userlevel 3
Badge +2

@AndrewAvo I think there is already a GPT built by Zapier team and it was featured on the Open AI Dev Day.

Something Like Calendar GPT

Userlevel 7
Badge +14

Hi @AndrewAvo 

Good question.

More info about Zapier AI Actions: https://actions.zapier.com/

Userlevel 1

Thanks for your replies @Troy Tessalone @communitymember 

I checked the docs from there https://actions.zapier.com/, but I couldn’t set up an assistant to work with calendar. I’ve seen that there is a GPT built by Zapier team, but i’m specifically interested in OpenAI’s AssistantsAPI, like whether it is possible to do the same as GPT does, but with Assistant created via AssistantsAPI.

Is the only option to do this, avoiding ChatGPT GPTs,` a langchain/llama_index NLA ? Or i am missing something ?

Thanks in advance ! 

Userlevel 7
Badge +14

@AndrewAvo 

The Zap action for ChatGPT Create Assistant doesn’t have options for Functions, but the OpenAI Assistant builder does.

Your Assistant can be used in the Zap action: ChatGPT - Conversation with Assistant

So it may be possible to configure the function in ChatGPT, then use the Assistant in a Zap, and have the configured function work. (tbd)

 

 

 

 

Userlevel 1

@Troy Tessalone i have something working on LangChain using this code:
 

from langchain.agents import AgentType, initialize_agent
from langchain.agents.agent_toolkits import ZapierToolkit
from langchain.llms import OpenAI
from langchain.utilities.zapier import ZapierNLAWrapper

llm = OpenAI(temperature=0)
zapier = ZapierNLAWrapper()
toolkit = ZapierToolkit.from_zapier_nla_wrapper(zapier)
agent = initialize_agent(
    toolkit.get_tools(), llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True
)

agent.run(
    "Which events do i have in my calendar ?"
)



In order to do that i had to revert langchain and openai packages to the versions when they haven’t had this deprecated. So the only question i have now is what exactly is deprecated ? :) Since older version of langchain can do the above, Zapier still allows such functionality apparently. I haven’t had time to scrutinize how this ZapierToolkit works on a deeper level, but what are your thoughts about having this functionality adapted to work with latest langhchain and openai packages ? Is it feasible/possible in your opinion ?


 

Userlevel 7
Badge +14

@Reid 

Userlevel 3
Badge +1

@AndrewAvo We deprecated OAuth support for external developers so you’d need to ensure you’re using the mode with the API Key and generating your API key here. I’m not sure what you mean about adapting the ZapierToolkit. I do know it’s an open project so if you think there’s something you want to contribute to have it work better please feel free to do so! Let me know if you’ve got some further questions here or something I can dig into more. I know we can do better for our LangChain stuff. 

Userlevel 1

@Reid @Troy Tessalone i guess that’s how things are done now https://nla.zapier.com/docs/using-the-api. I somehow missed this API. I think it’ll solve my problem. Thank you all for support !