Question

Inserting Data in the User Field

  • 24 February 2022
  • 6 replies
  • 164 views

Userlevel 1
Badge

I have a questionnaire that I have people fill out in acuity. The data from acquity gives me two pieces of information: where the lead came from and who was my lead specialist who got the appointment done. 

In monday, both fields are set as people fields. 

Is there a way to run a function JUST to basically create a new variable and assign a value to it? Something like… Call rep = # and lead Source = X. 

So at the “create new item” stage I have both Monday People Variables assigned and can just be plugged in? 

I know I can do paths and say “If Appointment Type = Alexa” and then create the ‘create item” but I don’t want to have to create 6 different Monday rows for the same exact “create new item” with just two different fields. 

So basically, is there a way to run some sort of function that will set two brand new variables for me so I dont have to create 6 different paths for basically the SAME Monday “Create Item”


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

6 replies

Userlevel 7
Badge +14

Hi @alexadagostino 

Please post screenshots with example data points that you are working with from Acuity and the desired output from the Zap transformation.

 

Code steps can be used to do custom logic and data transformation: https://zapier.com/apps/code/help

Userlevel 7
Badge +14

@alexadagostino 

Keep in mind, that if you are going to dynamically map the Person field, then you will need to use the internal Monday IDs for the Person.

EXAMPLE

 

Userlevel 1
Badge

Yes that is what I need @Troy Tessalone 

Example acuity data below. Basically I need to build something that says:

If 
type contains “Linkedin” then assign Lead Specialist = 21345 (the Monday people ID of the person)
and
If calendar = “Tonia” then assign Sales Rep = 123456 (the Monday People ID of Tonia)

Example data:

firstName

Alexa

lastName

D.

phone

xxx-xxx-xxxx

email

xxxx@gmail.com

date

March 25, 2022

time

12:00pm

endTime

12:30pm

dateCreated

February 24, 2022

datetimeCreated

2022-02-24T11:42:31-0600

datetime

2022-03-25T12:00:00-0400

price

0.00

priceSold

0.00

paid

no

amountPaid

0.00

type

Alexa 30-Min Linkedin Discovery Call

appointmentTypeID

24920223

classID

null

addonIDs

category

duration

30

calendar

Alexa D.

 

This post has been edited by a moderator to remove personal information. Please remember that this is a public forum and to remove any sensitive information prior to posting. 

Userlevel 7
Badge +14

@alexadagostino 

Try this Code configuration

 

 

CODE

let Type = inputData.Type;
let Cal = inputData.Cal;
let Person = "";

if (Cal.includes("Tonia")) {
Person = "123456";
}
if (Type.includes("Linkedin")) {
Person = "21345";
}

output = [{Person, Cal, Type}];

 

Userlevel 1
Badge

@Troy Tessalone you are the most incredible human being! Thank you!!! Almost there… But getting an error on this. Can you spot quickly what it is?

 

let type = inputData.leadSpecialist;
let calendar = inputData.salesRep;
let leadSpecialist = "";
let salesRep = "";

if (type.includes("Linkedin")) {
  leadSpecialist = "25573876";
}
if (type.includes("IG") OR type.includes("Instagram")) {
  leadSpecialist = "17745178";
}
if (calendar.includes("Tonia")) {
  salesRep = "18006596";
}
if (calendar.includes("Susie")) {
  if (type.includes("IG") OR type.includes("Instagram")) {
      leadSpecialist = "26765165";
      salesRep = "22592831";
    }
 
}
if (calendar.includes("Alexa")) {
  salesRep = "17744911";
}

output = [{leadSpecialist, salesRep}];

Userlevel 7
Badge +14

Hi @alexadagostino

Change OR to ||