The @zapier/ai-actions-react
package is still in development!
If you want to check it out, please contact us@zapier/ai-actions-react
library provides utilities to make it easy to interact with AI Actions from a React application.
Installation
To install the library, run:Quick start
Get your API Key here Render theAiActionsProvider
at the root of your application, or around any components that need to interact with AI Actions.
You can pass the API key as a prop to the provider component, or you can get an OAuth token. See the Authentication guide for more information.
If you’re using a framework like Next.js, the
AiActionsProvider
and the
components rendered as children of it need to be rendered client-side.This can be done by putting "use client";
at the top of the file that uses AiActionsProvider
.ActionList
component to list the actions that are available to the user: