Answers.Body: <p>The trigger is potentially not fired because the import process does not fire the corresponding <strong>post</strong> hook for the address. So Civirules simply does not &quot;see&quot; that an address is created. If that is true you could say that it is not so much a problem of Civirules but more a problem of the import, although that does not help you.</p>
  <p>That might be the case but you could try with a &quot;addess is changed&quot; trigger to see if that works?</p>
  <p>If you are familiar with debugging it is pretty straightforward to check if the Address <strong>post</strong> hook is fired. Are you?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-24T15:28:27.297Z
Answers.Text: no, I'm not yet familiar with debugging civiCRM
Answers.UserDisplayName: mplh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-24T15:06:34.647Z
Answers.LastActivityDate: 2023-01-24T15:06:34.647Z
Answers.UserDisplayName: ErikH - CiviCooP
Body: <p>I set up a CiviRule that when an Address is added for a Contact some relationships are created depending on the zip code for that Contact.</p>
  <p>Now I create some Contacts via an import of a CSV file. I assign the correct rows to be mapped into the Home Address and I can see the correct data in the Contact after importing.</p>
  <p>~Unfortunately, the Trigger &quot;Address is added&quot; in CiviRule is not triggered, and the rule is not executed.~</p>
  <p>How can I make sure that the rule is triggered correctly?</p>
  <p>I found out that the Trigger &quot;Contact of any type is added&quot; is in fact triggered during the import. but for that one I cannot add a &quot;Field value filter&quot; for a field that belongs to the address (eg. the zip code).</p>
  <p>Any ideas on that?</p>
  <p>UPDATE:
  I tried to reproduce the behavior, and now &quot;Address is added&quot; was triggered. My working hypothesis is, that I imported a contact that was already there and thus (via duplicates) was only updated, but no adress really added. I close this question as answered.</p>
  
Tags: <contacts><import><civirules><csv>
Title: How to import contact via CSV and trigger CiviRule for Trigger "Address is added"
ThreadText: # How to import contact via CSV and trigger CiviRule for Trigger "Address is added"
  
  (Asked by: username_0 on 2023-01-24)
  
  I set up a CiviRule that when an Address is added for a Contact some relationships are created depending on the zip code for that Contact.
  
  Now I create some Contacts via an import of a CSV file. I assign the correct rows to be mapped into the Home Address and I can see the correct data in the Contact after importing.
  
  ~Unfortunately, the Trigger "Address is added" in CiviRule is not triggered, and the rule is not executed.~
  
  How can I make sure that the rule is triggered correctly?
  
  I found out that the Trigger "Contact of any type is added" is in fact triggered during the import. but for that one I cannot add a "Field value filter" for a field that belongs to the address (eg. the zip code).
  
  Any ideas on that?
  
  UPDATE:
  I tried to reproduce the behavior, and now "Address is added" was triggered. My working hypothesis is, that I imported a contact that was already there and thus (via duplicates) was only updated, but no adress really added. I close this question as answered.
  
  **Tags:** contacts, import, civirules, csv
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-01-24. Score: 1 | Accepted answer
  
  The trigger is potentially not fired because the import process does not fire the corresponding **post** hook for the address. So Civirules simply does not "see" that an address is created. If that is true you could say that it is not so much a problem of Civirules but more a problem of the import, although that does not help you.
  
  That might be the case but you could try with a "addess is changed" trigger to see if that works?
  
  If you are familiar with debugging it is pretty straightforward to check if the Address **post** hook is fired. Are you?
  
  > **Comments:**
  > **username_0**: no, I'm not yet familiar with debugging civiCRM  
  
  ---
  
  