cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ClarkyPA365
Level: Powered On

Adding Attachment (Image) to Email when already have a Concat Formula

Hi,

I'm wanting to send an email out with an image and some information.

I have a Concat formula already which details the information.  I

 

now want to add an attachment to the email that relates to the information. The Concat formula is 

 

Office365.SendEmail(
"Email address", (Receptiant email is included in original formula)
"Perimeter Check Issues",
Concat(Perimeterissue,
"Building: " & Building & Char(10) &
"Area: " & Title & Char(10) &
"Comments: " & Comments & Char(10),
"Issue: " & Issue & Char(10) & Char(10)
)
)

'Perimeterissue' is the name of my collection which also contains the image. 

 

The Collection is triggered by Clicking on the Camera function

 

Collect(
Perimeterissue,
{
Title: txtChecklistSpecificArea.Text,
Image: txtChecklistSpecificArea.Text & " .jpg",ContentBytes:Camera1.Photo,'@odata.type':"",
Hint: txtChecklistDescription.Text,
Building: drpSelectedBuilding.Selected.Result,
Issue: RadChecklist.Selected.Value,
Comments: txtChecklistComments.Text,
CheckedBy: txtCheckedBy.Text,
Date: txtDate.Text,
Time: txttime.Text
}
);
Reset(RadChecklist);
Reset(txtChecklistComments);

 

Any assistance would be grateful

1 ACCEPTED SOLUTION

Accepted Solutions
ClarkyPA365
Level: Powered On

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi 

Solved it.

I had a opening bracket before the Concat.  Doh!!!!!

Removed that and it works perfectly. 

Thanks for your help

View solution in original post

9 REPLIES 9
Dual Super User
Dual Super User

Re: Adding Attachment (Image) to Email when already have a Concat Formula

HI @ClarkyPA365 

 

Can you try to update your expressions as:
 
Collection Creation:
 
Collect(
Perimeterissue,
{
Title: txtChecklistSpecificArea.Text,
Name: txtChecklistSpecificArea.Text & " .jpg",ContentBytes:Camera1.Photo,'@odata.type':"",
Hint: txtChecklistDescription.Text,
Building: drpSelectedBuilding.Selected.Result,
Issue: RadChecklist.Selected.Value,
Comments: txtChecklistComments.Text,
CheckedBy: txtCheckedBy.Text,
Date: txtDate.Text,
Time: txttime.Text
}
);
Reset(RadChecklist);
Reset(txtChecklistComments);
 
Attachments in the outlook connector expects its columns to be Name and ContentBytes.
 
Send Email:
 
Office365.SendEmail(
"Email address", (Receptiant email is included in original formula)
"Perimeter Check Issues",
Concat(Perimeterissue,
"Building: " & Building & Char(10) &
"Area: " & Title & Char(10) &
"Comments: " & Comments & Char(10),
"Issue: " & Issue & Char(10) & Char(10)
),
{Attachments:ShowColumns(Perimeterissue,"Name","ContentBytes")}
)
 
 
This will add the attachments in your email. This supports more than 1 attachment based on the collection.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
ClarkyPA365
Level: Powered On

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi @yashag2255 

Thanks for your reply.

I've amended my formulas to the changes you have hi-lighted.

 

The send email formula is show red underlining

Office365.SendEmail(
"Email",
"Perimeter Check Issues",
(Concat(Perimeterissue,
"Building: " & Building & Char(10) &
"Area: " & Title & Char(10) &
"Comments: " & Comments & Char(10) &
"Issue: " & Issue & Char(10) & Char(10)
),
{Attachments:(Perimeterissue,"Name","ContentBytes")}
)

Where you have emoji and howcolumns what needs to be here? 

Dual Super User
Dual Super User

Re: Adding Attachment (Image) to Email when already have a Concat Formula

@ClarkyPA365 '

 

Can you try with this?

 
Collect(
Perimeterissue,
{
Title: txtChecklistSpecificArea.Text,
Name: txtChecklistSpecificArea.Text & " .jpg",ContentBytes:Camera1.Photo,'@odata.type':"",
Hint: txtChecklistDescription.Text,
Building: drpSelectedBuilding.Selected.Result,
Issue: RadChecklist.Selected.Value,
Comments: txtChecklistComments.Text,
CheckedBy: txtCheckedBy.Text,
Date: txtDate.Text,
Time: txttime.Text
}
);
Reset(RadChecklist);
Reset(txtChecklistComments);
 
Attachments in the outlook connector expects its columns to be Name and ContentBytes.
 
Send Email:
 
Office365.SendEmail(
"Email address", (Receptiant email is included in original formula)
"Perimeter Check Issues",
Concat(Perimeterissue,
"Building: " & Building & Char(10) &
"Area: " & Title & Char(10) &
"Comments: " & Comments & Char(10),
"Issue: " & Issue & Char(10) & Char(10)
),
{Attachments: ShowColumns(Perimeterissue,"Name","ContentBytes")}
)
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
ClarkyPA365
Level: Powered On

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi @yashag2255 

Thanks for that couldn't find a formula howcolumns.  Not sure why the emoji displays in the community form but not in the email I get???

I still seem to be getting an error against th last 'Comma' before the curly brace {Attachment........ 

 

Error Msg Unexpected characters. The formula contains 'ParenClose' where comma is expected.

Dual Super User
Dual Super User

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi @ClarkyPA365 

 

I think the error is occurring because of the body passed in email, there is a comma in between which might cause this issue. Can you try below expression:
 
Office365.SendEmail(
"Email address",
"Perimeter Check Issues",
Concat(Perimeterissue,
"Building: " & Building & Char(10) &
"Area: " & Title & Char(10) &
"Comments: " & Comments & Char(10) &
"Issue: " & Issue & Char(10) & Char(10)
),
{Attachments: ShowColumns(Perimeterissue,"Name","ContentBytes")}
)
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
ClarkyPA365
Level: Powered On

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi

 

Still getting the last comma underlined in red and the same error message?

 

Office365.SendEmail(
"Email",
"Perimeter Check Issues",
(Concat(Perimeterissue,
"Building: " & Building & Char(10) &
"Area: " & Title & Char(10) &
"Comments: " & Comments & Char(10) &
"Issue: " & Issue & Char(10) & Char(10)
),
{Attachments:ShowColumns(Perimeterissue,"Name","ContentBytes")}
)

 

 

 

Dual Super User
Dual Super User

Re: Adding Attachment (Image) to Email when already have a Concat Formula

@ClarkyPA365 

 

Can you please share a screenshot? (of the error message and the expression on the control)

ClarkyPA365
Level: Powered On

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi,

I've attached two screenshots showing the formula without the error msg and one with the error msg

ClarkyPA365
Level: Powered On

Re: Adding Attachment (Image) to Email when already have a Concat Formula

Hi 

Solved it.

I had a opening bracket before the Concat.  Doh!!!!!

Removed that and it works perfectly. 

Thanks for your help

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,633)