How to attach images with mail by logic app

To attach images with an email using a Logic App, you can follow these steps:

Prerequisites:

  1. You have a Logic App account and have created a new Logic App.
  2. You have a trigger set up to trigger the Logic App (e.g., when a new email arrives).
  3. You have a connection to an email account (e.g., Outlook, Gmail, etc.) set up in your Logic App.

Step 1: Add an "Attach file" action

  1. In your Logic App, click on the "Add an action" button.
  2. Search for "Attach file" and select the "Attach file" action.
  3. Configure the "Attach file" action by selecting the file type (e.g., image) and the file location (e.g., a blob storage container).

Step 2: Add an "Email" action

  1. Click on the "Add an action" button again.
  2. Search for "Email" and select the "Send an email" action.
  3. Configure the "Send an email" action by selecting the email account you set up earlier and entering the recipient's email address.

Step 3: Combine the actions

  1. Drag the "Attach file" action and the "Send an email" action into the same workflow.
  2. Connect the "Attach file" action to the "Send an email" action by dragging a line between them.

Step 4: Configure the email attachment

  1. In the "Attach file" action, select the image file you want to attach.
  2. In the "Send an email" action, click on the "Attachments" tab.
  3. Click on the "Add attachment" button and select the image file from the "Attach file" action.

Step 5: Test the Logic App

  1. Trigger the Logic App by sending an email to the trigger email address.
  2. Verify that the email is sent with the attached image.

Here's an example of what the Logic App workflow might look like:

Trigger: New email arrives
Action: Attach file (image)
  - File type: image
  - File location: blob storage container
Action: Send an email
  - Email account: Outlook
  - Recipient's email address: [recipient's email address]
  - Attachments: [image file]

By following these steps, you can attach images with an email using a Logic App.