AutomationFlowsCRM & Sales › Weekly Account Enrichment Report

Weekly Account Enrichment Report

Weekly Account Enrichment Report. Uses googleBigQuery, hubspot, googleDocs. Scheduled trigger; 7 nodes.

Cron / scheduled trigger★★★★☆ complexity7 nodesGoogle BigQueryHubSpotGoogle Docs
CRM & Sales Trigger: Cron / scheduled Nodes: 7 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Weekly Account Enrichment Report",
  "nodes": [
    {
      "id": "a1b2c3d4-0001-0001-0001-000000000001",
      "name": "Every Monday 8am UTC",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        0,
        300
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 8 * * 1"
            }
          ]
        }
      }
    },
    {
      "id": "a1b2c3d4-0002-0002-0002-000000000002",
      "name": "Get Active SF Accounts",
      "type": "n8n-nodes-base.googleBigQuery",
      "typeVersion": 2.1,
      "position": [
        220,
        300
      ],
      "parameters": {
        "authentication": "serviceAccount",
        "operation": "executeQuery",
        "projectId": {
          "mode": "id",
          "value": "guesty-data"
        },
        "sqlQuery": "SELECT\n  sf_account_id,\n  account_name,\n  account_id AS guesty_account_id,\n  account_segmentation,\n  avg_mrr,\n  website\nFROM `guesty-data.guesty_analytics.dim_accounts`\nWHERE account_active = TRUE\nORDER BY account_name ASC",
        "options": {}
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "a1b2c3d4-0003-0003-0003-000000000003",
      "name": "Search HubSpot Contact",
      "type": "n8n-nodes-base.hubspot",
      "typeVersion": 2.2,
      "position": [
        440,
        300
      ],
      "onError": "continueRegularOutput",
      "parameters": {
        "authentication": "oAuth2",
        "resource": "contact",
        "operation": "search",
        "returnAll": false,
        "limit": 1,
        "filterGroupsUi": {
          "filterGroupsValues": [
            {
              "filtersUi": {
                "filterValues": [
                  {
                    "propertyName": "salesforce_accountid",
                    "operator": "EQ",
                    "value": "={{ $json.sf_account_id }}"
                  }
                ]
              }
            }
          ]
        },
        "additionalFields": {
          "properties": [
            "email",
            "lifecyclestage",
            "hs_last_activity_date"
          ]
        }
      },
      "credentials": {
        "hubspotOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "a1b2c3d4-0004-0004-0004-000000000004",
      "name": "Merge Account + HubSpot Data",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        660,
        300
      ],
      "parameters": {
        "mode": "manual",
        "duplicateItem": false,
        "assignments": {
          "assignments": [
            {
              "id": "f1",
              "name": "sf_account_id",
              "value": "={{ $('Get Active SF Accounts').item.json.sf_account_id }}",
              "type": "string"
            },
            {
              "id": "f2",
              "name": "account_name",
              "value": "={{ $('Get Active SF Accounts').item.json.account_name }}",
              "type": "string"
            },
            {
              "id": "f3",
              "name": "guesty_account_id",
              "value": "={{ $('Get Active SF Accounts').item.json.guesty_account_id }}",
              "type": "string"
            },
            {
              "id": "f4",
              "name": "account_segmentation",
              "value": "={{ $('Get Active SF Accounts').item.json.account_segmentation }}",
              "type": "string"
            },
            {
              "id": "f5",
              "name": "avg_mrr",
              "value": "={{ $('Get Active SF Accounts').item.json.avg_mrr }}",
              "type": "number"
            },
            {
              "id": "f6",
              "name": "website",
              "value": "={{ $('Get Active SF Accounts').item.json.website }}",
              "type": "string"
            },
            {
              "id": "f7",
              "name": "hs_email",
              "value": "={{ $json.properties ? $json.properties.email : '' }}",
              "type": "string"
            },
            {
              "id": "f8",
              "name": "hs_lifecycle_stage",
              "value": "={{ $json.properties ? $json.properties.lifecyclestage : '' }}",
              "type": "string"
            },
            {
              "id": "f9",
              "name": "hs_last_activity_date",
              "value": "={{ $json.properties ? $json.properties.hs_last_activity_date : '' }}",
              "type": "string"
            }
          ]
        }
      }
    },
    {
      "id": "a1b2c3d4-0005-0005-0005-000000000005",
      "name": "Aggregate All Rows",
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        880,
        300
      ],
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "rows",
        "include": "allFields"
      }
    },
    {
      "id": "a1b2c3d4-0006-0006-0006-000000000006",
      "name": "Create Google Doc",
      "type": "n8n-nodes-base.googleDocs",
      "typeVersion": 2,
      "position": [
        1100,
        300
      ],
      "parameters": {
        "authentication": "oAuth2",
        "resource": "document",
        "operation": "create",
        "driveId": "myDrive",
        "folderId": "root",
        "title": "=Account Enrichment - {{ $now.toFormat('yyyy-MM-dd') }}"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "a1b2c3d4-0007-0007-0007-000000000007",
      "name": "Write Report Content",
      "type": "n8n-nodes-base.googleDocs",
      "typeVersion": 2,
      "position": [
        1320,
        300
      ],
      "parameters": {
        "authentication": "oAuth2",
        "resource": "document",
        "operation": "update",
        "documentURL": "={{ $json.id }}",
        "actionsUi": {
          "actionFields": [
            {
              "object": "text",
              "action": "insert",
              "locationChoice": "endOfSegmentLocation",
              "insertSegment": "body",
              "text": "=Account Enrichment Report - {{ $now.toFormat('yyyy-MM-dd') }}\nGenerated every Monday at 8:00 AM UTC\n\nACCOUNT NAME | SF ACCOUNT ID | GUESTY ID | SEGMENTATION | AVG MRR | WEBSITE | HS EMAIL | LIFECYCLE STAGE | LAST ACTIVITY\n{{ $('Aggregate All Rows').item.json.rows.map(function(r) { return [r.account_name, r.sf_account_id, r.guesty_account_id, r.account_segmentation, r.avg_mrr, r.website, r.hs_email, r.hs_lifecycle_stage, r.hs_last_activity_date].join(' | '); }).join('\\n') }}"
            }
          ]
        }
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Every Monday 8am UTC": {
      "main": [
        [
          {
            "node": "Get Active SF Accounts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Active SF Accounts": {
      "main": [
        [
          {
            "node": "Search HubSpot Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search HubSpot Contact": {
      "main": [
        [
          {
            "node": "Merge Account + HubSpot Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Account + HubSpot Data": {
      "main": [
        [
          {
            "node": "Aggregate All Rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate All Rows": {
      "main": [
        [
          {
            "node": "Create Google Doc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Google Doc": {
      "main": [
        [
          {
            "node": "Write Report Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Weekly Account Enrichment Report. Uses googleBigQuery, hubspot, googleDocs. Scheduled trigger; 7 nodes.

Source: https://github.com/alvarocubaa/n8n-workflow-builder/blob/4eff3d38299486ce819c0d6d28c7df5bf6c7236f/examples/bq_enrichment_docs.json — original creator credit. Request a take-down →

More CRM & Sales workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

CRM & Sales

This workflow runs weekly (or manually) to pull HubSpot companies, search Coresignal job ads via Elasticsearch for customer support roles by company domain, maintain job snapshot and job tables in n8n

N8N Nodes Coresignal Api, Data Table, HubSpot
CRM & Sales

This workflow runs hourly to find HubSpot contacts whose lead score drops below a threshold, deduplicates alerts using Google Sheets, notifies the owner via Slack, creates a HubSpot follow-up task, se

HubSpot, Google Sheets, Slack +1
CRM & Sales

Monitor CRM accounts for hiring spikes by enriching HubSpot companies with PredictLeads job data and alerting your team via Slack.

HubSpot, HTTP Request, Google Sheets +1
CRM & Sales

Zendesk Hubspot. Uses zendesk, hubspot, functionItem. Scheduled trigger; 13 nodes.

Zendesk, HubSpot, Function Item
CRM & Sales

This workflow automatically syncs your Zendesk tickets to your HubSpot contacts. Every 5 minutes, your Zendesk account collects all the new or updated tickets and syncs them accordingly, with your Hub

Zendesk, HubSpot, Function Item