Advanced guides

Integrating with Zapier

Integrating GPTBricks with Zapier

Zapier is a tool that allows you to connect and automate tasks between various web applications. In this guide, we will show you how to integrate GPTBricks with Zapier, enabling you to automate the process of sending an email with Gmail based on the prompts provided to your Brick.

Step 1: Creating a Zap

Zapier automations, called Zaps, start with a trigger and end with an action. In this case, our trigger will be the parameters received by our Brick (recipient_address, subject, content), and the action will be sending an email with Gmail.

  1. Log in to your Zapier account and click on "Make a Zap".
  2. For the trigger, select "Webhooks by Zapier" and choose the "Catch Hook" event. This will receive the data from your Brick.
  3. Add as field (recipient_address, subject, content)
  4. Zapier will provide you with a custom webhook URL. Make note of this URL as you will need it in the next step.

Step 2: Setting up the API Component in GPTBricks

In GPTBricks, we will set up an API component to send a GET request to the Zapier webhook URL, passing the parameters extracted from the prompt (recipient_address, subject, content).

  1. In GPTBricks, select your Brick and go to the API settings.
  2. Add a new API and set the method to GET.
  3. For the API endpoint URL, enter the webhook URL provided by Zapier.
  4. In the Parameters section, map the API parameters to the corresponding prompt parameters.

Step 3: Setting up the Gmail Action in Zapier

Back in Zapier, we will set up the action that sends an email with Gmail.

  1. For the action, select "Gmail" and choose the "Send Email" event.
  2. Connect your Gmail account to Zapier.
  3. In the "To" field, select the recipient_address from the dropdown menu. This will populate with the data received from your Brick.
  4. Do the same for the "Subject" and "Body" fields, selecting subject and content respectively.

That's it! Now, each time your Brick receives a prompt, it will trigger the Zap, which will send an email with Gmail using the data from the prompt.

Note

Make sure to test your Zap and Brick to ensure that the integration is working correctly.

Zappier Bricks Example

Previous
Deploy Your Bricks