Pipedrive

Support Center

Email API : how to send in deals using a web form

Last Updated: Oct 23, 2014 05:48AM PDT
Email API gives your company a special email address you can use to automate lead generation and adding of new contacts and organizations.
Whenever a formatted email is sent to the email API target address, it is parsed by Pipedrive and required actions will be taken.

1: Syntax
2: Canned formats
2.1: Basic deal format
2.2: Person only deal format
2.3: Stage/pipeline specific deal format
3: Log
4: Rest API
 

1: Syntax


The email API takes in a JSON-formatted email. The subject of the email is not used but the body of the email should be a valid JSON with any of the following data structures:

Note: Formatting is obviously important, and MUST BE DONE IN PLAIN TEXT FORM

Below, is a basic format. Let's go over what each field means.
 
	{
    "item_type": "deal", < Defines the import type. This can be deal, person, or organization
    "stage_id": "11", < Optional. Defines what stage in what pipeline you're importing a deal.
    "title": "Title of the deal", < Defines the title of the imported deal
    "organization": "Organization Name", < Links deal and person to an organization
    "value": "110", < Defines the number of currency units with the deal
    "currency": "USD", < Defines the currency being used. So in this example it's $110
    "owner": "pipedrive-user@email.com", < Who in your company owns the deal
    "visible_to": "0", < Who sees the deal. 0 is everyone, 1 is owner, 2 is followers only
    "person": { < This is just making sure the info to follow, is attached to the contact 
        "name": "John Doe", < Name of the Person
        "email": "api-person@org.com", < Defines the email of the Person
        "organization": "Organization Name", < Defines the Organization to link to the Person
        "phone": "12345656" < Defines the phone number of the Person
    }
}

______________________________________________________

2: Canned formats


These are some canned formats that you can use every day.
They still require your input, but these will give you a better idea of how to use this feature.
 

2.1. Basic deal format


Use this format if you'd like your deals to simply land in the first stage of your first pipeline.

See the following example and note that: 
  • Black Text is standard and does not change.
  • Green Text are simply examples; means that it's up to you to define the value of the fields.
 
	{
    "item_type": "deal",
    "title": "Title of the deal",
    "organization": "Organization Name",
    "value": "110",
    "currency": "USD",
    "owner": "pipedrive-user@email.com",
    "visible_to": "0",
    "person": {
        "name": "John Doe",
        "email": "api-person@org.com",
        "organization": "Organization Name",
        "phone": "12345656"
    }
}

______________________________________________________
 

2.2. Person only deal format



Use this format if your deals need only to be linked to People, and no Organizations need to be defined.
Notice the only difference between this format and the Basic Format is that 
"organization": "Organization Name" is removed.

See the following example and note that: 
  • Black Text is standard and does not change.
  • Green Text are simply examples; means that it's up to you to define the value of the fields.
 
	{
    "item_type": "deal",
    "title": "Title of the deal",
    "value": "110",
    "currency": "USD",
    "owner": "pipedrive-user@email.com",
    "visible_to": "0",
    "person": {
        "name": "John Doe",
        "email": "api-person@org.com",
        "phone": "12345656"
    }
}


______________________________________________________

2.3. Stage/pipeline specific deal format:


Use this format if you'd like each deal to be placed into a specific stage of a specific pipeline. This requires a little more work, but all that is needed is your "stage ID".

To get your Stage ID:
  1. Navigate to Settings > Pipelines.
  2. Find the stage in whichever pipeline you want, and hover the mouse over this stage. 
    Then look at the browser status bar in the bottom of the page. The number in the end of the URL is the Stage ID.

See example below:



So in this example, our Stage ID is 11. Below is an example of how this stage ID is added to the Basic Format.
See the following example and note that: 
  • Black Text is standard and does not change.
  • Green Text are simply examples; means that it's up to you to define the value of the fields.
 
	{
    "item_type": "deal",
    "stage_id": "11",
    "title": "Title of the deal",
    "organization": "Organization Name",
    "value": "110",
    "currency": "USD",
    "owner": "pipedrive-user@email.com",
    "visible_to": "0",
    "person": {
        "name": "John Doe",
        "email": "api-person@org.com",
        "organization": "Organization Name",
        "phone": "12345656"
    }
}


______________________________________________________
 

3: Log

 
You can see all your email API requests in the email API log. To access the log:
  1. Navigate to Settings > Email API.
  2. Open the Log tab. You can see all email API requests, their status, sender, subject, body and send time in the log.
 
If the emails do not appear in the log:
  • Make sure the sender's email address is in the allowed addresses list on the Set-up tab;
  • Check if you have sent the email to the correct address.

If the email is shown as failed:
  • Make sure the email body conforms to the email API syntax;
  • Make sure you are sending a plain-text email that does not contain any extra metadata, such as rich formatting.
 

4: Rest API


If you need much more raw power you might want to consider the REST API. It requires more development on your end, but you'll be able to do many more things with it. The email API is good for quickly adding deals, but not much else. 

Read about Rest API: https://developers.pipedrive.com/v1
Was it helpful?
  • We offer free email and phone support for all registered users.

    If you have any questions or issues, feel free to get in touch with us via email info@pipedrive.com

    or via phone:
    +1-855-979-1414 for US toll free,
    +44-800-808-5614 for UK toll free,
    +1-438-793-3907 for Canada

    You can also use the 'Help and Feedback' button inside the Pipedrive application so we can get all your credentials automatically.

    Pipedrive support works weekdays from 9 a.m. - 3 a.m. GMT+3 or...

    - 7 a.m.- 1 a.m. in London
    - 11 p.m. - 5 p.m. in Los Angeles
    - 3 a.m. - 9 p.m. in Rio de Janeiro
    ---------------------------------------------- Oferecemos suporte gratuito por e-mail e telefone a todos os usuários registrados.

    Se tiver dúvidas ou problemas, entre em contato conosco via e-mail no suporte@pipedrive.com

    ou via telefone:
    +1-855-979-1414 (ligação gratuita nos EUA)
    +44-800-808-5614 (ligação gratuita no Reino Unido)
    +1-438-793-3907 (Canadá)

    +55(41)3907-5403(Brasil)

    Você também pode usar o botão 'Ajuda e feedback' dentro do aplicativo Pipedrive para podermos obter todas as suas credenciais automaticamente.

    O suporte do Pipedrive funciona nos dias úteis das 9 às 00h GMT +3 ou...

    - das 7 à 22h em Londres

    - das 23 às 14h em Los Angeles

    - das 3 às 18h no Rio de Janeiro

assistly@pipedrive.com
http://assets02.desk.com/
false
pipedrive
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete