Nodes:
name: Postgres Trigger
type: n8n-nodes-base.postgresTrigger
disabled: yes
parameters: schema: __rl: yes
mode: list
value: computed
cachedResultName: computed
firesOn: UPDATE
tableName: __rl: yes
mode: list
value: users
cachedResultName: users
name: Filter
type: n8n-nodes-base.filter
notes: Filter out @n8n.io emails
parameters: conditions: string: value1: ={{ $json.email }}
value2: n8n.io
operation: notContains
notesInFlow: yes
name: Sticky Note1
type: n8n-nodes-base.stickyNote
parameters: width: 424
height: 559
content: ## 👋 How to use this template
This template shows how to sync data from one service to another. In this example we're saving a new qualified lead to a Google Sheets file. Here's how you can test the template:

1. Duplicate our [Google Sheets](https://docs.google.com/spreadsheets/d/1gVfyernVtgYXD-oPboxOSJYQ-HEfAguEryZ7gTtK0V8/edit?usp=sharing) file
2. Double click the `Google Sheets` node and create a credential by signing in.
3. Select the correct Google Sheets document and sheet.
4. Click the `Execute Workflow` button and double click the nodes to see the input and output data

### To customize it to you needs, just do the following:
1. Enable or exchange the `Postgres trigger` with any service that fits your use case.
2. Change the `Filter` to fit your needs
3. Adjust the Google Sheets node as described above
4. Disable or remove the `On clicking "Execute Node"` and `Code` node

name: Sticky Note
type: n8n-nodes-base.stickyNote
parameters: width: 344
height: 562
content: ### 1. Trigger step listens for new events


name: Sticky Note6
type: n8n-nodes-base.stickyNote
parameters: width: 462
height: 407
content: ### 2. Filter and transform your data
















In this case, we only want to save qualified users that don't have `@n8n.io` in their email address.

To edit the filter, simply drag and drop input data into the fields or change the values directly. **Besides filters, n8n has other powerful transformation nodes like [Set](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.set/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.set), [ItemList](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.itemlists/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.itemLists), [Code](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.code) and many more.**
name: Sticky Note2
type: n8n-nodes-base.stickyNote
parameters: width: 342.52886836027733
height: 407.43618112665195
content: ### 3. Save the user in a Google Sheet
















For simplicity, we're saving our qualified user in a Google Sheet.

**You can replace this node with any service like [Excel](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.microsoftexcel/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.microsoftExcel), [HubSpot](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.hubspot/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.hubspot), [Pipedrive](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.pipedrive/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.pipedrive), [Zendesk](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.zendesk/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.zendesk) etc.**
name: On clicking "Execute Node"
type: n8n-nodes-base.manualTrigger
notes: For testing the workflow
notesInFlow: yes
name: Code
type: n8n-nodes-base.code
notes: Mock Data
parameters: jsCode: return [
  {
    "id": 1,
    "username": "max_mustermann",
    "email": "max_mustermann@acme.com",
    "company_size": "500-999",
    "role": "Sales",
    "users": 50
  }
]
notesInFlow: yes
name: Google Sheets
type: n8n-nodes-base.googleSheets
notes: Add to "Users to contact"
parameters: columns: value: email: ={{ $json.email }}
username: ={{ $json.username }}
schema: type: string
display: yes
removed: no
required: no
displayName: id
defaultMatch: yes
canBeUsedToMatch: yes
type: string
display: yes
removed: no
required: no
displayName: username
defaultMatch: no
canBeUsedToMatch: yes
type: string
display: yes
removed: no
required: no
displayName: email
defaultMatch: no
canBeUsedToMatch: yes
type: string
display: yes
removed: yes
required: no
displayName: contacted
defaultMatch: no
canBeUsedToMatch: yes
mappingMode: defineBelow
matchingColumns: id
options: cellFormat: USER_ENTERED
operation: appendOrUpdate
sheetName: __rl: yes
mode: list
value: gid=0
cachedResultUrl: https://docs.google.com/spreadsheets/d/1gVfyernVtgYXD-oPboxOSJYQ-HEfAguEryZ7gTtK0V8/edit#gid=0
cachedResultName: Sheet1
documentId: __rl: yes
mode: list
value: 1gVfyernVtgYXD-oPboxOSJYQ-HEfAguEryZ7gTtK0V8
cachedResultUrl: https://docs.google.com/spreadsheets/d/1gVfyernVtgYXD-oPboxOSJYQ-HEfAguEryZ7gTtK0V8/edit?usp=drivesdk
cachedResultName: Qualified leads to contact
notesInFlow: yes

Connections:
Code: main: node: Filter
type: main
Filter: main: node: Google Sheets
type: main
Postgres Trigger: main: node: Filter
type: main
On clicking "Execute Node": main: node: Code
type: main