Learn how to automate image generation using Leonardo AI from Google Sheets and save images to Google Drive with Pabbly Connect in this step-by-step tutorial.

Watch Step By Step Video Tutorial Below


1. Setting Up Pabbly Connect for Image Generation

To generate images using Leonardo AI from Google Sheets, we first need to set up Pabbly Connect. Start by signing up for a free account on the Pabbly Connect dashboard. This platform will allow automation between Google Sheets, Leonardo AI, and Google Drive.

Once you are logged into Pabbly Connect, click on the ‘Create Workflow’ button. Name your workflow something like ‘Google Sheets to Leonardo AI to Google Drive’. This name helps identify the automation process clearly.


2. Connecting Google Sheets with Pabbly Connect

The next step is to connect your Google Sheets with Pabbly Connect. In the workflow, click on the trigger window and choose Google Sheets from the app options. Select the trigger event as ‘New or Updated Spreadsheet Row’.

  • Select the Google Sheets account you want to connect.
  • Copy the webhook URL provided by Pabbly Connect.
  • Go to your Google Sheets, click on Extensions, then Add-ons, and select Get Add-ons.
  • Search for Pabbly Connect Webhooks and install it.

After installation, refresh Google Sheets and set up the initial configuration by selecting the sheet and pasting the copied webhook URL. Choose the trigger column where new prompts will be added, and test the connection to ensure it works.


3. Sending Image Prompts to Leonardo AI

After setting up Google Sheets, we will now send the image prompt to Leonardo AI using Pabbly Connect. In the action step, choose Leonardo AI as the app and select the action event as ‘Create Image’. Connect your Leonardo AI account by entering the API key found in your Leonardo AI account settings.

Map the image prompt received from Google Sheets to the corresponding field in Leonardo AI. You can also select the image generation model, set dimensions, and specify how many images to generate. For this tutorial, we will generate one image based on the prompt.


4. Uploading Generated Images to Google Drive

Once the image is generated, the next step is to upload it to Google Drive using Pabbly Connect. In the action step, choose Google Drive and select the action event as ‘Upload File’. Connect your Google Drive account and specify the URL of the generated image received from Leonardo AI.

  • Map the folder ID where the image will be uploaded.
  • Provide a file name and extension (e.g., .jpg).

After mapping all required fields, click on ‘Save and Send Test Request’ to upload the image. Confirm that the image appears in your specified Google Drive folder.


The final step is to update the Google Sheet with the link to the uploaded image. In Pabbly Connect, add a new action step, select Google Sheets, and choose ‘Update Cell Value’ as the action event. Connect your Google Sheets account and specify the spreadsheet and sheet name.

Map the row number dynamically to update the correct row where the prompt was entered. Finally, enter the image link received from Google Drive to update the corresponding cell in the sheet. Click ‘Save and Send Test Request’ to complete the process.


Conclusion

This tutorial demonstrates how to utilize Pabbly Connect to automate the process of generating images using Leonardo AI from Google Sheets and saving them to Google Drive. By following these steps, you can streamline your workflow and efficiently manage image generation and storage.

Ensure you check out Pabbly Connect to create business automation workflows and reduce manual tasks. Pabbly Connect currently offer integration with 2,000+ applications.