Function to Add an activity on pipedrive.
activities.add(subject, type, done = NULL, due_date = NULL,
due_time = NULL, duration = NULL, user_id = NULL, deal_id = NULL,
person_id = NULL, participants = NULL, org_id = NULL,
note = NULL, api_token = NULL, company_domain = "api",
return_type = c("complete", "boolean"))
Subject of the activity
Type of the activity. This is in correlation with the key_string parameter of ActivityTypes.
Whether the activity is done or not. 0 = Not done, 1 = Done This field has the following domains: (0; 1)
Due date of the activity. Format: YYYY-MM-DD
Due time of the activity in UTC. Format: HH:MM
Duration of the activity. Format: HH:MM
ID of the user whom the activity will be assigned to. If omitted, the activity will be assigned to the authorized user.
ID of the deal this activity will be associated with
ID of the person this activity will be associated with
List of multiple persons (participants) this activity will be associated with. If omitted, single participant from person_id field is used. It requires a structure as follows: [person_id:1,primary_flag:true] this field must be a JSON.
ID of the organization this activity will be associated with
Note of the activity (HTML format)
To validate your requests, you'll need your api_token - this means that our system will need to know who you are and be able to connect all actions you do with your chosen Pipedrive account. Have in mind that a user has a different api_token for each company. Please access the following link for more information: <https://pipedrive.readme.io/docs/how-to-find-the-api-token?utm_source=api_reference>
How to get the company domain: <https://pipedrive.readme.io/docs/how-to-get-the-company-domain>
the default return is an object List with all informations of process, or you can set boolean (TRUE = success, FALSE = error)
customizable return, the default is an object List
# NOT RUN {
activities.add(subject='e.g.',type='e.g.',api_token='token',company_domain='exp')
# }
Run the code above in your browser using DataLab