How to retrieve data from google sheet and auto update in google docs and upload to google drive as pdf

Hi, All.

How to retrieve data from google sheet and auto update in google docs and upload to google drive as pdf?

  1. Read and retrieve data from Google Sheets.
  2. Aggregate all items into 1 singles list, set variable to item in order to loop the data.
  3. In Google Docs, I need update each name for each file for every single output ( in simple way, i want it to be different name)

Information on your n8n setup

  • n8n version: 0.198.2
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default)]:
  • Running n8n via [Docker]:

Hey @Edwin_Wong,

Welcome to the community :cake:

Can you share what you have already tried? You can read data from a sheet using the Google Sheet node then depending on what you are doing with the data you could then use a Code node, A Set Node or maybe something else then you can use a third party service if needed to make a PDF that you can upload using the Drive node.

Sadly though without knowing what the data looks like and what it is meant to look like at the end along with what you plan to use to make the PDF and what you have already tried all I have is ideas :slight_smile:

I would recommend going through the level 1 course though that will give you a good understanding of how to work with data in n8n.

@Jon Hi, Jon. Thanks for replying. Just update you then I manage to solve and get the solution that I want.

can you help me about google docs node ? it’s very hard for me as a beginner

Modèle qui fonctionne bien pour Sheets → Docs nommés → Drive PDF :

  1. Google Sheets Get Rows (ou Read) pour que chaque élément soit un enregistrement.
  2. Drive Copy File de votre Doc modèle. Définissez le nouveau nom à partir d’expressions, par ex. Quote_{{ $json.customer }}_{{ $json.id }}.
  3. Docs Update / remplacez les espaces réservés sur cet identifiant de fichier copié.
  4. Drive Download avec conversion en application/pdf, puis Drive Upload dans le dossier cible (et Gmail attach si vous avez besoin d’un e-mail).

Conseils : gardez les dossiers de modèle et de sortie séparés, stockez l’identifiant du fichier copié sur l’élément afin que les nœuds ultérieurs ne pointent jamais vers le maître, et nommez explicitement le PDF lors du Upload pour que Drive n’invente pas « Untitled ». Si le remplacement Docs est instable sur les tableaux, générez du HTML à partir de la ligne et convertissez-le en PDF au lieu de muter Docs.