diff --git a/gc-notion/gcn-create-relation.php b/gc-notion/gcn-create-relation.php new file mode 100644 index 000000000..7deb75b80 --- /dev/null +++ b/gc-notion/gcn-create-relation.php @@ -0,0 +1,87 @@ + array( + array( + 'id' => $page_id, + ), + ), + ); + + return $page_data; + }, 10, 4 + ); + +} + +/** + * Usage Example: + */ +gcn_create_relation( + array( + /** + * Change this to your form ID. + */ + 'form_id' => 1, + /** + * Change this to the ID of the feed you want to use. + * You can technically omit this to apply to all feeds + * for the form, but it's recommended to specify it for clarity. + */ + 'feed_id' => 2, + /** + * Change this to the ID of the field which holds the Notion Page ID. + */ + 'field_id' => 3, + /** + * Change this to the name of the relation property in your Notion database. + */ + 'property_name' => 'Tasks', + ) +);