I am sending an email attached with excel sheet to process model vai Receive Email at start node. I could able to extract the excel from email but the data is not written in the database.FYI: Using Plugin Import Excel to Database, Using CDT
Discussion posts and replies are publicly visible
Common causes are a mismatch between the Excel column headers and your CDT field names, inconsistency in data types, or issues with your data store configuration. Make sure the headers in your Excel file exactly match the names and data types of your CDT fields, that the data store entity is published and up to date, and review process logs for any errors such as type mismatches or missing required fields.
If you could provide more details would be great.
Hi Shubham Aware ,I have verifed all the common mismatch those are absoluate correct. The same process mode is working, If I am sharing same file throught UI(start process form) and data wriiten in database.But when I am sending same excel vai email attachment throuht Receive Message, data is not able write to database.FYI: using msg!properties.attachments to extract attached excel.
Do you see the attached file in the PV?
That process instance is start by a different user account when triggered by email. This might lea to a permission issue.
yes Stefan Helzle ,I could able to see the attached file in the PV.
To properly debug this issue could you please run "Import Excel to Database" node as Run as Whoever Designed this Process Model.Let's check if it's working or not.
Thanks buddy Shubham Aware this worked !!! Just want to understand reason behind this.And this will work for multiple attachments ? if yes, how can we achive it ?
When email triggers a process, it runs as ANONYMOUS user who has no database write permissions. By setting the Import Excel node to “Run as whoever designed this process model,” it uses your permissions instead, which is why it now works - you have the necessary database access that ANONYMOUS lacks.For multiple attachments, save msg!properties.attachments to a process variable array (pv!attachments), then configure the Import Excel node as Multiple Node Instance (MNI). Set it to run for each item in pv!attachments, use pv!attachments[tp!index] as the Document input, and keep it running as designer.