Step 1: Select Your Zapier Trigger and Initial Data Source. Begin by choosing the event that starts your automation, such as a new email in Gmail, a form submission in Typeform, or a new row in Zapier Tables. Ensure the trigger provides the text data you intend to process with an LLM.
Step 2: Understand LLMs and Craft Effective Prompts. Before adding an AI step, define your LLM's goal. Learn prompt engineering basics: be clear, concise, provide context, specify desired output format, and use examples if necessary. For instance, instead of 'Write a summary,' use 'Summarize the following article in three bullet points, focusing on key takeaways for a business audience.'
Step 3: Choose Your LLM Integration Method. Decide whether to use Zapier's native 'AI by Zapier' step or connect an external LLM provider. 'AI by Zapier' offers pre-built actions for common tasks like 'Summarize Text' or 'Generate Text.' For more control or specific models, connect directly to OpenAI (ChatGPT), Anthropic (Claude), or Google AI (Gemini) via their respective Zapier app integrations.
Step 4: Configure the LLM Step with Your Prompt. Add an 'Action' step to your Zap. If using 'AI by Zapier,' select the appropriate action (e.g., 'Summarize Text'). If using an external provider, select its app and an action like 'Send Prompt' or 'Create Chat Completion.' In the 'Prompt' field, input your carefully crafted prompt, dynamically mapping data from previous Zapier steps using the 'Insert Data' button (e.g., 'Summarize this article: {{Trigger Text}}'). Specify model parameters like temperature (creativity) and max tokens (output length).
Step 5: Map Input Data to Your LLM Prompt. Crucially, use data from your trigger or previous Zapier steps to populate your LLM prompt. This makes your AI dynamic. For example, if your trigger is a new email, map the 'Email Body' field into your prompt to have the LLM summarize that specific email.
Step 6: Structure AI Outputs for Downstream Actions. LLMs return raw text. To make this text actionable, you might need to structure it. For example, instruct the LLM to output JSON (e.g., 'Return the summary as a JSON object with keys 'title' and 'summary'.'). For simpler outputs, ensure the LLM's response is concise and directly usable. Use Zapier's 'Formatter by Zapier' step (Text - Split Text or Extract Pattern) if you need to parse specific parts of the LLM's unstructured text output.
Step 7: Utilize the LLM Output in Subsequent Zapier Actions. Once the LLM processes the input, its output becomes available as a data field for subsequent steps. Map this AI-generated content to actions like 'Create a new row in Google Sheets,' 'Send a message in Slack,' 'Draft an email in Gmail,' or 'Create a task in Asana.'
Step 8: Test Your Zap and Refine Prompts. Run test data through your Zap. Carefully review the LLM's output. If it's not meeting expectations, refine your prompt. Experiment with different wording, add more context, or adjust model parameters until the output is consistently accurate and useful. This iterative process is key to effective LLM integration.