Use case Automation - Send note field from deal to non deal related email automatically when deal ch

Ricardo Machado
Ricardo Machado Member Posts: 5
edited July 2022 in Workflow Automation #1

When you integrate webforms and creates a lead, and then the lead is automatically converter to a deal, the form data is held in a note. My need is that after I validade the deal data from the lead, I move the deal stage to the next and I want to send to a non deal related email the content of the deal note ( that contains de  submitted lead form data). The setup is deal enters from webform and creates a deal automatically. The user validates de form submission content in the note that is created, them moves the deal to other stage mannually. When the deal stage changes to that specific stage an email is sent to a non deal related email with the full content of the note that has the lead form data. 

Is this possible?

Comments

  • Nancy Vamvakas
    Nancy Vamvakas Member Posts: 30
    First Comment
    edited February 2022 #2

    I don't use webforms but could you create a custom field, collect the information currently targeted for the note and then pick that content up with the template manager which allows the insertion of custom field content?

    Automation of the mail template select/create mail item/send actions could be triggered and executed with the use of the PD automations engine. 

    Just given me some ideas in our own PD context. .. thanks! 👍

    (I hope I understood your scenario correctly)

  • Bobby_37242
    Bobby_37242 Member Posts: 23
    5 Up Votes First Anniversary Name Dropper Photogenic
    edited February 2022 #3

    Hey Ricardo,

    I just tried this with the "Email Action" in Workflow Automation, everything works up until the content of the email. It looks like you can't grab the deal notes fields... only other system fields and custom fields.

    It is possible, below I will list a few options on how to do it.

    Some options I recommend:
    1. (Easiest Option - custom field and workflow automation to send email)
    Using Pipedrive webforms and workflow automation... send that data you want to a custom field instead of the notes field.  For example, create a long text custom field called "Client Request". Then you can make a workflow automation send an email containing that custom field data to a unique email address once a deal hits a certain stage automatically. 

    The exact steps in the workflow automation are 
    Trigger = Deal Change
    Condition = Deal Stage "has changed" to "[your approved stage that you mentioned in the post]"
    Action = Email/Send email
              To = [that unique email you wanted]
              Email Subject = [anything you want as a subject]
              Body = drop in that custom field you created here, in the example above I used "Client Request".

    Then when complete before saving, if you want this to work for everyone on your team choose "Triggered by any user" right next to the save button, if you only want it to work when you move deals to that stage leave it on "Triggered by me only". Then Active.

    2. (Intermediate Option - create a new form then do #1)
    Use a different form platform (jotform.com/typeform.com) if webforms won't allow you to send data to a custom field. I've never used the Pipedrive webforms so I'm not sure its capabilities, but dedicated form platforms generally give you more options. Then use the workflow automation mentioned in #1 above.

    3. (Hardest Option - webhook and api, involves development knowledge) 
    If you want to use notes and not a custom field... you need to use webhooks and the API for this so that emails go out in seconds after the stage changes. The following procedures can all be achieved using lightweight automation platforms Zapier.com or Integromat.com (I prefer integromat). 

    The process will be, create an updated.deal webhook and create a filter in the place you are listening for webhooks to only pass payloads where the deal has changed stage to that exact stage you want (payloads give you "previous" and "current" data to compare deal stages). 

    Then, only if there is 1 activity/note (there is a field to check this called notes_count), you will get the deal ID from the webhook payload and hit the deals API endpoint to get the single note attached to that particular deal. 
    If there is more than 1 note on your deals you will need to use the notes API endpoint, you'll want to use deal id and sort params so you get the notes for the correct deal ID and sort based on what note you want.

    Then you dump that note data into an email template with that note data as variables filled in and send it with your platform of choice (I use Gmail inside Integromat for this part).

    Links to Pipedrive docs for this option
    - Link to docs about how to use webhooks https://pipedrive.readme.io/docs/guide-for-webhooks
    - Link to docs about getting a deal data (only use this if your deals have 1 note, it will give you a "note" in the "last_activity" object) https://developers.pipedrive.com/docs/api/v1/Deals#getDeal
    - Link to docs about getting multiple notes on a deal (use this if you need to get multiple notes or want to get the first note out of many) https://developers.pipedrive.com/docs/api/v1/Notes#getNotes

    4. (App Marketplace option)
    You can also pick one of the top email marketing platforms in the marketplace to achieve a similar result with potentially less custom work. I would check the email marketing or marketing automation categories for what is already built https://marketplace.pipedrive.com/

  • Ricardo Machado
    Ricardo Machado Member Posts: 5
    edited August 2021 #4
    Bobby said:

    Hey Ricardo,

    I just tried this with the "Email Action" in Workflow Automation, everything works up until the content of the email. It looks like you can't grab the deal notes fields... only other system fields and custom fields.

    It is possible, below I will list a few options on how to do it.

    Some options I recommend:
    1. (Easiest Option - custom field and workflow automation to send email)
    Using Pipedrive webforms and workflow automation... send that data you want to a custom field instead of the notes field.  For example, create a long text custom field called "Client Request". Then you can make a workflow automation send an email containing that custom field data to a unique email address once a deal hits a certain stage automatically. 

    The exact steps in the workflow automation are 
    Trigger = Deal Change
    Condition = Deal Stage "has changed" to "[your approved stage that you mentioned in the post]"
    Action = Email/Send email
              To = [that unique email you wanted]
              Email Subject = [anything you want as a subject]
              Body = drop in that custom field you created here, in the example above I used "Client Request".

    Then when complete before saving, if you want this to work for everyone on your team choose "Triggered by any user" right next to the save button, if you only want it to work when you move deals to that stage leave it on "Triggered by me only". Then Active.

    2. (Intermediate Option - create a new form then do #1)
    Use a different form platform (jotform.com/typeform.com) if webforms won't allow you to send data to a custom field. I've never used the Pipedrive webforms so I'm not sure its capabilities, but dedicated form platforms generally give you more options. Then use the workflow automation mentioned in #1 above.

    3. (Hardest Option - webhook and api, involves development knowledge) 
    If you want to use notes and not a custom field... you need to use webhooks and the API for this so that emails go out in seconds after the stage changes. The following procedures can all be achieved using lightweight automation platforms Zapier.com or Integromat.com (I prefer integromat). 

    The process will be, create an updated.deal webhook and create a filter in the place you are listening for webhooks to only pass payloads where the deal has changed stage to that exact stage you want (payloads give you "previous" and "current" data to compare deal stages). 

    Then, only if there is 1 activity/note (there is a field to check this called notes_count), you will get the deal ID from the webhook payload and hit the deals API endpoint to get the single note attached to that particular deal. 
    If there is more than 1 note on your deals you will need to use the notes API endpoint, you'll want to use deal id and sort params so you get the notes for the correct deal ID and sort based on what note you want.

    Then you dump that note data into an email template with that note data as variables filled in and send it with your platform of choice (I use Gmail inside Integromat for this part).

    Links to Pipedrive docs for this option
    - Link to docs about how to use webhooks https://pipedrive.readme.io/docs/guide-for-webhooks
    - Link to docs about getting a deal data (only use this if your deals have 1 note, it will give you a "note" in the "last_activity" object) https://developers.pipedrive.com/docs/api/v1/Deals#getDeal
    - Link to docs about getting multiple notes on a deal (use this if you need to get multiple notes or want to get the first note out of many) https://developers.pipedrive.com/docs/api/v1/Notes#getNotes

    4. (App Marketplace option)
    You can also pick one of the top email marketing platforms in the marketplace to achieve a similar result with potentially less custom work. I would check the email marketing or marketing automation categories for what is already built https://marketplace.pipedrive.com/

    Thank you this is what I was looking for. I collect all the other fields in separate fields, the note is created automatically with all fields, so this was the easiest way. The email sent has to contain both contact fields as well as deal fields, I believe this is possible, so i can do this by fetching fields from the individual fields. Will update later after I set this all up. Thank you!

  • Ricardo Machado
    Ricardo Machado Member Posts: 5
    edited August 2021 #5

    I don't use webforms but could you create a custom field, collect the information currently targeted for the note and then pick that content up with the template manager which allows the insertion of custom field content?

    Automation of the mail template select/create mail item/send actions could be triggered and executed with the use of the PD automations engine. 

    Just given me some ideas in our own PD context. .. thanks! 👍

    (I hope I understood your scenario correctly)

    Thank you!

  • Ricardo Machado
    Ricardo Machado Member Posts: 5
    edited August 2021 #6
    Bobby said:

    Hey Ricardo,

    I just tried this with the "Email Action" in Workflow Automation, everything works up until the content of the email. It looks like you can't grab the deal notes fields... only other system fields and custom fields.

    It is possible, below I will list a few options on how to do it.

    Some options I recommend:
    1. (Easiest Option - custom field and workflow automation to send email)
    Using Pipedrive webforms and workflow automation... send that data you want to a custom field instead of the notes field.  For example, create a long text custom field called "Client Request". Then you can make a workflow automation send an email containing that custom field data to a unique email address once a deal hits a certain stage automatically. 

    The exact steps in the workflow automation are 
    Trigger = Deal Change
    Condition = Deal Stage "has changed" to "[your approved stage that you mentioned in the post]"
    Action = Email/Send email
              To = [that unique email you wanted]
              Email Subject = [anything you want as a subject]
              Body = drop in that custom field you created here, in the example above I used "Client Request".

    Then when complete before saving, if you want this to work for everyone on your team choose "Triggered by any user" right next to the save button, if you only want it to work when you move deals to that stage leave it on "Triggered by me only". Then Active.

    2. (Intermediate Option - create a new form then do #1)
    Use a different form platform (jotform.com/typeform.com) if webforms won't allow you to send data to a custom field. I've never used the Pipedrive webforms so I'm not sure its capabilities, but dedicated form platforms generally give you more options. Then use the workflow automation mentioned in #1 above.

    3. (Hardest Option - webhook and api, involves development knowledge) 
    If you want to use notes and not a custom field... you need to use webhooks and the API for this so that emails go out in seconds after the stage changes. The following procedures can all be achieved using lightweight automation platforms Zapier.com or Integromat.com (I prefer integromat). 

    The process will be, create an updated.deal webhook and create a filter in the place you are listening for webhooks to only pass payloads where the deal has changed stage to that exact stage you want (payloads give you "previous" and "current" data to compare deal stages). 

    Then, only if there is 1 activity/note (there is a field to check this called notes_count), you will get the deal ID from the webhook payload and hit the deals API endpoint to get the single note attached to that particular deal. 
    If there is more than 1 note on your deals you will need to use the notes API endpoint, you'll want to use deal id and sort params so you get the notes for the correct deal ID and sort based on what note you want.

    Then you dump that note data into an email template with that note data as variables filled in and send it with your platform of choice (I use Gmail inside Integromat for this part).

    Links to Pipedrive docs for this option
    - Link to docs about how to use webhooks https://pipedrive.readme.io/docs/guide-for-webhooks
    - Link to docs about getting a deal data (only use this if your deals have 1 note, it will give you a "note" in the "last_activity" object) https://developers.pipedrive.com/docs/api/v1/Deals#getDeal
    - Link to docs about getting multiple notes on a deal (use this if you need to get multiple notes or want to get the first note out of many) https://developers.pipedrive.com/docs/api/v1/Notes#getNotes

    4. (App Marketplace option)
    You can also pick one of the top email marketing platforms in the marketplace to achieve a similar result with potentially less custom work. I would check the email marketing or marketing automation categories for what is already built https://marketplace.pipedrive.com/

    Its not enough option 1. I need more fields than the ones available from the contact, like birthdate, custom person fields and address to name a few. Maybe i can achieve this if somehow i can import these person fields to the deal... or again send the note, as the note that comes from the form submition to the deal has all fields from the form and their respective value. To give more context, i am capturing insurance leads, so tons of info are comming to the form, and then i send that info compiled by mail to the insurance company to get a quote. they require person fields to. The idea was to automate, but i can also do it mannually, if its not possible... or i'm missing something.... and i also need to identify the source, of the contact person (by wich form it came from)... i have one form for insurance type and loads of custom fields in contact and deal. The point was to validade the data created automatically from form subtion (creates a deal in the first stage of he pipeline), with the fioelds populated by the webform, but the birthdate goes to contact person, and the insurance data goes to the deal, and the email sent automatically by changing stage only recognizes a few fields of the contact person....

  • Bobby_37242
    Bobby_37242 Member Posts: 23
    5 Up Votes First Anniversary Name Dropper Photogenic
    edited August 2021 #7
    Bobby said:

    Hey Ricardo,

    I just tried this with the "Email Action" in Workflow Automation, everything works up until the content of the email. It looks like you can't grab the deal notes fields... only other system fields and custom fields.

    It is possible, below I will list a few options on how to do it.

    Some options I recommend:
    1. (Easiest Option - custom field and workflow automation to send email)
    Using Pipedrive webforms and workflow automation... send that data you want to a custom field instead of the notes field.  For example, create a long text custom field called "Client Request". Then you can make a workflow automation send an email containing that custom field data to a unique email address once a deal hits a certain stage automatically. 

    The exact steps in the workflow automation are 
    Trigger = Deal Change
    Condition = Deal Stage "has changed" to "[your approved stage that you mentioned in the post]"
    Action = Email/Send email
              To = [that unique email you wanted]
              Email Subject = [anything you want as a subject]
              Body = drop in that custom field you created here, in the example above I used "Client Request".

    Then when complete before saving, if you want this to work for everyone on your team choose "Triggered by any user" right next to the save button, if you only want it to work when you move deals to that stage leave it on "Triggered by me only". Then Active.

    2. (Intermediate Option - create a new form then do #1)
    Use a different form platform (jotform.com/typeform.com) if webforms won't allow you to send data to a custom field. I've never used the Pipedrive webforms so I'm not sure its capabilities, but dedicated form platforms generally give you more options. Then use the workflow automation mentioned in #1 above.

    3. (Hardest Option - webhook and api, involves development knowledge) 
    If you want to use notes and not a custom field... you need to use webhooks and the API for this so that emails go out in seconds after the stage changes. The following procedures can all be achieved using lightweight automation platforms Zapier.com or Integromat.com (I prefer integromat). 

    The process will be, create an updated.deal webhook and create a filter in the place you are listening for webhooks to only pass payloads where the deal has changed stage to that exact stage you want (payloads give you "previous" and "current" data to compare deal stages). 

    Then, only if there is 1 activity/note (there is a field to check this called notes_count), you will get the deal ID from the webhook payload and hit the deals API endpoint to get the single note attached to that particular deal. 
    If there is more than 1 note on your deals you will need to use the notes API endpoint, you'll want to use deal id and sort params so you get the notes for the correct deal ID and sort based on what note you want.

    Then you dump that note data into an email template with that note data as variables filled in and send it with your platform of choice (I use Gmail inside Integromat for this part).

    Links to Pipedrive docs for this option
    - Link to docs about how to use webhooks https://pipedrive.readme.io/docs/guide-for-webhooks
    - Link to docs about getting a deal data (only use this if your deals have 1 note, it will give you a "note" in the "last_activity" object) https://developers.pipedrive.com/docs/api/v1/Deals#getDeal
    - Link to docs about getting multiple notes on a deal (use this if you need to get multiple notes or want to get the first note out of many) https://developers.pipedrive.com/docs/api/v1/Notes#getNotes

    4. (App Marketplace option)
    You can also pick one of the top email marketing platforms in the marketplace to achieve a similar result with potentially less custom work. I would check the email marketing or marketing automation categories for what is already built https://marketplace.pipedrive.com/

    Ah, I didn't know you would need more person fields.

    I just tested option one and there is actually a way to get more person fields with option 1 instead of going full custom option 3!

    Before the final action step, add the Action called Update person fields. Then don't actually change anything on the person, this is just how we will cheat the automation to bring in all person fields related to that deal. This will let you reference this previous step in the final step when you are adding all the custom fields into the email.

    The exact steps in the workflow automation are 
    1 Trigger = Deal Change
    2 Condition = Deal Stage "has changed" to "[your approved stage that you mentioned in the post]"
    3 Action =  Person/ Update Person
              Fields = don't select anything here
              Person = Deal Contact Person from step 1
    4 Action = Email/Send email
              To = [that unique email you wanted]
              Email Subject = [anything you want as a subject]
              Body = drop in custom or system fields for the deal or the related person here.


    This is great news, I actually had no idea you could add more than 1 Action in these native automation workflows... I attached a screenshot below as a visual of how it should look.
     

    image
    Side note, if you want to make sure this doesn't fire multiple times you would want to add a custom field in this workflow that also gets updated with a value the first time it runs that will filter out at the top as an additional condition for if you accidentally move it in and out of that stage. If you need any further help I'm available for a free 20-minute zoom call to move you forward on this, check my profile page for a link.