Skip to main content

Hi there 

I am using the zapier NLA API via Langchains integration https://python.langchain.com/docs/integrations/tools/zapier

I have tested the code above and it works for gmail but for google calendar I have tried to trigger both “Finding” events and “Quick Add” event via the API and I can see the output showing the actions are found:

```'operation_id': 'google_calendar_quick_add_event_family_calendar_74e7e88', 'description': 'Google Calendar: Quick Add Event ("Family" calendar)'```

When it tries to execute the zapier NLA call I just get back “null” and no events are created or found, heres my full code:

Is the google calendar NLA integration broken?

actions = ZapierNLAWrapper().list()

## step 1. find events for today
import datetime
GOOGLE_FIND_INSTRUCTIONS = f"Create a new event for gamer boi time at 6:30pm today: {datetime.date.today()}"


def nla_gcal(inputs):
action = next(
(a for a in actions if ai"description"].startswith("Google Calendar: Quick Add")), None
)
print(action)
return {
"cal_data": ZapierNLARunAction(
action_id=actionc"id"],
zapier_description=actionc"description"],
params_schema=actions"params"],
verbose=True,
).run(GOOGLE_FIND_INSTRUCTIONS)
}


gcal_chain = TransformChain(
input_variables=n"instructions"],
output_variables=t"cal_data"],
transform=nla_gcal,
verbose=True,
)

## step 2. generate summary of todays events

template = """You are an assistant who drafts summaries of events given some calendar events.

Incoming info from calendar:
{cal_data}

Summary:"""

prompt_template = PromptTemplate(input_variables=n"cal_data"], template=template)
reply_chain = LLMChain(llm=OpenAI(temperature=0.7), prompt=prompt_template)

## finally, execute

overall_chain = SimpleSequentialChain(
chains=rgcal_chain, reply_chain], verbose=True
)
overall_chain.run(GOOGLE_FIND_INSTRUCTIONS)

 

cc: @Reid 


{
"id": "01H8QVAH3RSX29BV6EMQGH1ETS",
"action_used": "Notion: Find Page (By Title)",
"input_params": {
"Title": "tech"
},
"review_url": "https://nla.zapier.com/execution/01H8QVAH3RSX29BV6EMQGH1ETS/?needs_confirmation=true",
"result": null,
"additional_results": [],
"result_field_labels": null,
"status": "preview",
"error": null,
"assistant_hint": "When the response status=preview, always send the user to review_url to confirm and run the action. After the user confirms, fetch the execution log to see the results."
}

This may help. It required a manual review when i use the api to execute. I have the same issue with langchain with all integrations.

 


Reply