cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
subhashgitam
Frequent Visitor

Read csv file from email attachment and insert/update with sharepoint list

Hello,

 

I'm trying to read csv file from mail attachment and trying to insert/update with SharePoint list. but unable to read the column values from array of rows something like below. can someone advise me ? with csv  i have around 6000 rows of data

[
  "Name,Owner,Owner Last name,Owner First name,CI Owner E-Mail,Primary Contact 1,Primary Contact 2\r",
  "Tress,tress name,,,,\"Santiago, Maria\",\"Santiago, Maria\"\r",
  "Red, red,,,,CD_IT  Apps,CB_IT Finance Legacy Apps\r",
  ""
]
2 ACCEPTED SOLUTIONS

Accepted Solutions
js-dattics
Resolver I
Resolver I

Hi @subhashgitam 

You could create a very complicated process to read the CSV content and convert it into a JSON.

However, there's a third-party connector that you can use (there's a free tier for 1K calls per month).

js-dattics_0-1595194587911.png

I've used it myself for other cases and it works really good.

 

Greetings from Colombia.

 

If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

View solution in original post

v-litu-msft
Community Support
Community Support

Hi @subhashgitam,

 

One strange thing is, why is this csv file content an array?

If you want to insert the CSV into SharePoint, you should convert it into object, the format of csv should as below. @js-dattics provided a perfect action, I tested it and it works perfectly:

Annotation 2020-07-20 135813.jpg

 

This is output:

[
  {
    "Name": "Tress",
    "Owner": "tress name",
    "Owner Last name": "",
    "Owner First name": "",
    "CI Owner E-Mail": "",
    "Primary Contact 1": "Santiago",
    "Primary Contact 2": "Maria",
    "Column7": "Santiago",
    "Column8": "Maria",
    "Column9": ""
  },
  {
    "Name": "Red",
    "Owner": "red",
    "Owner Last name": "",
    "Owner First name": "",
    "CI Owner E-Mail": "",
    "Primary Contact 1": "CD_IT  Apps",
    "Primary Contact 2": "CB_IT Finance Legacy Apps",
    "Column7": null,
    "Column8": null,
    "Column9": null
  }
]

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
yashag2255
Dual Super User II
Dual Super User II

Hi @subhashgitam 

 

I believe that Power Automate currently does not support reading data directly from a CSV and generate dynamic content. If you think this should be included as a feature, you can raise an idea or upvote already existing similar ones here: https://powerusers.microsoft.com/t5/Power-Automate-Ideas/idb-p/MPAIdeas

 

You can also check out this reference thread for more details: https://powerusers.microsoft.com/t5/Building-Flows/Extracting-CSV-Email-Attachment-from-Outlook-and-...

 

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!

js-dattics
Resolver I
Resolver I

Hi @subhashgitam 

You could create a very complicated process to read the CSV content and convert it into a JSON.

However, there's a third-party connector that you can use (there's a free tier for 1K calls per month).

js-dattics_0-1595194587911.png

I've used it myself for other cases and it works really good.

 

Greetings from Colombia.

 

If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

View solution in original post

v-litu-msft
Community Support
Community Support

Hi @subhashgitam,

 

One strange thing is, why is this csv file content an array?

If you want to insert the CSV into SharePoint, you should convert it into object, the format of csv should as below. @js-dattics provided a perfect action, I tested it and it works perfectly:

Annotation 2020-07-20 135813.jpg

 

This is output:

[
  {
    "Name": "Tress",
    "Owner": "tress name",
    "Owner Last name": "",
    "Owner First name": "",
    "CI Owner E-Mail": "",
    "Primary Contact 1": "Santiago",
    "Primary Contact 2": "Maria",
    "Column7": "Santiago",
    "Column8": "Maria",
    "Column9": ""
  },
  {
    "Name": "Red",
    "Owner": "red",
    "Owner Last name": "",
    "Owner First name": "",
    "CI Owner E-Mail": "",
    "Primary Contact 1": "CD_IT  Apps",
    "Primary Contact 2": "CB_IT Finance Legacy Apps",
    "Column7": null,
    "Column8": null,
    "Column9": null
  }
]

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

  • Thanks for the response.we don't have the premium connector to utilise this feature. Please let me know how I can read ? Can someone provide an example or link ?

Hi @subhashgitam,

 

There is the document about cloudmersive convert connector:

https://docs.microsoft.com/en-us/connectors/cloudmersiveconvert/

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Questions
Frequent Visitor

Is there an Excel connector that could be used to read Excel files (as opposed to CSV)?

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (69,001)