Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!
The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.
We are trying to send emails with attachments using the MS Graph sendMail API.
We're seeing an issue where the document is not being converted to Base64, see screenshot below.
Is the issue that we're starting with a json and converting to dictionary? This was done because if we define the dictionary directly, the key "@odata.type" is not recognised properly because of the period.
Thanks!
Discussion posts and replies are publicly visible
Use the following code in your "attachments" attribute
"attachments": { if( a!isNullOrEmpty(ri!attached), {}, a!forEach( items: ri!attached, expression: { "@odata.type": "#microsoft.graph.fileAttachment", "name": concat( document(fv!item, "name"), ".", document(fv!item, "extension") ), "contentType": concat( "application/", document(fv!item, "extension") ), "contentBytes": fv!item } ) ) }
Amazing that worked with one small change, line 18 should be "contentBytes": toDocument(fv!item)
Thank you v much!
You tried to create a JSON string using text operations. Then the reference to the document turns into "[Document:xx]". Now, you try to turn this into a dictionary. How should Appian know what you are referring to?