user-1
(User 1)
November 13, 2024, 12:57pm
1
This topic was automatically generated from Slack. You can find the original thread here .
Hi Team I am moving data from google sheet has a lot of rows to postgres DB, however the insert row functionality in Pipedream seems to be just inserting first row and ignoring the others, do i need to add control flow or is there a way, I can insert all of them,
user-1
(User 1)
November 13, 2024, 12:57pm
2
You should file a feature request for a Insert (multiple) Rows action for PostgreSQL.
Could you do us a favor and report this issue in our public repo?
Head over to Support - Pipedream
Click on the “Request an Integration” card.
Select “B - Request changes to an existing integration.”
Fill out the form with details of the issue.
This way, it gets logged in our public repo , and the component development team can be notified!
user-1
(User 1)
November 13, 2024, 12:57pm
3
Or you can use the Execute SQL Query and build your own query to insert multiple rows
user-1
(User 1)
November 13, 2024, 12:57pm
4
so there is no way I can insert multiple rows from google sheets unless a feature is added
user-1
(User 1)
November 13, 2024, 12:57pm
5
An alternative is to mimic looping by using two workflows: one for getting all the rows from your Google Sheet, and another one to insert each row
user-1
(User 1)
November 13, 2024, 12:57pm
6
In your first workflow, use a custom code step to loop over your Google Sheet rows and invoke the second workflow. Something like this:
for (const row of rows) {
await $.flow.trigger("p_secondWorkflowID", { row })
}
(or use Promise.all
to run all in parallel)
user-1
(User 1)
November 13, 2024, 12:57pm
7
In the second workflow, you’ll get a triggered event and your row data will be available in steps.trigger.event.row
user-1
(User 1)
November 13, 2024, 12:57pm
8
Then you can run that Postgres action
user-1
(User 1)
November 13, 2024, 12:57pm
10
Cool, let me know which option do you prefer!
user-1
(User 1)
November 13, 2024, 12:57pm
11
Btw, I just published a helper action for this here: Trigger Workflow For Each - Pipedream