Skip to main content
Community site session details

Community site session details

Session Id : Z0aFnCtGK1ptT43B1UN0jk
Power Automate - Using Flows
Answered

Store rows from CSV attachment to postgres table

Like (0) ShareShare
ReportReport
Posted on 13 Oct 2022 22:26:32 by 11

Hello All,

 

I am new to this so finding it difficult. I have the basics figured out but don't know how to put it together.

 

I get a CSV report everyday and I want to take all the rows and insert them into the table in a postgres DB in GCP. I have created a table from csv file, I have connection to the table is working but I am not able to figure out how to load individual row of CSV data table to a row in postgres table.

Moonking_0-1665699813769.png

 

Please ignore "Create File" as that is just to keep a copy on one drive.

Moonking_1-1665699856439.png

 

Seems like Insert Row requires data, but how do I extract data for individual column from the CSV table row?

Moonking_2-1665699909458.png

 

 

  • Verified answer
    v-chengfen-msft Profile Picture
    on 17 Oct 2022 at 08:10:23
    Re: Store rows from CSV attachment to postgres table

    Hi @Moonking ,
    The CSV file is a comma-separated values file
    Line breaks separate rows and commas separate columns

    Here is a test for your reference:

    Here is CSV file:

    vchengfenmsft_5-1665993606780.png

     

    Here is test:

    Put data lines into an array by line breaks, then turning [,] into [; ]

     

    vchengfenmsft_0-1665993593594.png

    vchengfenmsft_1-1665993593604.png

     

    Note:

    Parse JSON needs to get the schema:

    1.You need to test it first to get Select's Body

    vchengfenmsft_2-1665993593611.png

     

    2.Put Select's Body in

    vchengfenmsft_3-1665993593621.png

     

     

    Finally

    Here is result :

    You can load a single row from a CSV data table into a row in a postgres table.

    vchengfenmsft_4-1665993593626.png

     

     

     

    Here is a link for you reference:

    Parse CSV File Using Power Automate (c-sharpcorner.com)

    Best Regards

    Cheng Feng

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Featured topics

Restore a deleted flow
Loading complete