Reads a CV PDF and writes what it says onto a fresh copy of your own Google Docs CV template.

UsesGoogle DocsGoogle DriveOpenAI

Put a CV onto your own template

Give it a CV as a PDF and a link to your own Google Docs CV template, and run it. The CV is read section by section, a copy of your template is made in Drive named after the candidate, and each placeholder in the copy is replaced with the matching section of the CV.

You end up with a filled copy and an untouched template. An AI reads the CV and is told to copy each section word for word and never add or guess, so a placeholder gets text from the CV or the phrase 'Not stated in the CV' where a section is absent; as with any AI step, check the copy against the CV before you send it on. The AI is also told to leave out a date of birth, age, nationality, gender or marital status, even inside the contact details, and only text is written, so a photograph never comes across. A section your template has no placeholder for is written out at the end of the copy under a heading naming the placeholder to add, rather than being quietly lost.

You need OpenAI, Google Drive and Google Docs connected, the CV as a PDF, and the link to your template with a placeholder for each section in double curly braces, such as {{full_name}} or {{work_experience}}, wherever you want that section to land.

Set cvFileLink to blank.Set cvFileLink to blank.
Set cvTemplateDocumentLink to blank.Set cvTemplateDocumentLink to blank.
Trim cvFileLink and save it as cvFile.Trim cvFileLink and save it as cvFile.
Trim cvTemplateDocumentLink and save it as templateLink.Trim cvTemplateDocumentLink and save it as templateLink.
If cvFile starts with “http” (ignoring case) or cvFile starts with “doc_”…If cvFile starts with “http” (ignoring case) or cvFile starts with “doc_”…
Yes
Stop and report a problem: The 'cvFileLink' step is neither an uploaded file nor a web address, so there is no CV to read. Upload the PDF to the step or paste a link starting with https:// that points straight at the PDF file.Stop and report a problem: The 'cvFileLink' step is neither an uploaded file nor a web address, so there is no CV to read. Upload the PDF to the step or paste a link starting with https:// that points straight at the PDF file.
No
No steps
If cvFile contains “docs.google.com” (ignoring case) or cvFile contains…If cvFile contains “docs.google.com” (ignoring case) or cvFile contains…
Yes
Stop and report a problem: The 'cvFileLink' step is a Google link, and a Google page is not a PDF file - the reader would fetch the sign-in page instead of the CV. Download the CV as a PDF and upload it to the step.Stop and report a problem: The 'cvFileLink' step is a Google link, and a Google page is not a PDF file - the reader would fetch the sign-in page instead of the CV. Download the CV as a PDF and upload it to the step.
No
No steps
If templateLink doesn't contain “/d/”If templateLink doesn't contain “/d/”
Yes
Stop and report a problem: The 'cvTemplateDocumentLink' step does not look like a Google Docs link - a Docs link contains '/d/', for example https://docs.google.com/document/d/1AbCdEf/edit.Stop and report a problem: The 'cvTemplateDocumentLink' step does not look like a Google Docs link - a Docs link contains '/d/', for example https://docs.google.com/document/d/1AbCdEf/edit.
No
No steps
Set cvFieldNames to [“full name”, “contact details”, “personal profile”, “skills”, “work experience”, “education”, “certifications”, “languages”].Set cvFieldNames to [“full name”, “contact details”, “personal profile”, “skills”, “work experience”, “education”, “certifications”, “languages”].
Set extractedFields to an empty list.Set extractedFields to an empty list.
If a step below fails, save the error as readErrorIf a step below fails, save the error as readError
Try
Run an AI agent: Read the attached document and pull out each of these fields, in this order: - cvFieldNa… and save it as extraction.Run an AI agent: Read the attached document and pull out each of these fields, in this order: - cvFieldNa… and save it as extraction.
If extraction.output.fields is emptyIf extraction.output.fields is empty
Yes
Stop and report a problem: Nothing could be read out of that file, so no copy of your template has been made. Check the 'cvFileLink' step points at a readable PDF of the CV.Stop and report a problem: Nothing could be read out of that file, so no copy of your template has been made. Check the 'cvFileLink' step points at a readable PDF of the CV.
No
No steps
Change extractedFields to extraction.output.fields.Change extractedFields to extraction.output.fields.
On error
Stop and report a problem: Could not read that CV, so no copy of your template has been made. The reason given was: readError.message.Stop and report a problem: Could not read that CV, so no copy of your template has been made. The reason given was: readError.message.
Set candidateName to blank.Set candidateName to blank.
For each namedField in extractedFields:For each namedField in extractedFields:
Set namedFieldName to blank.Set namedFieldName to blank.
If a step below fails, save the error as nameFieldErrorIf a step below fails, save the error as nameFieldError
Try
TextMake namedField.name lowercase and save it as namedFieldName.Make namedField.name lowercase and save it as namedFieldName.
On error
Change namedFieldName to blank.Change namedFieldName to blank.
If namedFieldName is “full name”If namedFieldName is “full name”
Yes
If a step below fails, save the error as nameValueErrorIf a step below fails, save the error as nameValueError
Try
Trim namedField.value and save it as candidateName.Trim namedField.value and save it as candidateName.
On error
Join namedField.value with a space and save it as candidateName.Join namedField.value with a space and save it as candidateName.
No
No steps
If candidateName is emptyIf candidateName is empty
Yes
Change candidateName to “Unnamed candidate”.Change candidateName to “Unnamed candidate”.
No
No steps
Set newCvLink to blank.Set newCvLink to blank.
If a step below fails, save the error as copyErrorIf a step below fails, save the error as copyError
Try
Google DriveGoogle DriveDuplicate templateLink. Save it as copy.Duplicate templateLink. Save it as copy.
Trim copy.duplicate_link and save it as newCvLink.Trim copy.duplicate_link and save it as newCvLink.
On error
Stop and report a problem: Could not copy your template, so nothing has been written. Your own template has not been touched. The reason given was: copyError.message.Stop and report a problem: Could not copy your template, so nothing has been written. Your own template has not been touched. The reason given was: copyError.message.
If newCvLink doesn't contain “/d/”If newCvLink doesn't contain “/d/”
Yes
Stop and report a problem: The copy was made but Google did not return a link that identifies it, so it cannot be filled in. Look in your Drive for the new document and fill it in by hand.Stop and report a problem: The copy was made but Google did not return a link that identifies it, so it cannot be filled in. Look in your Drive for the new document and fill it in by hand.
No
No steps
Get the first item of the last item of newCvLink split by “/d/” split by “/” and save it as newCvId.Get the first item of the last item of newCvLink split by “/d/” split by “/” and save it as newCvId.
Set sectionsWithNoPlace to an empty list.Set sectionsWithNoPlace to an empty list.
Set sectionsNotInCv to an empty list.Set sectionsNotInCv to an empty list.
For each wantedField in cvFieldNames:For each wantedField in cvFieldNames:
Set placeholder to “{{wantedField with “ ” replaced by “_”}}”.Set placeholder to “{{wantedField with “ ” replaced by “_”}}”.
Set fieldValue to blank.Set fieldValue to blank.
For each extractedField in extractedFields:For each extractedField in extractedFields:
Set extractedName to blank.Set extractedName to blank.
If a step below fails, save the error as extractedNameErrorIf a step below fails, save the error as extractedNameError
Try
TextMake extractedField.name lowercase and save it as extractedName.Make extractedField.name lowercase and save it as extractedName.
On error
Change extractedName to blank.Change extractedName to blank.
If extractedName is wantedFieldIf extractedName is wantedField
Yes
If a step below fails, save the error as extractedValueErrorIf a step below fails, save the error as extractedValueError
Try
Trim extractedField.value and save it as fieldValue.Trim extractedField.value and save it as fieldValue.
On error
Join extractedField.value with a new line and save it as fieldValue.Join extractedField.value with a new line and save it as fieldValue.
No
No steps
Set valueToWrite to fieldValue.Set valueToWrite to fieldValue.
If fieldValue is emptyIf fieldValue is empty
Yes
Change valueToWrite to “Not stated in the CV”.Change valueToWrite to “Not stated in the CV”.
Add wantedField to the end of sectionsNotInCv and save it as sectionsNotInCv.Add wantedField to the end of sectionsNotInCv and save it as sectionsNotInCv.
No
No steps
Set landed to false.Set landed to false.
If a step below fails, save the error as replaceErrorIf a step below fails, save the error as replaceError
Try
Google DocsGoogle DocsReplace placeholder with valueToWrite in newCvId. Save it as replaceResult.Replace placeholder with valueToWrite in newCvId. Save it as replaceResult.
Set occurrences to replaceResult.occurrences_changed multiplied by 1.Set occurrences to replaceResult.occurrences_changed multiplied by 1.
If occurrences is greater than or equal to 1 and occurrences is less than or…If occurrences is greater than or equal to 1 and occurrences is less than or…
Yes
Change landed to true.Change landed to true.
No
No steps
On error
Change landed to false.Change landed to false.
If landed is no and fieldValue isn't emptyIf landed is no and fieldValue isn't empty
Yes
Add wantedField - add placeholder to your templateAdd wantedField - add placeholder to your template fieldValue to the end of sectionsWithNoPlace and save it as sectionsWithNoPlace.
No
No steps
Count the items in sectionsWithNoPlace and save it as noPlaceCount.Count the items in sectionsWithNoPlace and save it as noPlaceCount.
If noPlaceCount is greater than 0If noPlaceCount is greater than 0
Yes
Google DocsGoogle DocsAdd text to newCvId.Add text to newCvId.FROM THE CV BUT NOT PLACED Your template has no placeholder for the sections below, so they are written out here rather than dropped. Add the placeholder named beside each heading to your template and run it again to have them filled in place. sectionsWithNoPlace joined by a b...
No
No steps
Show in the output: Wrote the CV of candidateName onto a copy of your template: newCvLinkShow in the output: Wrote the CV of candidateName onto a copy of your template: newCvLink Sections your template had no placeholder for, written out at the end instead: noPlaceCount Sections the CV does not contain, marked as not stated: sectionsNotInCv joined by “, ”.