Skip to main content

Hi

I have a step that runs a query from mysql

select A, B, C from tablesource;

then in a Google Document I have the {{table}} tag to use a Google Docs “create a document from template”

Since the result from the SQL step gives A rows, B rows, C rows, and not as a single object. 

How do I send the result from the query as a single object to be used in the table in google document?

Or alternatively, send the A row, B rows, C rows, as single lines in one table the google document?

 

Thank you

Hi ​@mikaelmm 

For us to have more info, post screenshots showing the DATA OUT from the Zap steps so we can see how the structure with how the data is returned after testing.

OPTIONS


Hi ​@Troy Tessalone ! 

This is how the following steps receives the result of the sql query 

the result of the query are separated arrays (for each column)
  • Did tried python code to turn it into a single HTML table; which it worked, but Google Documents doesn’t accept that
  • For python code’s to try to send it as a table, the result is not shown in the step to send it to Google Docs, just the arrays of each column of the query
    the last result of the python code suggested by IA is not shown in the next step (is not shown as a result in google document as a template)

     

  • Formatter, line to text, have to check again, but i need a table, not isolated columns
     
  • Also tried to send the isolated column returned by the query, but it doesn’t fell as separated cells in the Google Document, but as a single block inside the cell

So, I ran out of ideas

 


@mikaelmm 

Depending on how you define “table”, you may need to use an advanced approach by using the GDocs API:

https://developers.google.com/workspace/docs/api/reference/rest

Zap action: GDocs - API Request


Thank you, but no, since there are many lines and three columns, is not accepting it.

i wish there was a way to really handle the result from the query as a unique table/dataframe to post in google docs. It’s weird that in html it was possible, but not what I needed; unless i use a html file instead of a google doc


@mikaelmm 

You’ll likely need to use the GDocs API to get the data inserted into the GDoc as a structured table.


@mikaelmm 

Try asking ChatGPT for guidance about the GDocs API request to use.