Zapier Natural Language Actions
Deprecated This API will be sunset on 2023-11-17: https://nla.zapier.com/start/
Zapier Natural Language Actions gives you access to the 5k+ apps, 20k+ actions on Zapier's platform through a natural language API interface.
NLA supports apps like
Gmail
,Salesforce
,Trello
,Slack
,Asana
,HubSpot
,Google Sheets
,Microsoft Teams
, and thousands more apps: https://zapier.com/appsZapier NLA
handles ALL the underlying API auth and translation from natural language --> underlying API call --> return simplified output for LLMs. The key idea is you, or your users, expose a set of actions via an oauth-like setup window, which you can then query and execute via a REST API.
NLA offers both API Key and OAuth for signing NLA API requests.
-
Server-side (API Key): for quickly getting started, testing, and production scenarios where LangChain will only use actions exposed in the developer's Zapier account (and will use the developer's connected accounts on Zapier.com)
-
User-facing (Oauth): for production scenarios where you are deploying an end-user facing application and LangChain needs access to end-user's exposed actions and connected accounts on Zapier.com
This quick start focus mostly on the server-side use case for brevity. Jump to Example Using OAuth Access Token to see a short example how to set up Zapier for user-facing situations. Review full docs for full user-facing oauth developer support.
This example goes over how to use the Zapier integration with a SimpleSequentialChain
, then an Agent
.
In code, below:
import os
# get from https://platform.openai.com/
os.environ["OPENAI_API_KEY"] = os.environ.get("OPENAI_API_KEY", "")
# get from https://nla.zapier.com/docs/authentication/ after logging in):
os.environ["ZAPIER_NLA_API_KEY"] = os.environ.get("ZAPIER_NLA_API_KEY", "")