Generate a proposal from a Pipedrive deal with n8n
Move a deal to your proposal stage in Pipedrive and the workflow builds the proposal from your Google Docs template, saves the Doc and a PDF to Google Drive, and adds the link to the deal as a note.
- Source
- Pipedrive
- Output
- Google DocsPDF (single runs only)
- Delivered to
- Google Drive
n8n workflow
The importable workflow file for this recipe is being tested and will be added here. The steps below show exactly what it does, so you can build it now in a few minutes with the SourceToDocs n8n node.
How the workflow runs
- 01
Pipedrive Trigger: Change, Deal
Action is Change and Entity is Deal, so the workflow starts whenever a deal is edited, a stage move included.
- 02
If: the deal has just entered your proposal stage
Two conditions: the deal's stage is the proposal stage, and the stage is among the values this change replaced. Edits to a deal that is already in the stage stop here.
- 03
Loop Over Items: Batch Size 1
The SourceToDocs node starts one run for all the items it receives. The loop hands on one deal at a time, so every deal gets a separate run and a separate proposal.
- 04
Pipedrive: Deal, Get
Reads the full deal by its ID, with custom fields such as Scope under their own names.
- 05
Pipedrive: Organization, Get
Reads the organization linked to the deal, so the proposal is addressed to the client's name.
- 06
SourceToDocs: Document, Generate
Rows Come From is set to the Map Columns mode. Client, Project, Scope and Price come from Pipedrive; Valid until is thirty days from the run. Because this is a single run, switching on Also generate PDF delivers a PDF beside the Google Doc.
- 07
Pipedrive: Note, Create
Adds a note with the Doc link and the PDF link to the deal, where the whole team sees it in the deal's history.
| Pipedrive field | Template placeholder |
|---|---|
| Organization name | {{ client }} |
| Deal title | {{ project }} |
| Scope (custom deal field) | {{ scope }} |
| Deal value | {{ price }} |
| (run date + 30 days) | {{ valid_until }} |
Or have Claude set it up
The Proposals, quotes and contracts skill
works through the SourceToDocs connector at https://app.sourcetodocs.com/api/mcp. Install the skill, connect, then paste:
Use the sales-documents skill. I saved my Pipedrive deals in the proposal stage as "pipedrive-deals.csv", one row per deal, with the columns Deal ID, Client, Project, Scope, Price and Valid until. Set up a Google Docs proposal document from that file with a PDF next to the Doc. I will pick the proposal template and the Drive folder "Proposals" when you send me the links. Show me the placeholder mapping before you run anything, then generate the proposal for the first deal only.
To generate a proposal from a Pipedrive deal with n8n, trigger on deal changes, let through only deals that have just entered your proposal stage, read the deal and its organization, pass those values to the SourceToDocs node to fill your Google Docs proposal template, and add the returned link to the deal as a note. One deal is one run, so SourceToDocs can deliver a PDF next to the Google Doc. The build is seven nodes, described below.
What you need
- A Pipedrive account with a pipeline stage that means “send a proposal”, and a custom deal field named
Scopefor the text that describes the work. - A simple proposal template in Google Docs with just the placeholders
{{ client }},{{ project }},{{ scope }},{{ price }}and{{ valid_until }}. The business proposal template is a fuller design with its own placeholder names: a design reference, not a drop-in file. - A SourceToDocs workspace and an API token for it. A workspace owner or admin creates the token on the API Tokens page.
- On the Accounts page, a Google Docs connection for the template and a Google Drive connection for delivery. Every tile is a separate connection: Google Slides or Google Drive does not cover Google Docs.
- n8n, self-hosted or Cloud, with the SourceToDocs node installed. In n8n, open Settings, then Community nodes, and install
@twovmodules/n8n-nodes-sourcetodocs. On n8n Cloud, add it from the nodes panel, where it is listed as a verified node. - A Pipedrive credential in n8n, API Token or OAuth2.
Set up the document in SourceToDocs
SourceToDocs has no Pipedrive connection. The template and its settings live in SourceToDocs, and n8n sends the deal’s values.
- Create a Google Docs document.
- Upload a small CSV with the header row
Client,Project,Scope,Price,Valid untiland one sample line as the data source; it becomes a data set. The sample is enough, because the workflow sends the real row in place of reading the source. - Each column gets an alias, a snake-case identifier derived from its name. The template uses the alias: column
Valid untilis{{ valid_until }}. - On the Document step, pick your Google Doc. Its Variables panel lists the exact placeholders for your data set; click one to copy it.
- Add a Google Drive distribution and choose the folder.
- Switch on Also generate PDF in the Output card.
- Leave split off. A split document produces no PDFs.
Build it in n8n
Add the nodes in this order. Connect the true output of If to Loop Over Items, the loop output to the first Pipedrive node, then on through the second Pipedrive node and SourceToDocs to the last Pipedrive node, and that node back into Loop Over Items. Rename the two reading nodes to Get deal and Get organization; the expressions below refer to them by those names.
| Node | Operation | Key settings |
|---|---|---|
| Pipedrive Trigger | Action: Change. Entity: Deal | No other settings. An older version of the node labels these Updated and Object. |
| If | Two conditions, joined with AND | The deal’s stage ID is equal to the ID of your proposal stage, and the previous stage ID exists. See below. |
| Loop Over Items | Batch Size: 1 | No other settings. |
Pipedrive (Get deal) | Resource: Deal. Operation: Get | Deal ID: the deal’s ID from the trigger. |
Pipedrive (Get organization) | Resource: Organization. Operation: Get | Organization ID: the organization ID from the Get deal output. |
| SourceToDocs | Resource: Document. Operation: Generate | Document: your proposal document. Rows Come From: This Workflow — Map Columns. Data Set: the one with the five columns. Columns: see below. Wait for Completion stays on, which is the default. |
| Pipedrive | Resource: Note. Operation: Create | Content: see below. Under Additional Fields, Deal ID: the deal’s ID from the trigger. |
The stage check
The trigger outputs the deal as it is after the change, and beside it the earlier values of the fields this change replaced. Move a test deal into the stage, open the trigger’s output panel and build the two conditions from what you see there:
- the deal’s current
stage_idis equal to the ID of your proposal stage, for example{{ $json.data.stage_id }}; - the previous
stage_idexists, for example{{ $json.previous.stage_id }}, which is only present when this change moved the deal.
The second condition is what stops a proposal from being generated again every time someone edits a deal that is already sitting in the stage. The stage ID is a number; it is in the trigger output of your test deal.
The values
The five column values in the SourceToDocs node:
| Column | Value |
|---|---|
| Client | The organization’s name from Get organization, for example {{ $json.name }} |
| Project | The deal title from Get deal, for example {{ $('Get deal').item.json.title }} |
| Scope | The Scope custom field from Get deal |
| Price | The deal value and currency from Get deal, for example {{ $('Get deal').item.json.value }} {{ $('Get deal').item.json.currency }} |
| Valid until | {{ $now.plus({ days: 30 }).toFormat('d LLLL yyyy') }} |
The exact paths into the Pipedrive output depend on the node version. Run the two reading nodes once on a test deal and drag each value from the output panel into the column, which writes the right expression for you. Leave Show Raw Field Keys off on Get deal, so custom fields such as Scope appear under their names.
The note the last node writes:
| Field | Value |
|---|---|
| Content | Proposal: {{ $json.file_url }} PDF: {{ $json.deliveries[0].result.pdf_url }} |
| Deal ID | The same deal ID you gave Get deal, read from Loop Over Items: {{ $('Loop Over Items').item.json.data.id }} if your trigger output has that shape. |
The Column names are the data set’s column names, case included, not the template placeholders, which use the aliases. Mapped values are sent as they resolve, so format Price in the expression the way it should read in the proposal.
Which links end up in the note
The SourceToDocs node returns file_url and file_name at the top level of its output: that is the Google Doc. With Also generate PDF on, the deliveries list in the same output holds one entry per destination, and a Google Drive entry’s result carries drive_url for the Doc and pdf_url for the PDF. The Content above uses the first entry, which is correct when the document has one destination.
Set it up with Claude instead
The sales-documents skill lets Claude do the SourceToDocs part for you through the MCP connector: create the document, attach the data, read the template’s placeholders, set the Google Drive delivery with a PDF, and start a run. You pick the template file and the Drive folder yourself, through links Claude hands you, and Claude cannot edit the template.
The limit is Pipedrive. Claude cannot read Pipedrive through SourceToDocs and does not add the note to the deal, so this route starts from an export: save the deals as a CSV, or keep them in Airtable or a Google Sheet, with the columns the template’s placeholders are named after (Client, Project, Scope, Price, Valid until) and a Deal ID column to tell the deals apart. Claude prints what the file holds, so the validity date has to be a column; working it out from the run date is something the n8n build does. A proposal with a PDF is one run for one deal: Claude sends that deal’s row with the run and gives you the link to the Doc and to the PDF. It suits proposals you produce on request. The n8n workflow is the route that reacts to the stage move on its own, and it can drive the same document Claude set up.
Where this fits
This workflow covers the direct case: one deal, one proposal, the deal owner sending it. When proposals need approval before they go out, carry pricing rules, or pull sections by deal type, the proposal automation guide covers the wider design. The n8n node page lists what the SourceToDocs node does in a workflow, and the automations library has the same pattern for other apps.
Related
- proposal automation: the full guide this recipe belongs to.
- Free business proposal template for Google Docs: the template this workflow fills.
- The SourceToDocs n8n node: every action and setting.
- The SourceToDocs MCP server: what Claude can do through the connector.