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:
- You have a Logic App account and have created a new Logic App.
- You have a trigger set up to trigger the Logic App (e.g., when a new email arrives).
- 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
- In your Logic App, click on the "Add an action" button.
- Search for "Attach file" and select the "Attach file" action.
- 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
- Click on the "Add an action" button again.
- Search for "Email" and select the "Send an email" action.
- 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
- Drag the "Attach file" action and the "Send an email" action into the same workflow.
- Connect the "Attach file" action to the "Send an email" action by dragging a line between them.
Step 4: Configure the email attachment
- In the "Attach file" action, select the image file you want to attach.
- In the "Send an email" action, click on the "Attachments" tab.
- Click on the "Add attachment" button and select the image file from the "Attach file" action.
Step 5: Test the Logic App
- Trigger the Logic App by sending an email to the trigger email address.
- 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.