Filter not working _When a Pipedrive Field is updated create a Google Drive Folder

Hi,
We have a Pipedrive field called Contact Type with Applicant and Sponsor options, and we have two folders in Google Drive with those two as well. We want to create an automation when the deal contact type field is updated to Sponsor. for example, create a folder inside the Sponsor Gdrive folder with the name of the contact person.

We manage to make this work, but it creates a folder for both the applicant and the sponsor, even though we set up a filter. Can someone please look through the blueprint attached?

blueprint (5).json (15.8 KB)

Actually it triggers to any update in person. We are not sure how to create the automation to make it happen to only create a trigger when contact type has changed

Welcome to the Make community!

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module, save the contents as a text file, and upload it here into this discussion thread:
Screenshot_2023-10-06_141025

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!c

2 Likes

Hi @aamag !

The answer is similar to that in your other Pipedrive query … you need to add a filter on the path from the Webhook to compare the current and previous values, and only continue when the Contact Type field has changed.

I’m also guessing you may also be able to use the New Person Event module rather than a Custom Webhook - that saves you having to manually create the webhook in Pipedrive, and makes the scenario more understandable and maintainable for anyone else.

2 Likes

Hi @DavidGurr_Make Thanks for responding. Same answer here… can you please show me how to to do the comparison filter? I’m new to Make. I don’t know how to do advance functions yet. Thank you


it’s not letting me download the output bundles… it’s just showing

Applicant Bundle

[
{
“kind”: “drive#file”,
“id”: “1Afy8bBkWJV1VaDv6bTGoB-9mekcRU-GW”,
“name”: “Test Company_Test Person”,
“mimeType”: “application/vnd.google-apps.folder”,
“starred”: false,
“trashed”: false,
“explicitlyTrashed”: false,
“parents”: [
“0B32Vj6uRRTNybTI1Tm1Hby1rZ1U”
],
“spaces”: [
“drive”
],
“version”: “1”,
“webViewLink”: “https://drive.google.com/drive/folders/1Afy8bBkWJV1VaDv6bTGoB-9mekcRU-GW”,
“iconLink”: “https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.folder+48+shared”,
“hasThumbnail”: false,
“thumbnailVersion”: “0”,
“viewedByMe”: false,
“createdTime”: “2023-11-07T02:04:52.437Z”,
“modifiedTime”: “2023-11-07T02:04:52.437Z”,
“modifiedByMeTime”: “2023-11-07T02:04:52.437Z”,
“modifiedByMe”: true,
“owners”: [
{
“kind”: “drive#user”,
“displayName”: “Cristian Aguirre”,
“photoLink”: “https://lh3.googleusercontent.com/a/ACg8ocIVUQxJeBf0MYZrKAWJZtudaYyVfmhuZG316uqkI3BpaHZA=s64”,
“me”: true,
“permissionId”: “03697670904459783127”,
“emailAddress”: “cristian@visaways.com.au”
}
],
“lastModifyingUser”: {
“kind”: “drive#user”,
“displayName”: “Cristian Aguirre”,
“photoLink”: “https://lh3.googleusercontent.com/a/ACg8ocIVUQxJeBf0MYZrKAWJZtudaYyVfmhuZG316uqkI3BpaHZA=s64”,
“me”: true,
“permissionId”: “03697670904459783127”,
“emailAddress”: “cristian@visaways.com.au”
},
“shared”: true,
“ownedByMe”: true,
“capabilities”: {
“canAcceptOwnership”: false,
“canAddChildren”: true,
“canAddMyDriveParent”: false,
“canChangeCopyRequiresWriterPermission”: false,
“canChangeSecurityUpdateEnabled”: false,
“canChangeViewersCanCopyContent”: false,
“canComment”: true,
“canCopy”: false,
“canDelete”: true,
“canDownload”: true,
“canEdit”: true,
“canListChildren”: true,
“canModifyContent”: true,
“canModifyContentRestriction”: false,
“canModifyEditorContentRestriction”: false,
“canModifyOwnerContentRestriction”: false,
“canModifyLabels”: false,
“canMoveChildrenWithinDrive”: true,
“canMoveItemIntoTeamDrive”: true,
“canMoveItemOutOfDrive”: true,
“canMoveItemWithinDrive”: true,
“canReadLabels”: false,
“canReadRevisions”: false,
“canRemoveChildren”: true,
“canRemoveContentRestriction”: false,
“canRemoveMyDriveParent”: true,
“canRename”: true,
“canShare”: true,
“canTrash”: true,
“canUntrash”: true
},
“viewersCanCopyContent”: true,
“copyRequiresWriterPermission”: false,
“writersCanShare”: true,
“permissions”: [
{
“kind”: “drive#permission”,
“id”: “14127075236452823364”,
“type”: “domain”,
“domain”: “oppaus.com.au”,
“role”: “writer”,
“allowFileDiscovery”: true,
“displayName”: “VisaWays Australia”
},
{
“kind”: “drive#permission”,
“id”: “03697670904459783127”,
“type”: “user”,
“emailAddress”: “cristian@visaways.com.au”,
“role”: “owner”,
“displayName”: “Cristian Aguirre”,
“photoLink”: “https://lh3.googleusercontent.com/a/ACg8ocIVUQxJeBf0MYZrKAWJZtudaYyVfmhuZG316uqkI3BpaHZA=s64”,
“deleted”: false,
“pendingOwner”: false
},
{
“kind”: “drive#permission”,
“id”: “anyoneWithLink”,
“type”: “anyone”,
“role”: “reader”,
“allowFileDiscovery”: false
}
],
“permissionIds”: [
“14127075236452823364”,
“03697670904459783127”,
“anyoneWithLink”
],
“folderColorRgb”: “#8f8f8f”,
“quotaBytesUsed”: “0”,
“isAppAuthorized”: true,
“linkShareMetadata”: {
“securityUpdateEligible”: false,
“securityUpdateEnabled”: true
}
}
]

Sponsor Bundle

[
{
“kind”: “drive#file”,
“id”: “1Afy8bBkWJV1VaDv6bTGoB-9mekcRU-GW”,
“name”: “Test Company_Test Person”,
“mimeType”: “application/vnd.google-apps.folder”,
“starred”: false,
“trashed”: false,
“explicitlyTrashed”: false,
“parents”: [
“0B32Vj6uRRTNybTI1Tm1Hby1rZ1U”
],
“spaces”: [
“drive”
],
“version”: “1”,
“webViewLink”: “https://drive.google.com/drive/folders/1Afy8bBkWJV1VaDv6bTGoB-9mekcRU-GW”,
“iconLink”: “https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.folder+48+shared”,
“hasThumbnail”: false,
“thumbnailVersion”: “0”,
“viewedByMe”: false,
“createdTime”: “2023-11-07T02:04:52.437Z”,
“modifiedTime”: “2023-11-07T02:04:52.437Z”,
“modifiedByMeTime”: “2023-11-07T02:04:52.437Z”,
“modifiedByMe”: true,
“owners”: [
{
“kind”: “drive#user”,
“displayName”: “Cristian Aguirre”,
“photoLink”: “https://lh3.googleusercontent.com/a/ACg8ocIVUQxJeBf0MYZrKAWJZtudaYyVfmhuZG316uqkI3BpaHZA=s64”,
“me”: true,
“permissionId”: “03697670904459783127”,
“emailAddress”: “cristian@visaways.com.au”
}
],
“lastModifyingUser”: {
“kind”: “drive#user”,
“displayName”: “Cristian Aguirre”,
“photoLink”: “https://lh3.googleusercontent.com/a/ACg8ocIVUQxJeBf0MYZrKAWJZtudaYyVfmhuZG316uqkI3BpaHZA=s64”,
“me”: true,
“permissionId”: “03697670904459783127”,
“emailAddress”: “cristian@visaways.com.au”
},
“shared”: true,
“ownedByMe”: true,
“capabilities”: {
“canAcceptOwnership”: false,
“canAddChildren”: true,
“canAddMyDriveParent”: false,
“canChangeCopyRequiresWriterPermission”: false,
“canChangeSecurityUpdateEnabled”: false,
“canChangeViewersCanCopyContent”: false,
“canComment”: true,
“canCopy”: false,
“canDelete”: true,
“canDownload”: true,
“canEdit”: true,
“canListChildren”: true,
“canModifyContent”: true,
“canModifyContentRestriction”: false,
“canModifyEditorContentRestriction”: false,
“canModifyOwnerContentRestriction”: false,
“canModifyLabels”: false,
“canMoveChildrenWithinDrive”: true,
“canMoveItemIntoTeamDrive”: true,
“canMoveItemOutOfDrive”: true,
“canMoveItemWithinDrive”: true,
“canReadLabels”: false,
“canReadRevisions”: false,
“canRemoveChildren”: true,
“canRemoveContentRestriction”: false,
“canRemoveMyDriveParent”: true,
“canRename”: true,
“canShare”: true,
“canTrash”: true,
“canUntrash”: true
},
“viewersCanCopyContent”: true,
“copyRequiresWriterPermission”: false,
“writersCanShare”: true,
“permissions”: [
{
“kind”: “drive#permission”,
“id”: “14127075236452823364”,
“type”: “domain”,
“domain”: “oppaus.com.au”,
“role”: “writer”,
“allowFileDiscovery”: true,
“displayName”: “VisaWays Australia”
},
{
“kind”: “drive#permission”,
“id”: “03697670904459783127”,
“type”: “user”,
“emailAddress”: “cristian@visaways.com.au”,
“role”: “owner”,
“displayName”: “Cristian Aguirre”,
“photoLink”: “https://lh3.googleusercontent.com/a/ACg8ocIVUQxJeBf0MYZrKAWJZtudaYyVfmhuZG316uqkI3BpaHZA=s64”,
“deleted”: false,
“pendingOwner”: false
},
{
“kind”: “drive#permission”,
“id”: “anyoneWithLink”,
“type”: “anyone”,
“role”: “reader”,
“allowFileDiscovery”: false
}
],
“permissionIds”: [
“14127075236452823364”,
“03697670904459783127”,
“anyoneWithLink”
],
“folderColorRgb”: “#8f8f8f”,
“quotaBytesUsed”: “0”,
“isAppAuthorized”: true,
“linkShareMetadata”: {
“securityUpdateEligible”: false,
“securityUpdateEnabled”: true
}
}
]

Sorry, I can’t use that as it isn’t valid JSON (checked when pasted into https://jsonformatter.org)

1.

Could you re-copy/paste your output bundle JSON and add three backticks ``` before and after the code, like this:

```
input/output bundle goes here
```

2.

or use the format code button in the editor:
Screenshot_2023-10-02_191027

3.

Alternatively, you can paste and save the contents of the bundles in your text editor as a .json file, and upload it here into this discussion thread.

2 Likes
[
    {
        "kind": "drive#file",
        "id": "1qdM4qsRdFg6UBROcPIa-ckivNwUdFMVV",
        "name": "Test Person",
        "mimeType": "application/vnd.google-apps.folder",
        "starred": false,
        "trashed": false,
        "explicitlyTrashed": false,
        "parents": [
            "0B32Vj6uRRTNyQUZ5Z2FzMHZNajA"
        ],
        "spaces": [
            "drive"
        ],
        "version": "1",
        "webViewLink": "https://drive.google.com/drive/folders/1qdM4qsRdFg6UBROcPIa-ckivNwUdFMVV",
        "iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.folder+48+shared",
        "hasThumbnail": false,
        "thumbnailVersion": "0",
        "viewedByMe": false,
        "createdTime": "2023-11-07T02:04:51.351Z",
        "modifiedTime": "2023-11-07T02:04:51.351Z",
        "modifiedByMeTime": "2023-11-07T02:04:51.351Z",
        "modifiedByMe": true,
        "owners": [
            {
                "kind": "drive#user",
                "displayName": "Cristian Aguirre",
                "photoLink": "https://lh3.googleusercontent.com/a/ACg8ocIVUQxJeBf0MYZrKAWJZtudaYyVfmhuZG316uqkI3BpaHZA=s64",
                "me": true,
                "permissionId": "03697670904459783127",
                "emailAddress": "cristian@visaways.com.au"
            }
        ],
        "lastModifyingUser": {
            "kind": "drive#user",
            "displayName": "Cristian Aguirre",
            "photoLink": "https://lh3.googleusercontent.com/a/ACg8ocIVUQxJeBf0MYZrKAWJZtudaYyVfmhuZG316uqkI3BpaHZA=s64",
            "me": true,
            "permissionId": "03697670904459783127",
            "emailAddress": "cristian@visaways.com.au"
        },
        "shared": true,
        "ownedByMe": true,
        "capabilities": {
            "canAcceptOwnership": false,
            "canAddChildren": true,
            "canAddMyDriveParent": false,
            "canChangeCopyRequiresWriterPermission": false,
            "canChangeSecurityUpdateEnabled": false,
            "canChangeViewersCanCopyContent": false,
            "canComment": true,
            "canCopy": false,
            "canDelete": true,
            "canDownload": true,
            "canEdit": true,
            "canListChildren": true,
            "canModifyContent": true,
            "canModifyContentRestriction": false,
            "canModifyEditorContentRestriction": false,
            "canModifyOwnerContentRestriction": false,
            "canModifyLabels": false,
            "canMoveChildrenWithinDrive": true,
            "canMoveItemIntoTeamDrive": true,
            "canMoveItemOutOfDrive": true,
            "canMoveItemWithinDrive": true,
            "canReadLabels": false,
            "canReadRevisions": false,
            "canRemoveChildren": true,
            "canRemoveContentRestriction": false,
            "canRemoveMyDriveParent": true,
            "canRename": true,
            "canShare": true,
            "canTrash": true,
            "canUntrash": true
        },
        "viewersCanCopyContent": true,
        "copyRequiresWriterPermission": false,
        "writersCanShare": true,
        "permissions": [
            {
                "kind": "drive#permission",
                "id": "14127075236452823364",
                "type": "domain",
                "domain": "oppaus.com.au",
                "role": "writer",
                "allowFileDiscovery": true,
                "displayName": "VisaWays Australia"
            },
            {
                "kind": "drive#permission",
                "id": "03697670904459783127",
                "type": "user",
                "emailAddress": "cristian@visaways.com.au",
                "role": "owner",
                "displayName": "Cristian Aguirre",
                "photoLink": "https://lh3.googleusercontent.com/a/ACg8ocIVUQxJeBf0MYZrKAWJZtudaYyVfmhuZG316uqkI3BpaHZA=s64",
                "deleted": false,
                "pendingOwner": false
            },
            {
                "kind": "drive#permission",
                "id": "anyoneWithLink",
                "type": "anyone",
                "role": "reader",
                "allowFileDiscovery": false
            }
        ],
        "permissionIds": [
            "14127075236452823364",
            "03697670904459783127",
            "anyoneWithLink"
        ],
        "folderColorRgb": "#8f8f8f",
        "quotaBytesUsed": "0",
        "isAppAuthorized": true,
        "linkShareMetadata": {
            "securityUpdateEligible": false,
            "securityUpdateEnabled": true
        }
    }

[
    {
        "kind": "drive#file",
        "id": "1Afy8bBkWJV1VaDv6bTGoB-9mekcRU-GW",
        "name": "Test Company_Test Person",
        "mimeType": "application/vnd.google-apps.folder",
        "starred": false,
        "trashed": false,
        "explicitlyTrashed": false,
        "parents": [
            "0B32Vj6uRRTNybTI1Tm1Hby1rZ1U"
        ],
        "spaces": [
            "drive"
        ],
        "version": "1",
        "webViewLink": "https://drive.google.com/drive/folders/1Afy8bBkWJV1VaDv6bTGoB-9mekcRU-GW",
        "iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.folder+48+shared",
        "hasThumbnail": false,
        "thumbnailVersion": "0",
        "viewedByMe": false,
        "createdTime": "2023-11-07T02:04:52.437Z",
        "modifiedTime": "2023-11-07T02:04:52.437Z",
        "modifiedByMeTime": "2023-11-07T02:04:52.437Z",
        "modifiedByMe": true,
        "owners": [
            {
                "kind": "drive#user",
                "displayName": "Cristian Aguirre",
                "photoLink": "https://lh3.googleusercontent.com/a/ACg8ocIVUQxJeBf0MYZrKAWJZtudaYyVfmhuZG316uqkI3BpaHZA=s64",
                "me": true,
                "permissionId": "03697670904459783127",
                "emailAddress": "cristian@visaways.com.au"
            }
        ],
        "lastModifyingUser": {
            "kind": "drive#user",
            "displayName": "Cristian Aguirre",
            "photoLink": "https://lh3.googleusercontent.com/a/ACg8ocIVUQxJeBf0MYZrKAWJZtudaYyVfmhuZG316uqkI3BpaHZA=s64",
            "me": true,
            "permissionId": "03697670904459783127",
            "emailAddress": "cristian@visaways.com.au"
        },
        "shared": true,
        "ownedByMe": true,
        "capabilities": {
            "canAcceptOwnership": false,
            "canAddChildren": true,
            "canAddMyDriveParent": false,
            "canChangeCopyRequiresWriterPermission": false,
            "canChangeSecurityUpdateEnabled": false,
            "canChangeViewersCanCopyContent": false,
            "canComment": true,
            "canCopy": false,
            "canDelete": true,
            "canDownload": true,
            "canEdit": true,
            "canListChildren": true,
            "canModifyContent": true,
            "canModifyContentRestriction": false,
            "canModifyEditorContentRestriction": false,
            "canModifyOwnerContentRestriction": false,
            "canModifyLabels": false,
            "canMoveChildrenWithinDrive": true,
            "canMoveItemIntoTeamDrive": true,
            "canMoveItemOutOfDrive": true,
            "canMoveItemWithinDrive": true,
            "canReadLabels": false,
            "canReadRevisions": false,
            "canRemoveChildren": true,
            "canRemoveContentRestriction": false,
            "canRemoveMyDriveParent": true,
            "canRename": true,
            "canShare": true,
            "canTrash": true,
            "canUntrash": true
        },
        "viewersCanCopyContent": true,
        "copyRequiresWriterPermission": false,
        "writersCanShare": true,
        "permissions": [
            {
                "kind": "drive#permission",
                "id": "14127075236452823364",
                "type": "domain",
                "domain": "oppaus.com.au",
                "role": "writer",
                "allowFileDiscovery": true,
                "displayName": "VisaWays Australia"
            },
            {
                "kind": "drive#permission",
                "id": "03697670904459783127",
                "type": "user",
                "emailAddress": "cristian@visaways.com.au",
                "role": "owner",
                "displayName": "Cristian Aguirre",
                "photoLink": "https://lh3.googleusercontent.com/a/ACg8ocIVUQxJeBf0MYZrKAWJZtudaYyVfmhuZG316uqkI3BpaHZA=s64",
                "deleted": false,
                "pendingOwner": false
            },
            {
                "kind": "drive#permission",
                "id": "anyoneWithLink",
                "type": "anyone",
                "role": "reader",
                "allowFileDiscovery": false
            }
        ],
        "permissionIds": [
            "14127075236452823364",
            "03697670904459783127",
            "anyoneWithLink"
        ],
        "folderColorRgb": "#8f8f8f",
        "quotaBytesUsed": "0",
        "isAppAuthorized": true,
        "linkShareMetadata": {
            "securityUpdateEligible": false,
            "securityUpdateEnabled": true
        }
    }
]

Hey, @samliew Pasted it here through format code.

First - Output bundle for Applicant applicant filter.
Second - Output bundle for Sponsor Filter

Please let me know if this is usable now or need another materials. Really appreciate your help!

From what I can see, there is no identifying/consistent difference between the Applicant and Sponsor bundles, so you can’t create filters with them?

(How will you know if the bundle came from the Applicant or Sponsor?)

You might need to create one Custom Webhook for Applicant in one Scenario for Applicants, and a separate Custom Webhook for Sponsor in one Scenario for Sponsor.

Unless you provided the wrong output bundles (the Google Drive module) - you should provide the two output bundles for the Trigger module instead.

2 Likes

Hey @aamag - How about something along these lines. Use the Pipedrive CRM New Deal Event which will trigger when a deal is added, updated or deleted. Then add a filter that maybe just looks for updated events (i am not sure of you exact requirements), and as @DavidGurr_Make suggested, compare the previous value of the Contact Type field to the current value.

blueprint.json (41.3 KB)

3 Likes

Hi @adamturl It’s a person event not a deal…

Hi. @samliew It’s really working fine. It creates folder in GDrive. Just the issue is the filter. And I really can’t figure out how to create it. Here’s what I see. If I can just fix this I think it will work. I don’t know how to pull exactly the Applicant or Sponsor choice. This it what it only shows. But at the moment when we I choose applicant or sponsor as choice in PD it create a folder on both A & S in Gdrive. Because I think it’s just the filter that is messed up.

@DavidGurr_Make @adamturl

@aamag

Looks like you need an “and” filter so it will only set it when Current <> Pevious and when Current = the relevant choice.

I’m not familiar with Pipedrive but it looks like your data is coming in as JSONformat is that right?

If so I suspect you’re best bet will be to parse it into an array first (parseJSON) and then use get and map to extract the data you want to compare.

Cheers

Simon

2 Likes

I don’t believe any JSON parsing is necessary …

You’re going to need THREE filters:

  1. On the path from the New Person Event to the Router. This will only allow execution to continue if the Option Label has been changed between the Previous value and the Current value.
  2. (and 3) On the paths from the Router. Here you’re going to allow execution to continue only if the Current Option Label is the value you’re looking for.

So for 1, the Condition will be:

Current: Contact Type (custom): Option Label
Text operators: Not equal to
Previous: Contact Type (custom): Option Label

For 2 and 3, the Condition will be:
Current: Contact Type (custom): Option Label
Text operators: Equal to
Applicant (or Sponsor as applicable)

You don’t have to manually type Current: Contact Type (custom): Option Label or Previous: Contact Type (custom): Option Label - just select them from the list you showed in your last screenshot.

3 Likes

@DavidGurr_Make

You’re right, I’m being a dullard :man_facepalming:

As you say the filter setup you suggest stops the non-changing operations going any further than necessary so it’s going to save on operations and make things simpler.

I’ll get my coat :slight_smile:

In my defence it was very early and I hadn’t had coffee yet :laughing:

Cheers

Simon

No worries, we’ve all been there :sleeping: :alarm_clock: :coffee:

3 Likes

Hi @DavidGurr_Make I followed these steps and it finally fixed it! Thank you so much.

Is there any materials you can learn on advanced automations? Thanks,again.

2 Likes

@aamag you’re very welcome!

The best resource is the free Make Academy. This includes a series of courses and modules that start with easy concepts and then increase in complexity.

3 Likes